diff options
Diffstat (limited to 'audio/decode/ad_mpg123.c')
-rw-r--r-- | audio/decode/ad_mpg123.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/audio/decode/ad_mpg123.c b/audio/decode/ad_mpg123.c index c17edc9197..08739b7f4b 100644 --- a/audio/decode/ad_mpg123.c +++ b/audio/decode/ad_mpg123.c @@ -46,10 +46,6 @@ LIBAD_EXTERN(mpg123) /* Switch for updating bitrate info of VBR files. Not essential. */ #define AD_MPG123_MEAN_BITRATE -/* Funny thing, that. I assume I shall use it for selecting mpg123 channels. - * Please correct me if I guessed wrong. */ -extern int fakemono; - struct ad_mpg123_context { mpg123_handle *handle; #ifdef AD_MPG123_MEAN_BITRATE @@ -67,7 +63,7 @@ struct ad_mpg123_context { * parameters. */ static int preinit(sh_audio_t *sh) { - int err, flag; + int err; struct ad_mpg123_context *con; /* Assumption: You always call preinit + init + uninit, on every file. * But you stop at preinit in case it fails. @@ -83,13 +79,6 @@ static int preinit(sh_audio_t *sh) if (!con->handle) goto bad_end; - /* Guessing here: Default value triggers forced upmix of mono to stereo. */ - flag = fakemono == 0 ? MPG123_FORCE_STEREO : - fakemono == 1 ? MPG123_MONO_LEFT : - fakemono == 2 ? MPG123_MONO_RIGHT : 0; - if (mpg123_param(con->handle, MPG123_ADD_FLAGS, flag, 0.0) != MPG123_OK) - goto bad_end; - /* Basic settings. * Don't spill messages, enable better resync with non-seekable streams. * Give both flags individually without error checking to keep going with @@ -358,7 +347,7 @@ static int init(sh_audio_t *sh, const char *decoder) con->mean_count = 0; #endif con->vbr = (finfo.vbr != MPG123_CBR); - sh->channels = channels; + mp_chmap_from_channels(&sh->channels, channels); sh->samplerate = rate; /* Without external force, mpg123 will always choose signed encoding, * and non-16-bit only on builds that don't support it. |