mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
Add control properties to audiotestsrc
Add control properties to audiotestsrc for frequency and volume and add a test program. Add size parameter to set_io for additional checks and to make it easy to know how much control data we can write.
This commit is contained in:
parent
8efea3e1ea
commit
a092b9312a
28 changed files with 774 additions and 64 deletions
|
|
@ -27,10 +27,12 @@ audio_test_src_create_sine_##type (struct impl *this, type *samples, size_t n_sa
|
|||
{ \
|
||||
int i, c, channels; \
|
||||
double step, amp; \
|
||||
double freq = *this->io_freq; \
|
||||
double volume = *this->io_volume; \
|
||||
\
|
||||
channels = this->current_format.info.raw.channels; \
|
||||
step = M_PI_M2 * this->props.freq / this->current_format.info.raw.rate; \
|
||||
amp = this->props.volume * scale; \
|
||||
step = M_PI_M2 * freq / this->current_format.info.raw.rate; \
|
||||
amp = volume * scale; \
|
||||
\
|
||||
for (i = 0; i < n_samples; i++) { \
|
||||
type val; \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue