diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-01-10 17:35:23 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-01-10 17:35:23 +0100 |
commit | 90c973307607be9ed8f943a79a36a28a46c07502 (patch) | |
tree | 6f9d9cc7187e3c4f6fb11a95462c341998017049 /src/VLCInput.cpp | |
parent | e4821033a325b748c1c69848554b349c76ba6f59 (diff) | |
download | fdk-aac-dabplus-90c973307607be9ed8f943a79a36a28a46c07502.tar.gz fdk-aac-dabplus-90c973307607be9ed8f943a79a36a28a46c07502.tar.bz2 fdk-aac-dabplus-90c973307607be9ed8f943a79a36a28a46c07502.zip |
Fix VLC queue fill and increase queue size
Diffstat (limited to 'src/VLCInput.cpp')
-rw-r--r-- | src/VLCInput.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/VLCInput.cpp b/src/VLCInput.cpp index 890de01..4ec9208 100644 --- a/src/VLCInput.cpp +++ b/src/VLCInput.cpp @@ -368,11 +368,15 @@ void VLCInputThreaded::start() } } +// How many samples we insert into the queue each call +// 10 samples @ 32kHz = 3.125ms +#define NUM_BYTES_PER_CALL (10 * BYTES_PER_SAMPLE) + void VLCInputThreaded::process() { - uint8_t samplebuf[NUM_SAMPLES_PER_CALL * BYTES_PER_SAMPLE * m_channels]; + uint8_t samplebuf[NUM_BYTES_PER_CALL]; while (m_running) { - ssize_t n = m_read(samplebuf, NUM_SAMPLES_PER_CALL); + ssize_t n = m_read(samplebuf, NUM_BYTES_PER_CALL); if (n < 0) { m_running = false; @@ -380,7 +384,7 @@ void VLCInputThreaded::process() break; } - m_queue.push(samplebuf, BYTES_PER_SAMPLE*m_channels*n); + m_queue.push(samplebuf, n); } } |