volume: Store volume as a double for consistency with the property type

And the potential increased precision, which shouldn't matter much here.

https://bugzilla.gnome.org/show_bug.cgi?id=781149
This commit is contained in:
Sebastian Dröge 2017-04-11 11:16:33 +03:00
parent ceef16b197
commit 711504aad1
2 changed files with 4 additions and 4 deletions

View file

@ -230,7 +230,7 @@ volume_choose_func (GstVolume * self, const GstAudioInfo * info)
static gboolean
volume_update_volume (GstVolume * self, const GstAudioInfo * info,
gfloat volume, gboolean mute)
gdouble volume, gboolean mute)
{
gboolean passthrough;
gboolean res;
@ -647,7 +647,7 @@ volume_setup (GstAudioFilter * filter, const GstAudioInfo * info)
{
gboolean res;
GstVolume *self = GST_VOLUME (filter);
gfloat volume;
gdouble volume;
gboolean mute;
GST_OBJECT_LOCK (self);
@ -687,7 +687,7 @@ volume_before_transform (GstBaseTransform * base, GstBuffer * buffer)
{
GstClockTime timestamp;
GstVolume *self = GST_VOLUME (base);
gfloat volume;
gdouble volume;
gboolean mute;
timestamp = GST_BUFFER_TIMESTAMP (buffer);

View file

@ -61,7 +61,7 @@ struct _GstVolume {
gfloat volume;
gboolean current_mute;
gfloat current_volume;
gdouble current_volume;
gint current_vol_i32;
gint current_vol_i24; /* the _i(nt) values get synchronized with the */