1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-21 18:57:35 +00:00

Whitespace cosmetics: reindent reinit_audio_chain function

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29843 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2009-11-06 16:16:22 +00:00
parent 89c9b3b769
commit b963af59f1

View File

@ -1606,63 +1606,63 @@ static void update_osd_msg(void) {
void reinit_audio_chain(void) { void reinit_audio_chain(void) {
if (!mpctx->sh_audio) if (!mpctx->sh_audio)
return; return;
current_module="init_audio_codec"; current_module="init_audio_codec";
mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n"); mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
if(!init_best_audio_codec(mpctx->sh_audio,audio_codec_list,audio_fm_list)){ if(!init_best_audio_codec(mpctx->sh_audio,audio_codec_list,audio_fm_list)){
goto init_error; goto init_error;
} }
initialized_flags|=INITIALIZED_ACODEC; initialized_flags|=INITIALIZED_ACODEC;
mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n"); mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
current_module="af_preinit"; current_module="af_preinit";
ao_data.samplerate=force_srate; ao_data.samplerate=force_srate;
ao_data.channels=0; ao_data.channels=0;
ao_data.format=audio_output_format; ao_data.format=audio_output_format;
#if 1 #if 1
// first init to detect best values // first init to detect best values
if(!init_audio_filters(mpctx->sh_audio, // preliminary init if(!init_audio_filters(mpctx->sh_audio, // preliminary init
// input: // input:
mpctx->sh_audio->samplerate, mpctx->sh_audio->samplerate,
// output: // output:
&ao_data.samplerate, &ao_data.channels, &ao_data.format)){ &ao_data.samplerate, &ao_data.channels, &ao_data.format)){
mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_AudioFilterChainPreinitError); mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_AudioFilterChainPreinitError);
exit_player(EXIT_ERROR); exit_player(EXIT_ERROR);
} }
#endif #endif
current_module="ao2_init"; current_module="ao2_init";
mpctx->audio_out = init_best_audio_out(audio_driver_list, mpctx->audio_out = init_best_audio_out(audio_driver_list,
0, // plugin flag 0, // plugin flag
ao_data.samplerate, ao_data.samplerate,
ao_data.channels, ao_data.channels,
ao_data.format,0); ao_data.format, 0);
if(!mpctx->audio_out){ if(!mpctx->audio_out){
mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CannotInitAO); mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CannotInitAO);
goto init_error; goto init_error;
} }
initialized_flags|=INITIALIZED_AO; initialized_flags|=INITIALIZED_AO;
mp_msg(MSGT_CPLAYER,MSGL_INFO,"AO: [%s] %dHz %dch %s (%d bytes per sample)\n", mp_msg(MSGT_CPLAYER,MSGL_INFO,"AO: [%s] %dHz %dch %s (%d bytes per sample)\n",
mpctx->audio_out->info->short_name, mpctx->audio_out->info->short_name,
ao_data.samplerate, ao_data.channels, ao_data.samplerate, ao_data.channels,
af_fmt2str_short(ao_data.format), af_fmt2str_short(ao_data.format),
af_fmt2bits(ao_data.format)/8 ); af_fmt2bits(ao_data.format)/8 );
mp_msg(MSGT_CPLAYER,MSGL_V,"AO: Description: %s\nAO: Author: %s\n", mp_msg(MSGT_CPLAYER,MSGL_V,"AO: Description: %s\nAO: Author: %s\n",
mpctx->audio_out->info->name, mpctx->audio_out->info->author); mpctx->audio_out->info->name, mpctx->audio_out->info->author);
if(strlen(mpctx->audio_out->info->comment) > 0) if(strlen(mpctx->audio_out->info->comment) > 0)
mp_msg(MSGT_CPLAYER,MSGL_V,"AO: Comment: %s\n", mpctx->audio_out->info->comment); mp_msg(MSGT_CPLAYER,MSGL_V,"AO: Comment: %s\n", mpctx->audio_out->info->comment);
// init audio filters: // init audio filters:
#if 1 #if 1
current_module="af_init"; current_module="af_init";
if(!build_afilter_chain(mpctx->sh_audio, &ao_data)) { if(!build_afilter_chain(mpctx->sh_audio, &ao_data)) {
mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_NoMatchingFilter); mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_NoMatchingFilter);
goto init_error; goto init_error;
} }
#endif #endif
mpctx->mixer.audio_out = mpctx->audio_out; mpctx->mixer.audio_out = mpctx->audio_out;
mpctx->mixer.volstep = volstep; mpctx->mixer.volstep = volstep;
return; return;
init_error: init_error:
uninit_player(INITIALIZED_ACODEC|INITIALIZED_AO); // close codec and possibly AO uninit_player(INITIALIZED_ACODEC|INITIALIZED_AO); // close codec and possibly AO