mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Add LiGetPendingAudioDuration() function
This commit is contained in:
parent
52f489bc46
commit
6b42954b47
@ -408,3 +408,7 @@ int startAudioStream(void* audioContext, int arFlags) {
|
||||
int LiGetPendingAudioFrames(void) {
|
||||
return LbqGetItemCount(&packetQueue);
|
||||
}
|
||||
|
||||
int LiGetPendingAudioDuration(void) {
|
||||
return LiGetPendingAudioFrames() * AudioPacketDuration;
|
||||
}
|
@ -454,9 +454,15 @@ int LiFindExternalAddressIP4(const char* stunServer, unsigned short stunPort, un
|
||||
int LiGetPendingVideoFrames(void);
|
||||
|
||||
// Returns the number of queued audio frames ready for delivery. Only relevant
|
||||
// if CAPABILITY_DIRECT_SUBMIT is not set for the audio renderer.
|
||||
// if CAPABILITY_DIRECT_SUBMIT is not set for the audio renderer. For most uses,
|
||||
// LiGetPendingAudioDuration() is probably a better option than this function.
|
||||
int LiGetPendingAudioFrames(void);
|
||||
|
||||
// Similar to LiGetPendingAudioFrames() except it returns the pending audio in
|
||||
// milliseconds rather than frames, which allows callers to be agnostic of the
|
||||
// negotiated audio frame duration.
|
||||
int LiGetPendingAudioDuration(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user