| 202 | } |
| 203 | |
| 204 | static void |
| 205 | audio_deps(signal_user_data_t *ud, GhbValue *asettings, GtkWidget *widget) |
| 206 | { |
| 207 | ghb_adjust_audio_rate_combos(ud, asettings); |
| 208 | ghb_grey_combo_options(ud); |
| 209 | |
| 210 | int title_id, mix = 0, acodec = 0, sr = 0; |
| 211 | hb_audio_config_t *aconfig = NULL; |
| 212 | const hb_title_t *title; |
| 213 | gboolean qe; |
| 214 | |
| 215 | title_id = ghb_dict_get_int(ud->settings, "title"); |
| 216 | title = ghb_lookup_title(title_id, NULL); |
| 217 | |
| 218 | if (asettings != NULL) |
| 219 | { |
| 220 | int track = ghb_dict_get_int(asettings, "Track"); |
| 221 | acodec = ghb_settings_audio_encoder_codec(asettings, "Encoder"); |
| 222 | aconfig = ghb_get_audio_info(title, track); |
| 223 | mix = ghb_settings_mixdown_mix(asettings, "Mixdown"); |
| 224 | sr = ghb_dict_get_int(asettings, "Samplerate"); |
| 225 | if (sr == 0 && aconfig != NULL) |
| 226 | { |
| 227 | sr = aconfig->in.samplerate; |
| 228 | } |
| 229 | } |
| 230 | |
| 231 | gboolean is_passthru = (acodec & HB_ACODEC_PASS_FLAG); |
| 232 | gboolean enable_drc = TRUE; |
| 233 | if (aconfig != NULL) |
| 234 | { |
| 235 | enable_drc = hb_audio_can_apply_drc(aconfig->in.codec, |
| 236 | aconfig->in.codec_param, acodec) && |
| 237 | !is_passthru; |
| 238 | } |
| 239 | |
| 240 | widget = ghb_builder_widget("AudioTrackDRCSlider"); |
| 241 | gtk_widget_set_sensitive(widget, enable_drc); |
| 242 | widget = ghb_builder_widget("AudioTrackDRCSliderLabel"); |
| 243 | gtk_widget_set_sensitive(widget, enable_drc); |
| 244 | widget = ghb_builder_widget("AudioTrackDRCValue"); |
| 245 | gtk_widget_set_sensitive(widget, enable_drc); |
| 246 | |
| 247 | qe = ghb_dict_get_bool(ud->settings, "AudioTrackQualityEnable"); |
| 248 | enable_quality_widgets(ud, qe, acodec, sr, mix); |
| 249 | |
| 250 | widget = ghb_builder_widget("AudioMixdown"); |
| 251 | gtk_widget_set_sensitive(widget, !is_passthru); |
| 252 | widget = ghb_builder_widget("AudioSamplerate"); |
| 253 | gtk_widget_set_sensitive(widget, !is_passthru); |
| 254 | widget = ghb_builder_widget("AudioTrackGainSlider"); |
| 255 | gtk_widget_set_sensitive(widget, !is_passthru); |
| 256 | widget = ghb_builder_widget("AudioTrackGainValue"); |
| 257 | gtk_widget_set_sensitive(widget, !is_passthru); |
| 258 | } |
| 259 | |
| 260 | gint |
| 261 | ghb_select_audio_codec(gint mux, guint32 in_codec, gint acodec, gint fallback, gint copy_mask) |
no test coverage detected