mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-14 20:48:30 +00:00
Merge pull request #4427 from unknownbrackets/volume-fix
Fix volume scaling for mono inputs, etc.
This commit is contained in:
commit
743fb154ae
@ -630,7 +630,7 @@ u32 _AtracDecodeData(int atracID, u8* outbuf, u32 *SamplesNum, u32* finish, int
|
||||
if (avret < 0) {
|
||||
ERROR_LOG(ME, "swr_convert: Error while converting %d", avret);
|
||||
}
|
||||
__AdjustBGMVolume((s16 *)out, numSamples * atrac->pFrame->channels);
|
||||
__AdjustBGMVolume((s16 *)out, numSamples * atrac->atracOutputChannels);
|
||||
}
|
||||
}
|
||||
av_free_packet(&packet);
|
||||
@ -1780,7 +1780,7 @@ int sceAtracLowLevelDecode(int atracID, u32 sourceAddr, u32 sourceBytesConsumedA
|
||||
if (avret < 0) {
|
||||
ERROR_LOG(ME, "swr_convert: Error while converting %d", avret);
|
||||
}
|
||||
__AdjustBGMVolume((s16 *)out, numSamples * atrac->pFrame->channels);
|
||||
__AdjustBGMVolume((s16 *)out, numSamples * atrac->atracOutputChannels);
|
||||
}
|
||||
av_free_packet(&packet);
|
||||
if (got_frame)
|
||||
|
@ -142,7 +142,8 @@ bool SimpleAT3::Decode(void* inbuf, int inbytes, uint8_t *outbuf, int *outbytes)
|
||||
ERROR_LOG(ME, "swr_convert: Error while converting %d", swrRet);
|
||||
return false;
|
||||
}
|
||||
__AdjustBGMVolume((s16 *)outbuf, numSamples * frame_->channels);
|
||||
// We always convert to stereo.
|
||||
__AdjustBGMVolume((s16 *)outbuf, numSamples * 2);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user