diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-02-24 16:00:54 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-02-24 16:00:54 +0100 |
commit | c2863cf4bee6459f1bb72c73bcf83596051cf96d (patch) | |
tree | b336b0894c21d620fbbf95294dddab831ce6b3cd /src/VLCInput.h | |
parent | 89715eaa5e02c852e26caaa1854902335cbba794 (diff) | |
download | ODR-AudioEnc-c2863cf4bee6459f1bb72c73bcf83596051cf96d.tar.gz ODR-AudioEnc-c2863cf4bee6459f1bb72c73bcf83596051cf96d.tar.bz2 ODR-AudioEnc-c2863cf4bee6459f1bb72c73bcf83596051cf96d.zip |
Improve VLC samplerate conversion by asking float samples
Asking floats from VLC instead of signed 16-bit samples allows
VLC to use the libsamplerate resampler instead of the ugly_resampler.
Otherwise it might convert to s16l first, and refuse to use
libsamplerate which is unable to work with that data format.
Diffstat (limited to 'src/VLCInput.h')
-rw-r--r-- | src/VLCInput.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/VLCInput.h b/src/VLCInput.h index 5ef970b..16c6cbf 100644 --- a/src/VLCInput.h +++ b/src/VLCInput.h @@ -163,12 +163,12 @@ class VLCInput ssize_t m_read(uint8_t* buf, size_t length); /*! Buffer used in the callback functions for VLC */ - std::vector<uint8_t> m_current_buf; + std::vector<float> m_current_buf; std::mutex m_queue_mutex; /*! Buffer containing all available samples from VLC */ - std::deque<uint8_t> m_queue; + std::deque<float> m_queue; std::string m_uri; unsigned m_verbosity; |