From 0f9f4caba49ab9330e9b3836612a07cde1508354 Mon Sep 17 00:00:00 2001 From: ivo Date: Sat, 18 Sep 2004 20:31:28 +0000 Subject: mp_msg transition of unmaintained audio output drivers. Patch by Reynaldo H. Verdejo Pinochet git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13384 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_oss.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'libao2/ao_oss.c') diff --git a/libao2/ao_oss.c b/libao2/ao_oss.c index 236a054e9f..ccca1cd9e8 100644 --- a/libao2/ao_oss.c +++ b/libao2/ao_oss.c @@ -14,6 +14,7 @@ #include "../config.h" #include "../mp_msg.h" #include "../mixer.h" +#include "../help_mp.h" #include "afmt.h" @@ -108,7 +109,7 @@ static int init(int rate,int channels,int format,int flags){ int fd, devs, i; if ((fd = open(oss_mixer_device, O_RDONLY)) == -1){ - mp_msg(MSGT_AO,MSGL_ERR,"audio_setup: Can't open mixer device %s: %s\n", + mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_OSS_CantOpenMixer, oss_mixer_device, strerror(errno)); }else{ ioctl(fd, SOUND_MIXER_READ_DEVMASK, &devs); @@ -117,7 +118,7 @@ static int init(int rate,int channels,int format,int flags){ for (i=0; i 2) { if ( ioctl(audio_fd, SNDCTL_DSP_CHANNELS, &ao_data.channels) == -1 || ao_data.channels != channels ) { - mp_msg(MSGT_AO,MSGL_ERR,"audio_setup: Failed to set audio device to %d channels\n", channels); + mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_OSS_CantSetChans, channels); return 0; } } else { int c = ao_data.channels-1; if (ioctl (audio_fd, SNDCTL_DSP_STEREO, &c) == -1) { - mp_msg(MSGT_AO,MSGL_ERR,"audio_setup: Failed to set audio device to %d channels\n", ao_data.channels); + mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_OSS_CantSetChans, ao_data.channels); return 0; } ao_data.channels=c+1; @@ -214,7 +215,7 @@ ac3_retry: if(ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &zz)==-1){ int r=0; - mp_msg(MSGT_AO,MSGL_WARN,"audio_setup: driver doesn't support SNDCTL_DSP_GETOSPACE :-(\n"); + mp_msg(MSGT_AO,MSGL_WARN,MSGTR_AO_OSS_CantUseGetospace); if(ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &r)==-1){ mp_msg(MSGT_AO,MSGL_V,"audio_setup: %d bytes/frag (config.h)\n",ao_data.outburst); } else { @@ -245,8 +246,7 @@ ac3_retry: } free(data); if(ao_data.buffersize==0){ - mp_msg(MSGT_AO,MSGL_ERR,"\n *** Your audio driver DOES NOT support select() ***\n" - "Recompile mplayer with #undef HAVE_AUDIO_SELECT in config.h !\n\n"); + mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_OSS_CantUseSelect); return 0; } #endif @@ -283,7 +283,7 @@ static void reset(){ uninit(1); audio_fd=open(dsp, O_WRONLY); if(audio_fd < 0){ - mp_msg(MSGT_AO,MSGL_ERR,"\nFatal error: *** CANNOT RE-OPEN / RESET AUDIO DEVICE *** %s\n", strerror(errno)); + mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_OSS_CantReopen, strerror(errno)); return; } -- cgit v1.2.3