mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-18 00:47:46 +02:00
swap template function
This commit is contained in:
parent
e06cdc9024
commit
f9c517e99d
3 changed files with 34 additions and 28 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue