changeset 7561:047212009a7f

removed obsolote func, some cosmetics of AUDIO: msg
author arpi
date Sun, 29 Sep 2002 21:52:10 +0000
parents 92ccb6e9437a
children 92188b57a062
files libmpcodecs/dec_audio.c
diffstat 1 files changed, 2 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/dec_audio.c	Sun Sep 29 21:19:16 2002 +0000
+++ b/libmpcodecs/dec_audio.c	Sun Sep 29 21:52:10 2002 +0000
@@ -114,9 +114,9 @@
   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 @@
 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){