| 445 | } |
| 446 | |
| 447 | static void |
| 448 | audio_update_dialog_widgets(signal_user_data_t *ud, GhbValue *asettings) |
| 449 | { |
| 450 | if (asettings != NULL) |
| 451 | { |
| 452 | double gain, drc, quality, qualityx; |
| 453 | char *s_gain, *s_drc, *s_quality; |
| 454 | gboolean qe; |
| 455 | |
| 456 | block_updates = TRUE; |
| 457 | ghb_ui_update("AudioTrack", |
| 458 | ghb_dict_get_value(asettings, "Track")); |
| 459 | ghb_ui_update("AudioEncoder", |
| 460 | ghb_dict_get_value(asettings, "Encoder")); |
| 461 | ghb_ui_update("AudioBitrate", |
| 462 | ghb_dict_get_value(asettings, "Bitrate")); |
| 463 | GhbValue *val = ghb_dict_get_value(asettings, "Name"); |
| 464 | if (val != NULL) |
| 465 | { |
| 466 | ghb_ui_update("AudioTrackName", val); |
| 467 | } |
| 468 | else |
| 469 | { |
| 470 | ghb_ui_update("AudioTrackName", ghb_string_value("")); |
| 471 | } |
| 472 | ghb_ui_update("AudioSamplerate", |
| 473 | ghb_dict_get_value(asettings, "Samplerate")); |
| 474 | ghb_ui_update("AudioMixdown", |
| 475 | ghb_dict_get_value(asettings, "Mixdown")); |
| 476 | ghb_ui_update("AudioTrackDRCSlider", |
| 477 | ghb_dict_get_value(asettings, "DRC")); |
| 478 | drc = ghb_dict_get_double(asettings, "DRC"); |
| 479 | s_drc = get_drc_string(drc); |
| 480 | ghb_ui_update("AudioTrackDRCValue", ghb_string_value(s_drc)); |
| 481 | free(s_drc); |
| 482 | ghb_ui_update("AudioTrackGainSlider", |
| 483 | ghb_dict_get_value(asettings, "Gain")); |
| 484 | gain = ghb_dict_get_double(asettings, "Gain"); |
| 485 | s_gain = get_gain_string(gain); |
| 486 | ghb_ui_update("AudioTrackGainValue", ghb_string_value(s_gain)); |
| 487 | g_free(s_gain); |
| 488 | |
| 489 | int codec = ghb_settings_audio_encoder_codec(asettings, "Encoder"); |
| 490 | quality = ghb_dict_get_double(asettings, "Quality"); |
| 491 | qualityx = get_quality(codec, quality); |
| 492 | ghb_ui_update("AudioTrackQualityX", ghb_double_value(qualityx)); |
| 493 | s_quality = get_quality_string(codec, quality); |
| 494 | ghb_ui_update("AudioTrackQualityValue", ghb_string_value(s_quality)); |
| 495 | free(s_quality); |
| 496 | // Setting a radio button to FALSE does not automatically make |
| 497 | // the other one TRUE |
| 498 | qe = ghb_audio_quality_enabled(asettings); |
| 499 | if (qe) |
| 500 | { |
| 501 | ghb_ui_update("AudioTrackQualityEnable", |
| 502 | ghb_bool_value_new(qe)); |
| 503 | } |
| 504 | else |
no test coverage detected