diff options
author | XANTRONIX Development | 2022-02-28 13:13:12 -0500 |
---|---|---|
committer | XANTRONIX Development | 2022-02-28 13:13:12 -0500 |
commit | 4152e6845e71344142faf0911382d5a2b05ae1e4 (patch) | |
tree | a13b62afaec955c38911786c578b381157943d1d /include/xas | |
parent | 8723f399b2e63693d0e90a1b0af87be865069e22 (diff) | |
download | xas-4152e6845e71344142faf0911382d5a2b05ae1e4.tar.gz xas-4152e6845e71344142faf0911382d5a2b05ae1e4.tar.bz2 xas-4152e6845e71344142faf0911382d5a2b05ae1e4.zip |
Allow setting synth gain
Diffstat (limited to 'include/xas')
-rw-r--r-- | include/xas/synth.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/xas/synth.h b/include/xas/synth.h index 61f50bc..c13c53e 100644 --- a/include/xas/synth.h +++ b/include/xas/synth.h @@ -7,6 +7,7 @@ #include <xas/object.h> #include <xas/audio.h> +#define XAS_SYNTH_DEFAULT_GAIN 1.0f #define XAS_SYNTH_DEFAULT_FREQUENCY 2600 /* Hz */ enum xas_synth_type { @@ -36,7 +37,9 @@ struct _xas_synth { xas_synth_sample_callback sample; - float phase; + float phase, + gain; + size_t frequency; }; @@ -46,6 +49,8 @@ xas_synth *xas_synth_new(xas_audio_format format, void xas_synth_destroy(xas_synth *synth); +void xas_synth_set_gain(xas_synth *synth, float gain); + void xas_synth_set_frequency(xas_synth *synth, size_t frequency); void xas_synth_start(xas_synth *synth); |