mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-06 10:44:01 +00:00
[client] audio: allow the audiodev to return the periodFrames
This change allows the audiodevs to return the minimum period frames needed to start playback instead of having to rely on a pull to obtain these details. Additionally we are using this information to select an initial start latency as well as to train the desired latency in order to keep it as low as possible.
This commit is contained in:
@@ -47,11 +47,11 @@ struct LG_AudioDevOps
|
||||
/* setup the stream for playback but don't start it yet
|
||||
* Note: the pull function returns f32 samples
|
||||
*/
|
||||
void (*setup)(int channels, int sampleRate, LG_AudioPullFn pullFn);
|
||||
void (*setup)(int channels, int sampleRate, LG_AudioPullFn pullFn,
|
||||
int * periodFrames);
|
||||
|
||||
/* called when there is data available to start playback
|
||||
* return true if playback should start */
|
||||
bool (*start)(int framesBuffered);
|
||||
/* called when there is data available to start playback */
|
||||
void (*start)();
|
||||
|
||||
/* called when SPICE reports the audio stream has stopped */
|
||||
void (*stop)(void);
|
||||
|
Reference in New Issue
Block a user