diff options
author | jstebbins <[email protected]> | 2011-04-17 20:26:08 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-04-17 20:26:08 +0000 |
commit | 4d2dce20625d08032eb25dd2d98c3d4319d8e0d9 (patch) | |
tree | 182c48f2ccd8afde6c17d9f0151b0eb9bd2f4d29 /gtk/src/audiohandler.c | |
parent | c921f0242dd7da08ea07b9ef5e02d37dd91b020d (diff) |
LinGui: fix a problem with display of audio gain value.
Was not updating properly, showed -1 and -0 when should have been 0.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3936 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/audiohandler.c')
-rw-r--r-- | gtk/src/audiohandler.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c index b490c825a..0e809ebcb 100644 --- a/gtk/src/audiohandler.c +++ b/gtk/src/audiohandler.c @@ -378,7 +378,7 @@ ghb_audio_list_refresh_selected(signal_user_data_t *ud) sr = ghb_settings_combo_option(asettings, "AudioSamplerate"); mix = ghb_settings_combo_option(asettings, "AudioMixdown"); gain = ghb_settings_get_double(asettings, "AudioTrackGain"); - s_gain = g_strdup_printf("%.fdB", gain); + s_gain = g_strdup_printf("%ddB", (int)gain); drc = ghb_settings_get_double(asettings, "AudioTrackDRCSlider"); if (drc < 1.0) @@ -571,6 +571,8 @@ drc_widget_changed_cb(GtkWidget *widget, gdouble val, signal_user_data_t *ud) G_MODULE_EXPORT gchar* format_gain_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud) { + if ( val >= 21.0 ) + return g_strdup_printf("*11*", (int)val); return g_strdup_printf("%ddB", (int)val); } @@ -638,7 +640,7 @@ add_to_audio_list(signal_user_data_t *ud, GValue *settings) sr = ghb_settings_combo_option(settings, "AudioSamplerate"); mix = ghb_settings_combo_option(settings, "AudioMixdown"); gain = ghb_settings_get_double(settings, "AudioTrackGain"); - s_gain = g_strdup_printf("%.fdB", gain); + s_gain = g_strdup_printf("%ddB", (int)gain); drc = ghb_settings_get_double(settings, "AudioTrackDRCSlider"); if (drc < 1.0) |