Mercurial > hg > svapp
comparison audio/AudioCallbackPlaySource.cpp @ 474:fdce8a452b19 bqaudioio
Fix very long delay on seeking during playback (caused by Pulse driver using max length as block size)
author | Chris Cannam |
---|---|
date | Wed, 05 Aug 2015 17:47:12 +0100 |
parents | c6094bca34f4 |
children | cd9dec2f47e8 |
comparison
equal
deleted
inserted
replaced
473:c6094bca34f4 | 474:fdce8a452b19 |
---|---|
592 cout << "AudioCallbackPlaySource::setTarget: Block size -> " << size << endl; | 592 cout << "AudioCallbackPlaySource::setTarget: Block size -> " << size << endl; |
593 if (size != 0) { | 593 if (size != 0) { |
594 m_blockSize = size; | 594 m_blockSize = size; |
595 } | 595 } |
596 if (size * 4 > m_ringBufferSize) { | 596 if (size * 4 > m_ringBufferSize) { |
597 SVDEBUG << "AudioCallbackPlaySource::setTarget: Buffer size " | 597 #ifdef DEBUG_AUDIO_PLAY_SOURCE |
598 << size << " > a quarter of ring buffer size " | 598 cerr << "AudioCallbackPlaySource::setTarget: Buffer size " |
599 << m_ringBufferSize << ", calling for more ring buffer" | 599 << size << " > a quarter of ring buffer size " |
600 << endl; | 600 << m_ringBufferSize << ", calling for more ring buffer" |
601 << endl; | |
602 #endif | |
601 m_ringBufferSize = size * 4; | 603 m_ringBufferSize = size * 4; |
602 if (m_writeBuffers && !m_writeBuffers->empty()) { | 604 if (m_writeBuffers && !m_writeBuffers->empty()) { |
603 clearRingBuffers(); | 605 clearRingBuffers(); |
604 } | 606 } |
605 } | 607 } |