swap template function

This commit is contained in:
badaix 2016-05-05 10:50:17 +02:00
parent e06cdc9024
commit f9c517e99d
3 changed files with 34 additions and 28 deletions

View file

@ -60,19 +60,7 @@ PcmDecoder::PcmDecoder() : Decoder()
bool PcmDecoder::decode(msg::PcmChunk* chunk)
{
/* int16_t* bufferT = (int16_t*)chunk->payload;
for (size_t n=0; n<chunk->getSampleCount(); ++n)
{
bufferT[n] = SWAP_16(bufferT[n]);
}
if (sampleFormat.bits == 8)
adjustVolume<int8_t>(buffer, frames*sampleFormat.channels, volume);
else if (sampleFormat.bits == 16)
adjustVolume<int16_t>(buffer, frames*sampleFormat.channels, volume);
else if (sampleFormat.bits == 32)
adjustVolume<int32_t>(buffer, frames*sampleFormat.channels, volume);
*/ return true;
return true;
}