diff options
author | fritsch <Peter.Fruehberger@gmail.com> | 2024-10-12 11:07:29 +0200 |
---|---|---|
committer | fritsch <Peter.Fruehberger@gmail.com> | 2024-10-13 17:19:23 +0200 |
commit | 33c70144f7dbfca50b05082bc88a9d6371e3be58 (patch) | |
tree | 0fe6af7187cbd2a2ed1454a7e3f5a794de1d59de | |
parent | 583e0902e43a41eaed5df0008f2d24ec68ec2716 (diff) |
AESinkAudioTrack: Stop pseudo blocking for IEC
The audio hal does not care if we sleep for it, it blocks itself
when the buffer is filled.
-rw-r--r-- | xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp index 5c29565aba..875901b158 100644 --- a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp +++ b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp @@ -944,18 +944,6 @@ unsigned int CAESinkAUDIOTRACK::AddPackets(uint8_t **data, unsigned int frames, } } } - else - { - // waiting should only be done if sink is not run dry - double period_time = m_format.m_frames / static_cast<double>(m_sink_sampleRate); - if (m_delay >= (m_audiotrackbuffer_sec - period_time)) - { - double time_should_ms = 1000.0 * written_frames / m_format.m_sampleRate; - double time_off = time_should_ms - time_to_add_ms; - if (time_off > 0) - usleep(time_off * 500); // sleep half the error on average away - } - } return written_frames; } |