mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
volume: Implement f64 scaling with orc
This requires orc 0.4.10
This commit is contained in:
parent
f5e9d8bb62
commit
ac38fbc3a7
2 changed files with 7 additions and 6 deletions
|
@ -502,13 +502,8 @@ volume_process_double (GstVolume * self, gpointer bytes, guint n_bytes)
|
|||
{
|
||||
gdouble *data = (gdouble *) bytes;
|
||||
guint num_samples = n_bytes / sizeof (gdouble);
|
||||
int i;
|
||||
|
||||
gdouble vol = self->current_volume;
|
||||
|
||||
for (i = 0; i < num_samples; i++) {
|
||||
data[i] *= vol;
|
||||
}
|
||||
orc_scalarmultiply_f64_ns (data, self->current_volume, num_samples);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
|
||||
.init gst_volume_orc_init
|
||||
|
||||
.function orc_scalarmultiply_f64_ns
|
||||
.dest 8 d1 double
|
||||
.floatparam 8 p1
|
||||
|
||||
muld d1, d1, p1
|
||||
|
||||
.function orc_scalarmultiply_f32_ns
|
||||
.dest 4 d1 float
|
||||
.floatparam 4 p1
|
||||
|
|
Loading…
Reference in a new issue