[MPlayer-dev-eng] Re: [PATCH] GCC 3.4 Compile fix

joy at pingfm.org joy at pingfm.org
Tue Apr 13 16:51:12 CEST 2004


On Tue, 13 Apr 2004, adland wrote:

> I wondered if there should not at least be a warning like below.
> 
> default:
>    dbgprintf("Unable to select device for %d channel playback\n",channels);
>    break;
you didn't rtfs. the cases are only for adding surround features, if more 
than 2 channels are present. usually 1 or 2 channels are the case, here 
*no* surround should be switched on, means nothing needs to be added to 
ao_subdevice. in the current state putting a warning to default would 
cause an error (warning) message even if the sound-stream is 1/2-channels.
so the right behaviuor would be to leave default empty, or
case 1:
case 2:
	if (verbose>0):
		printf("no surround");
	break;
case 4:
	strcpy(devstr, "surround40");
		alsa_device = devstr;
        break;
case 6:
	strcpy(devstr, "surround51");
		alsa_device = devstr;
        break;
default:
	fprintf(stderr, "%d channels are not supported\n", channels);
	break;

probably probing for surround capabilities of the sound-device should be 
added here. dunno if alsa does automagic downmixing?
also the printf's should be converted to mp_msg, at least for 
the last g1 release ;).


regards

zsolt

________________________________________
do interactive tv on www.remote-tv.de




More information about the MPlayer-dev-eng mailing list