Mercurial > mplayer.hg
comparison mplayer.c @ 14818:663c1ea5f595
finally remove the refences to bps outside libaf. also simplification of some messages and removed redundants
author | alex |
---|---|
date | Fri, 25 Feb 2005 11:11:07 +0000 |
parents | 664b06b907cb |
children | 265d8b8adbbe |
comparison
equal
deleted
inserted
replaced
14817:878745349274 | 14818:663c1ea5f595 |
---|---|
948 if (new_srate > 192000) | 948 if (new_srate > 192000) |
949 new_srate = 192000; | 949 new_srate = 192000; |
950 playback_speed = (float)new_srate / (float)sh_audio->samplerate; | 950 playback_speed = (float)new_srate / (float)sh_audio->samplerate; |
951 } | 951 } |
952 result = init_audio_filters(sh_audio, new_srate, | 952 result = init_audio_filters(sh_audio, new_srate, |
953 sh_audio->channels, sh_audio->sample_format, sh_audio->samplesize, | 953 sh_audio->channels, sh_audio->sample_format, |
954 ao_data->samplerate, ao_data->channels, ao_data->format, | 954 ao_data->samplerate, ao_data->channels, ao_data->format, |
955 af_fmt2bits(ao_data->format) / 8, /* ao_data.bps, */ | |
956 ao_data->outburst * 4, ao_data->buffersize); | 955 ao_data->outburst * 4, ao_data->buffersize); |
957 mixer.afilter = sh_audio->afilter; | 956 mixer.afilter = sh_audio->afilter; |
958 #ifdef HAVE_NEW_GUI | 957 #ifdef HAVE_NEW_GUI |
959 guiGetEvent(guiSetAfilter, (char *)sh_audio->afilter); | 958 guiGetEvent(guiSetAfilter, (char *)sh_audio->afilter); |
960 #endif | 959 #endif |
2117 ao_data.format=audio_output_format?audio_output_format:sh_audio->sample_format; | 2116 ao_data.format=audio_output_format?audio_output_format:sh_audio->sample_format; |
2118 #if 1 | 2117 #if 1 |
2119 if(!preinit_audio_filters(sh_audio, | 2118 if(!preinit_audio_filters(sh_audio, |
2120 // input: | 2119 // input: |
2121 (int)(sh_audio->samplerate*playback_speed), | 2120 (int)(sh_audio->samplerate*playback_speed), |
2122 sh_audio->channels, sh_audio->sample_format, sh_audio->samplesize, | 2121 sh_audio->channels, sh_audio->sample_format, |
2123 // output: | 2122 // output: |
2124 &ao_data.samplerate, &ao_data.channels, &ao_data.format, | 2123 &ao_data.samplerate, &ao_data.channels, &ao_data.format)){ |
2125 af_fmt2bits(ao_data.format)/8)){ | |
2126 mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_AudioFilterChainPreinitError); | 2124 mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_AudioFilterChainPreinitError); |
2127 } else { | |
2128 char buf[128]; | |
2129 mp_msg(MSGT_CPLAYER,MSGL_INFO,"AF_pre: %dHz %dch %s\n", | |
2130 ao_data.samplerate, ao_data.channels, | |
2131 af_fmt2str(ao_data.format, buf, 128)); | |
2132 } | 2125 } |
2133 #endif | 2126 #endif |
2134 current_module="ao2_init"; | 2127 current_module="ao2_init"; |
2135 if(!(audio_out=init_best_audio_out(audio_driver_list, | 2128 if(!(audio_out=init_best_audio_out(audio_driver_list, |
2136 0, // plugin flag | 2129 0, // plugin flag |
2141 mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CannotInitAO); | 2134 mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CannotInitAO); |
2142 uninit_player(INITED_ACODEC); // close codec | 2135 uninit_player(INITED_ACODEC); // close codec |
2143 sh_audio=d_audio->sh=NULL; // -> nosound | 2136 sh_audio=d_audio->sh=NULL; // -> nosound |
2144 } else { | 2137 } else { |
2145 // SUCCESS: | 2138 // SUCCESS: |
2146 char buf[128]; | |
2147 inited_flags|=INITED_AO; | 2139 inited_flags|=INITED_AO; |
2148 mp_msg(MSGT_CPLAYER,MSGL_INFO,"AO: [%s] %dHz %dch %s (%d bps)\n", | 2140 mp_msg(MSGT_CPLAYER,MSGL_INFO,"AO: [%s] %dHz %dch %s (%d bps)\n", |
2149 audio_out->info->short_name, | 2141 audio_out->info->short_name, |
2150 ao_data.samplerate, ao_data.channels, | 2142 ao_data.samplerate, ao_data.channels, |
2151 af_fmt2str(ao_data.format, buf, 128), | 2143 af_fmt2str_short(ao_data.format), |
2152 af_fmt2bits(ao_data.format)/8 ); | 2144 af_fmt2bits(ao_data.format)/8 ); |
2153 mp_msg(MSGT_CPLAYER,MSGL_V,"AO: Description: %s\nAO: Author: %s\n", | 2145 mp_msg(MSGT_CPLAYER,MSGL_V,"AO: Description: %s\nAO: Author: %s\n", |
2154 audio_out->info->name, audio_out->info->author); | 2146 audio_out->info->name, audio_out->info->author); |
2155 if(strlen(audio_out->info->comment) > 0) | 2147 if(strlen(audio_out->info->comment) > 0) |
2156 mp_msg(MSGT_CPLAYER,MSGL_V,"AO: Comment: %s\n", audio_out->info->comment); | 2148 mp_msg(MSGT_CPLAYER,MSGL_V,"AO: Comment: %s\n", audio_out->info->comment); |