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_pcm.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'libao2/ao_pcm.c') diff --git a/libao2/ao_pcm.c b/libao2/ao_pcm.c index e3484fa871..35fac018a8 100644 --- a/libao2/ao_pcm.c +++ b/libao2/ao_pcm.c @@ -8,6 +8,9 @@ #include "afmt.h" #include "audio_out.h" #include "audio_out_internal.h" +#include "../mp_msg.h" +#include "../help_mp.h" + static ao_info_t info = { @@ -111,13 +114,10 @@ static int init(int rate,int channels,int format,int flags){ wavhdr.data_length=le2me_32(0x7ffff000); wavhdr.file_length = wavhdr.data_length + sizeof(wavhdr) - 8; - printf("PCM: File: %s (%s)\n" - "PCM: Samplerate: %iHz Channels: %s Format %s\n", - ao_outputfilename, (ao_pcm_waveheader?"WAVE":"RAW PCM"), rate, + mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_PCM_FileInfo, ao_outputfilename, + (ao_pcm_waveheader?"WAVE":"RAW PCM"), rate, (channels > 1) ? "Stereo" : "Mono", audio_out_format_name(format)); - printf("PCM: Info: fastest dumping is achieved with -vc dummy -vo null\n" - "PCM: Info: to write WAVE files use -waveheader (default); " - "for RAW PCM -nowaveheader.\n"); + mp_msg(MSGT_AO, MSGL_INFO, MSGTR_AO_PCM_HintInfo); fp = fopen(ao_outputfilename, "wb"); if(fp) { @@ -127,7 +127,8 @@ static int init(int rate,int channels,int format,int flags){ } return 1; } - printf("PCM: Failed to open %s for writing!\n", ao_outputfilename); + mp_msg(MSGT_AO, MSGL_ERR, MSGTR_AO_PCM_CantOpenOutputFile, + ao_outputfilename); return 0; } -- cgit v1.2.3