mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
sceAtrac: Force mono when needed. (see #4248)
This commit is contained in:
parent
3d5a85f1a7
commit
de39a81dce
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue