/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
* audiohandler.c
- * Copyright (C) John Stebbins 2008 <stebbins@stebbins>
+ * Copyright (C) John Stebbins 2008-2011 <stebbins@stebbins>
*
* audiohandler.c is free software.
*
#include "audiohandler.h"
static void ghb_add_audio(signal_user_data_t *ud, GValue *settings);
+static GValue* get_selected_asettings(signal_user_data_t *ud);
+
+static gboolean block_updates = FALSE;
void
ghb_adjust_audio_rate_combos(signal_user_data_t *ud)
ghb_settings_take_value(ud->settings, "AudioEncoderActual",
ghb_lookup_acodec_value(select_acodec));
+ GValue *asettings = get_selected_asettings(ud);
+ if (asettings)
+ {
+ ghb_settings_take_value(asettings, "AudioEncoderActual",
+ ghb_lookup_acodec_value(select_acodec));
+ }
+ ghb_audio_list_refresh_selected(ud);
ghb_check_dependency(ud, NULL, "AudioEncoderActual");
}
g_debug("audio_codec_changed_cb ()");
gval = ghb_widget_value(widget);
acodec_code = ghb_lookup_combo_int("AudioEncoder", gval);
+ if (block_updates)
+ {
+ prev_acodec = acodec_code;
+ ghb_grey_combo_options (ud->builder);
+ return;
+ }
+
+ gval = ghb_widget_value(widget);
+ acodec_code = ghb_lookup_combo_int("AudioEncoder", gval);
ghb_value_free(gval);
asettings = get_selected_asettings(ud);
GValue *asettings;
g_debug("audio_track_changed_cb ()");
+ if (block_updates) return;
+
ghb_adjust_audio_rate_combos(ud);
ghb_check_dependency(ud, widget, NULL);
ghb_grey_combo_options(ud->builder);
GValue *asettings;
g_debug("audio_mix_changed_cb ()");
+ if (block_updates) return;
+
ghb_adjust_audio_rate_combos(ud);
ghb_check_dependency(ud, widget, NULL);
asettings = get_selected_asettings(ud);
GValue *asettings;
g_debug("audio_widget_changed_cb ()");
+ if (block_updates) return;
ghb_adjust_audio_rate_combos(ud);
ghb_check_dependency(ud, widget, NULL);
gchar *drc;
g_debug("drc_widget_changed_cb ()");
+ if (block_updates) return;
label = GTK_LABEL(GHB_WIDGET(ud->builder, "drc_label"));
if (val < 1.0)
return;
asettings = ghb_array_get_nth(audio_list, row);
+ block_updates = TRUE;
ghb_ui_update(ud, "AudioTrack", ghb_settings_get_value(asettings, "AudioTrack"));
ghb_ui_update(ud, "AudioEncoder", ghb_settings_get_value(asettings, "AudioEncoder"));
ghb_settings_set_value(ud->settings, "AudioEncoderActual", ghb_settings_get_value(asettings, "AudioEncoderActual"));
ghb_ui_update(ud, "AudioSamplerate", ghb_settings_get_value(asettings, "AudioSamplerate"));
ghb_ui_update(ud, "AudioMixdown", ghb_settings_get_value(asettings, "AudioMixdown"));
ghb_ui_update(ud, "AudioTrackDRCSlider", ghb_settings_get_value(asettings, "AudioTrackDRCSlider"));
+ block_updates = FALSE;
widget = GHB_WIDGET (ud->builder, "audio_remove");
gtk_widget_set_sensitive(widget, TRUE);
}