diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-02-13 17:13:12 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-02-13 17:13:12 +0000 |
| commit | f4f8368b6ecb138a5fc6228aad7465899cf96e17 (patch) | |
| tree | d9ce2a18f0aef643accfa0416cbabc12aa526166 /src/plugins/Effect | |
| parent | 0aee43788d41e28e77478bf2eabde695e6fd04dc (diff) | |
| download | qmmp-f4f8368b6ecb138a5fc6228aad7465899cf96e17.tar.gz qmmp-f4f8368b6ecb138a5fc6228aad7465899cf96e17.tar.bz2 qmmp-f4f8368b6ecb138a5fc6228aad7465899cf96e17.zip | |
fixed remaining bugs with 24-bit samples
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3242 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Effect')
| -rw-r--r-- | src/plugins/Effect/srconverter/srconverter.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/Effect/srconverter/srconverter.cpp b/src/plugins/Effect/srconverter/srconverter.cpp index 969cd5eb0..fcd77bc04 100644 --- a/src/plugins/Effect/srconverter/srconverter.cpp +++ b/src/plugins/Effect/srconverter/srconverter.cpp @@ -65,6 +65,16 @@ void SRConverter::applyEffect(Buffer *b) } else { + qint32 *data = (int *) b->data; + if(format() == Qmmp::PCM_S24LE) + { + uint samples = b->size >> 2; + for(unsigned int i = 0; i < samples; ++i) + { + if(data[i] & 0x800000) + data[i] |= 0xff000000; + } + } src_int_to_float_array((int*) b->data, m_src_data.data_in, m_src_data.input_frames * channels()); } |
