diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2014-05-23 19:21:35 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2014-05-23 19:21:35 +0100 |
commit | 64b4b2a20a08f068dccef41137698f40eb5ff928 (patch) | |
tree | 28a49106c936213e102ad15d901c0e126dcc4c48 /tools/gst-play.c | |
parent | cf4c70265b32331d20b20d9fda2a31b369d149d7 (diff) |
tools: play: use cubic volume factor when adjusting volume
This is more natural and better-suited for a playback application.
Diffstat (limited to 'tools/gst-play.c')
-rw-r--r-- | tools/gst-play.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/gst-play.c b/tools/gst-play.c index ae68eff4e..c467439e4 100644 --- a/tools/gst-play.c +++ b/tools/gst-play.c @@ -169,13 +169,13 @@ play_set_relative_volume (GstPlay * play, gdouble volume_step) gdouble volume; volume = gst_stream_volume_get_volume (GST_STREAM_VOLUME (play->playbin), - GST_STREAM_VOLUME_FORMAT_LINEAR); + GST_STREAM_VOLUME_FORMAT_CUBIC); volume = round ((volume + volume_step) * VOLUME_STEPS) / VOLUME_STEPS; volume = CLAMP (volume, 0.0, 10.0); gst_stream_volume_set_volume (GST_STREAM_VOLUME (play->playbin), - GST_STREAM_VOLUME_FORMAT_LINEAR, volume); + GST_STREAM_VOLUME_FORMAT_CUBIC, volume); g_print ("Volume: %.0f%% \n", volume * 100); } |