Page 1 of 1

GetBufferedAudioSampleFrameCount Linux Issue

PostPosted: Thu Jul 26, 2018 11:31 pm
by Dmitry Dudkin

I have problem with GetBufferedAudioSampleFrameCount under Linux on latest drivers and SDK. My program trying to keep audio buffer at 2400 samples level. On RenderAudioSamples I have a loop that call GetBufferedAudioSampleFrameCount and if buffered samples less than 2300 then it write another 240 samples. Also to correct output frequency difference my app drop 1 sample every about 113000 samples. Everything works fine for hours but twice per day I have an issue - GetBufferedAudioSampleFrameCount result increased from about 1500 to 3300-4500 . And it is happened in my loop in less than 1ms. Before writing 240 samples it was 1500 but next GetBufferedAudioSampleFrameCount just after write 240 samples return 3300-4500.
I guess that it can be related with NTP adjustments. Looks like Decklink SDK/driver use non monotonic timer. How I can fix it?


Re: GetBufferedAudioSampleFrameCount Linux Issue

PostPosted: Sun Jul 29, 2018 2:39 pm
by Dmitry Dudkin
Every time when it happen first GetBufferedAudioSampleFrameCount reports that audio buffer level is 0. But next call GetBufferedAudioSampleFrameCount jumps to about 4000 samples.