Browse Source
audio: Use pre-#2840 times
Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
pull/2937/head
Caio Oliveira
4 months ago
No known key found for this signature in database
GPG Key ID: 362DA3DC1901E080
2 changed files with
3 additions and
3 deletions
-
src/audio_core/sink/sink_stream.cpp
-
src/audio_core/sink/sink_stream.h
|
|
|
@ -231,9 +231,9 @@ void SinkStream::WaitFreeSpace(std::stop_token stop_token) { |
|
|
|
return paused || queued_buffers < max_queue_size; |
|
|
|
}; |
|
|
|
|
|
|
|
release_cv.wait_for(lk, std::chrono::milliseconds(10), can_continue); |
|
|
|
release_cv.wait_for(lk, std::chrono::milliseconds(5), can_continue); |
|
|
|
|
|
|
|
if (queued_buffers > max_queue_size + 10) { |
|
|
|
if (queued_buffers > max_queue_size + 3) { |
|
|
|
release_cv.wait(lk, stop_token, can_continue); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -240,7 +240,7 @@ private: |
|
|
|
/// Ring buffer of the samples waiting to be played or consumed |
|
|
|
Common::RingBuffer<s16, 0x10000> samples_buffer; |
|
|
|
/// Audio buffers queued and waiting to play |
|
|
|
Common::SPSCQueue<SinkBuffer, 0x10000> queue; |
|
|
|
Common::SPSCQueue<SinkBuffer, 0x40000> queue; |
|
|
|
/// The currently-playing audio buffer |
|
|
|
SinkBuffer playing_buffer{}; |
|
|
|
/// The last played (or received) frame of audio, used when the callback underruns |
|
|
|
|