1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 15:52:25 +00:00

removed obsolote func, some cosmetics of AUDIO: msg

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7562 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-09-29 21:52:10 +00:00
parent 3e07d606c3
commit 4b05808939

View File

@ -114,9 +114,9 @@ int init_audio_codec(sh_audio_t *sh_audio)
if(!sh_audio->o_bps)
sh_audio->o_bps=sh_audio->channels*sh_audio->samplerate*sh_audio->samplesize;
mp_msg(MSGT_DECAUDIO,MSGL_INFO,"AUDIO: %d Hz, %d ch, sfmt: 0x%X (%d bps), ratio: %d->%d (%3.1f kbit)\n",
mp_msg(MSGT_DECAUDIO,MSGL_INFO,"AUDIO: %d Hz, %d ch, %d bit (0x%X), ratio: %d->%d (%3.1f kbit)\n",
sh_audio->samplerate,sh_audio->channels,
sh_audio->sample_format,sh_audio->samplesize,
sh_audio->samplesize*8,sh_audio->sample_format,
sh_audio->i_bps,sh_audio->o_bps,sh_audio->i_bps*8*0.001);
return 1;
@ -208,42 +208,6 @@ mp_msg(MSGT_DECAUDIO,MSGL_INFO,"Selected audio codec: [%s] afm:%s (%s)\n",
return 1; // success
}
int init_best_audio_codec_old(sh_audio_t *sh_audio,char* audio_codec,char* audio_fm){
// Go through the codec.conf and find the best codec...
sh_audio->codec=NULL;
if(audio_fm) mp_msg(MSGT_DECAUDIO,MSGL_INFO,MSGTR_TryForceAudioFmtStr,audio_fm);
while(1){
sh_audio->codec=find_codec(sh_audio->format,NULL,sh_audio->codec,1);
if(!sh_audio->codec){
if(audio_fm) {
sh_audio->codec=NULL; /* re-search */
mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_CantFindAfmtFallback);
audio_fm=NULL;
continue;
}
mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_CantFindAudioCodec,sh_audio->format);
mp_msg(MSGT_DECAUDIO,MSGL_HINT, MSGTR_TryUpgradeCodecsConfOrRTFM,get_path("codecs.conf"));
return 0;
}
if(audio_codec && strcmp(sh_audio->codec->name,audio_codec)) continue;
if(audio_fm && strcmp(sh_audio->codec->drv,audio_fm)) continue;
mp_msg(MSGT_DECAUDIO,MSGL_INFO,"%s audio codec: [%s] afm:%s (%s)\n",
audio_codec?mp_gettext("Forcing"):mp_gettext("Detected"),sh_audio->codec->name,sh_audio->codec->drv,sh_audio->codec->info);
break;
}
// found it...
if(!init_audio_codec(sh_audio)){
mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_CouldntInitAudioCodec);
return 0;
}
mp_msg(MSGT_DECAUDIO,MSGL_INFO,"AUDIO: %d Hz, %d ch, sfmt: 0x%X (%d bps), ratio: %d->%d (%3.1f kbit)\n",
sh_audio->samplerate,sh_audio->channels,
sh_audio->sample_format,sh_audio->samplesize,
sh_audio->i_bps,sh_audio->o_bps,sh_audio->i_bps*8*0.001);
return 1; // success!
}
void uninit_audio(sh_audio_t *sh_audio)
{
if(sh_audio->inited){