Mercurial > mplayer.hg
comparison mplayer.c @ 1792:89f616b1c2ae
nosound fixed. again. :(
author | arpi |
---|---|
date | Thu, 30 Aug 2001 22:56:27 +0000 |
parents | f34087fa1469 |
children | ba11d77c587a |
comparison
equal
deleted
inserted
replaced
1791:2e86c5c8071e | 1792:89f616b1c2ae |
---|---|
801 audio_family=-1; | 801 audio_family=-1; |
802 continue; | 802 continue; |
803 } | 803 } |
804 mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantFindAudioCodec,sh_audio->format); | 804 mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantFindAudioCodec,sh_audio->format); |
805 mp_msg(MSGT_CPLAYER,MSGL_HINT, MSGTR_TryUpgradeCodecsConfOrRTFM,get_path("codecs.conf")); | 805 mp_msg(MSGT_CPLAYER,MSGL_HINT, MSGTR_TryUpgradeCodecsConfOrRTFM,get_path("codecs.conf")); |
806 free_sh_audio(sh_audio); sh_audio=NULL; d_audio->sh=NULL; | 806 sh_audio=d_audio->sh=NULL; |
807 break; | 807 break; |
808 } | 808 } |
809 if(audio_codec && strcmp(sh_audio->codec->name,audio_codec)) continue; | 809 if(audio_codec && strcmp(sh_audio->codec->name,audio_codec)) continue; |
810 else if(audio_family!=-1 && sh_audio->codec->driver!=audio_family) continue; | 810 else if(audio_family!=-1 && sh_audio->codec->driver!=audio_family) continue; |
811 mp_msg(MSGT_CPLAYER,MSGL_INFO,"%s audio codec: [%s] drv:%d (%s)\n",audio_codec?"Forcing":"Detected",sh_audio->codec->name,sh_audio->codec->driver,sh_audio->codec->info); | 811 mp_msg(MSGT_CPLAYER,MSGL_INFO,"%s audio codec: [%s] drv:%d (%s)\n",audio_codec?"Forcing":"Detected",sh_audio->codec->name,sh_audio->codec->driver,sh_audio->codec->info); |
815 | 815 |
816 if(sh_audio){ | 816 if(sh_audio){ |
817 mp_msg(MSGT_CPLAYER,MSGL_V,"Initializing audio codec...\n"); | 817 mp_msg(MSGT_CPLAYER,MSGL_V,"Initializing audio codec...\n"); |
818 if(!init_audio(sh_audio)){ | 818 if(!init_audio(sh_audio)){ |
819 mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CouldntInitAudioCodec); | 819 mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CouldntInitAudioCodec); |
820 free_sh_audio(sh_audio); sh_audio=NULL; d_audio->sh=NULL; | 820 sh_audio=d_audio->sh=NULL; |
821 } else { | 821 } else { |
822 mp_msg(MSGT_CPLAYER,MSGL_INFO,"AUDIO: srate=%d chans=%d bps=%d sfmt=0x%X ratio: %d->%d\n",sh_audio->samplerate,sh_audio->channels,sh_audio->samplesize, | 822 mp_msg(MSGT_CPLAYER,MSGL_INFO,"AUDIO: srate=%d chans=%d bps=%d sfmt=0x%X ratio: %d->%d\n",sh_audio->samplerate,sh_audio->channels,sh_audio->samplesize, |
823 sh_audio->sample_format,sh_audio->i_bps,sh_audio->o_bps); | 823 sh_audio->sample_format,sh_audio->i_bps,sh_audio->o_bps); |
824 } | 824 } |
825 } | 825 } |
916 strcpy(encode_index_name,encode_name); | 916 strcpy(encode_index_name,encode_name); |
917 strcat(encode_index_name,".index"); | 917 strcat(encode_index_name,".index"); |
918 if((encode_file=fopen(encode_index_name,"wb"))) | 918 if((encode_file=fopen(encode_index_name,"wb"))) |
919 fclose(encode_file); | 919 fclose(encode_file); |
920 else encode_index_name=NULL; | 920 else encode_index_name=NULL; |
921 free_sh_audio(sh_audio); sh_audio=NULL; d_audio->sh=NULL; // disable audio !!!!! | 921 sh_audio=d_audio->sh=NULL; |
922 } | 922 } |
923 | 923 |
924 // ========== Init keyboard FIFO (connection to libvo) ============ | 924 // ========== Init keyboard FIFO (connection to libvo) ============ |
925 | 925 |
926 make_pipe(&keyb_fifo_get,&keyb_fifo_put); | 926 make_pipe(&keyb_fifo_get,&keyb_fifo_put); |
1043 if(strlen(info->comment) > 0) | 1043 if(strlen(info->comment) > 0) |
1044 mp_msg(MSGT_CPLAYER,MSGL_V,"AO: Comment: %s\n", info->comment); | 1044 mp_msg(MSGT_CPLAYER,MSGL_V,"AO: Comment: %s\n", info->comment); |
1045 if(!audio_out->init(force_srate?force_srate:sh_audio->samplerate, | 1045 if(!audio_out->init(force_srate?force_srate:sh_audio->samplerate, |
1046 sh_audio->channels,sh_audio->sample_format,0)){ | 1046 sh_audio->channels,sh_audio->sample_format,0)){ |
1047 mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CannotInitAO); | 1047 mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CannotInitAO); |
1048 free_sh_audio(sh_audio); sh_audio=NULL; d_audio->sh=NULL; | 1048 sh_audio=d_audio->sh=NULL; |
1049 } | 1049 } |
1050 | 1050 |
1051 // printf("Audio buffer size: %d bytes, delay: %5.3fs\n",audio_buffer_size,audio_buffer_delay); | 1051 // printf("Audio buffer size: %d bytes, delay: %5.3fs\n",audio_buffer_size,audio_buffer_delay); |
1052 | 1052 |
1053 // fixup audio buffer size: | 1053 // fixup audio buffer size: |