Opened 12 years ago

Closed 12 years ago

#943 closed defect (wontfix)

stereo output for WAV is no longer default

Reported by: ned.danieley@… Owned by: reimar
Priority: normal Component: ao
Version: 1.0pre8 Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

CentOS release 4.3 (Final)
Linux aiki.bme.duke.edu 2.6.9-55.0.12.EL.cernsmp #1 SMP Mon Nov 5 17:34:28 CET 2007 i686 i686 i386 GNU/Linux

under MPlayer-1.0pre7, downloading a Car Talk segment using

mplayer rtsp://go.rbn.com/cartalk/cartalk/demand/CT0745-03.ra -af volume=10 -srate 44100 -ao pcm:file=file.wav -vc null -vo null

resulted in the single input channel being converted to stereo:

AO: [pcm] 44100Hz 2ch s16le (2 bps)
Building audio filter chain for 22050Hz/1ch/s16le -> 44100Hz/2ch/s16le

however, that seems to have stopped working as of MPlayer-1.0pre8

AO: [pcm] 44100Hz 1ch s16le (2 bytes per sample)

in 1.0pre8, I can revert to the original behaviour with this patch

* mplayer.c.dist 2006-06-11 14:35:47.000000000 -0400
--- mplayer.c 2007-11-20 12:36:38.000000000 -0500
*
* 3499,3505

const ao_info_t *info=audio_out->info;
current_module="af_preinit";
ao_data.samplerate=force_srate;

! ao_data.channels=0;

ao_data.format=audio_output_format;

#if 1

first init to detect best values

--- 3499,3505 ----

const ao_info_t *info=audio_out->info;
current_module="af_preinit";
ao_data.samplerate=force_srate;

! ao_data.channels=audio_output_channels?audio_output_channels:sh_audio->channels;

ao_data.format=audio_output_format;

#if 1

first init to detect best values

but the rc1 and rc2 versions don't have such an obvious place for a fix. using the '-channels 2' doesn't change the behaviour. pre7 uses the realaud afm, but forcing that for pre8 doesn't help.

is this a bug, or am I missing an option?

Change History (2)

comment:1 Changed 12 years ago by ned.danieley@…

oops, sorry, figured it out. the following patch will revert 1.0rc2 to the 1.0pre7 behaviour:

* mplayer.c.dist 2007-11-20 12:13:17.000000000 -0500
--- mplayer.c 2007-11-20 12:53:34.000000000 -0500
*
* 1491,1497

const ao_info_t *info=audio_out->info;
current_module="af_preinit";
ao_data.samplerate=force_srate;

! ao_data.channels=0;

ao_data.format=audio_output_format;

#if 1

first init to detect best values

--- 1491,1497 ----

const ao_info_t *info=audio_out->info;
current_module="af_preinit";
ao_data.samplerate=force_srate;

! ao_data.channels=audio_output_channels?audio_output_channels:mpctx->sh_audio->channels;

ao_data.format=audio_output_format;

#if 1

first init to detect best values

comment:2 Changed 12 years ago by reimar

  • Resolution set to wontfix
  • Status changed from new to closed

As said in the man page, -channels is now only the desired number of channels, if the decoder does not support downmixing (and for PCM there is not really a reason to support it) it has no effect.
-af channels=2 is to force the number of channels (or alternatively hack your favorite ao_ module)

Note: See TracTickets for help on using tickets.