Skip to content

Commit

Permalink
有効な場合でなくても音声ディレイカットが表示されていたのを修正。
Browse files Browse the repository at this point in the history
  • Loading branch information
rigaya committed Feb 29, 2020
1 parent f583e31 commit 9db0970
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions VCEEnc/frm/frmConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,23 @@ System::Void frmConfig::AudioEncodeModeChanged() {
fcgCBAudio2pass->Enabled = astg->mode[index].enc_2pass != 0;
if (!fcgCBAudio2pass->Enabled) fcgCBAudio2pass->Checked = false;
SetfbcBTABEnable(fcgNUAudioBitrate->Visible, (int)fcgNUAudioBitrate->Maximum);

bool delay_cut_available = astg->mode[index].delay > 0;
fcgLBAudioDelayCut->Visible = delay_cut_available;
fcgCXAudioDelayCut->Visible = delay_cut_available;
if (delay_cut_available) {
const bool delay_cut_edts_available = str_has_char(astg->cmd_raw) && str_has_char(sys_dat->exstg->s_mux[MUXER_MP4_RAW].delay_cmd);
const int current_idx = fcgCXAudioDelayCut->SelectedIndex;
const int items_to_set = _countof(AUDIO_DELAY_CUT_MODE) - 1 - ((delay_cut_edts_available) ? 0 : 1);
fcgCXAudioDelayCut->BeginUpdate();
fcgCXAudioDelayCut->Items->Clear();
for (int i = 0; i < items_to_set; i++)
fcgCXAudioDelayCut->Items->Add(String(AUDIO_DELAY_CUT_MODE[i]).ToString());
fcgCXAudioDelayCut->EndUpdate();
fcgCXAudioDelayCut->SelectedIndex = (current_idx >= items_to_set) ? 0 : current_idx;
} else {
fcgCXAudioDelayCut->SelectedIndex = 0;
}
}

/////////////// 設定ファイル関連 //////////////////////
Expand Down

0 comments on commit 9db0970

Please sign in to comment.