mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-17 12:47:46 +00:00
sceAtrac: Force mono when needed. (see #4248)
This commit is contained in:
parent
3d5a85f1a7
commit
de39a81dce
@ -1064,6 +1064,10 @@ int __AtracSetContext(Atrac *atrac) {
|
||||
atrac->audio_stream_index = ret;
|
||||
atrac->pCodecCtx = atrac->pFormatCtx->streams[atrac->audio_stream_index]->codec;
|
||||
|
||||
// Appears we need to force mono in some cases. (See CPkmn's comments in issue #4248)
|
||||
if (atrac->atracChannels == 1)
|
||||
atrac->pCodecCtx->channel_layout = AV_CH_LAYOUT_MONO;
|
||||
|
||||
// open codec
|
||||
if ((ret = avcodec_open2(atrac->pCodecCtx, pCodec, NULL)) < 0) {
|
||||
ERROR_LOG(ME, "avcodec_open2: Cannot open audio decoder %d", ret);
|
||||
|
Loading…
x
Reference in New Issue
Block a user