Mercurial > hg > svapp
diff audio/AudioCallbackPlaySource.cpp @ 473:c6094bca34f4 bqaudioio
Avoid playing repeated buffer while re-seeking
author | Chris Cannam |
---|---|
date | Wed, 05 Aug 2015 09:42:25 +0100 |
parents | 56acd9368532 |
children | 6ec35c1690c0 |
line wrap: on
line diff
--- a/audio/AudioCallbackPlaySource.cpp Tue Aug 04 13:27:42 2015 +0100 +++ b/audio/AudioCallbackPlaySource.cpp Wed Aug 05 09:42:25 2015 +0100 @@ -1111,7 +1111,7 @@ emit activity(tr("Change time-stretch factor to %1").arg(factor)); } -void +int AudioCallbackPlaySource::getSourceSamples(int count, float **buffer) { if (!m_playing) { @@ -1123,7 +1123,7 @@ buffer[ch][i] = 0.0; } } - return; + return 0; } #ifdef DEBUG_AUDIO_PLAY_SOURCE_PLAYING @@ -1159,7 +1159,7 @@ } } - if (count == 0) return; + if (count == 0) return 0; RubberBandStretcher *ts = m_timeStretcher; RubberBandStretcher *ms = m_monoStretcher; @@ -1229,7 +1229,7 @@ m_condition.wakeAll(); - return; + return got; } int channels = getTargetChannelCount(); @@ -1321,7 +1321,7 @@ m_condition.wakeAll(); - return; + return count; } void