Re: [mpg123-users] Calling MPG123 from Asterisk, version behavior changed
Brought to you by:
sobukus
From: Thomas O. <tho...@or...> - 2021-09-18 11:38:10
|
Am Mon, 13 Sep 2021 16:44:14 +0200 schrieb Carlos Oliva <car...@nu...>: > -e s16 do the work, I get the wanted output in new and old versions. > > I' ll try to submit a patch to Aterisk using the right parameters in > app_mp3, as you sugested. I fixed the behaviour in trunk and in the 1.26-fixes branch. Can you please verify that https://mpg123.org/snapshot behaves like 1.25 for you, defaulting to 16 bit output again for -s? This is the relevant change, peobably included as a patch in distros for mpg123 >= 1.26.0: Index: src/audio.c =================================================================== --- src/audio.c (revisión: 4984) +++ src/audio.c (revisión: 4985) @@ -1,3 +1,4 @@ +#define DEBUG /* audio: audio output interface @@ -425,6 +426,25 @@ { enc1 &= force_fmt; enc2 &= force_fmt; + } else + { + long propflags = 0; + out123_getparam_int(ao, OUT123_PROPFLAGS, &propflags); + if(!(propflags & OUT123_PROP_LIVE)) + { + fmtcount = out123_formats(ao, NULL, 0, 1, 2, &outfmts); + if(fmtcount == 1 && outfmts[0].encoding > 0) + { + const char *encname = out123_enc_name(outfmts[0].encoding); + if(param.verbose > 1) + fprintf( stderr, "Note: honouring non-live default encoding of %s\n" + , encname ? encname : "???" ); + enc1 &= outfmts[0].encoding; + enc2 &= outfmts[0].encoding; + } + free(outfmts); + outfmts = NULL; + } } mdebug("enc mono=0x%x stereo=0x%x", (unsigned)enc1, (unsigned)enc2); if(!enc1 && !enc2) Alrighty then, Thomas |