diff options
Diffstat (limited to 'Gen/GenTrig.swift')
-rw-r--r-- | Gen/GenTrig.swift | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Gen/GenTrig.swift b/Gen/GenTrig.swift new file mode 100644 index 0000000..84bf9cf --- /dev/null +++ b/Gen/GenTrig.swift @@ -0,0 +1,33 @@ +// +// GenTrig.swift +// PrySDR +// +// Created by Jacky Jack on 26/10/2024. +// + +/// Generate sin function as float array +/// - Parameters: +/// - sample_rate: sample rate, how many samples per second +/// - freq: sin frequency +/// - ampl: amplitude +/// - phase: phase of sin +/// - sample_num: number of samples to generate +/// - Returns: Array of floats within range [-ampl ... apml] +/// +func genSin(_ sample_rate: Int,_ freq: Float,_ ampl: Float,_ phase: Float,_ sample_num: Float) -> Array<Float> { + return [0.0] +} + +/// Generate Cos function as float array +/// - Parameters: +/// - sample_rate: sample rate, how many samples per second +/// - freq: sin frequency +/// - ampl: amplitude +/// - phase: phase of sin +/// - sample_num: number of samples to generate +/// - Returns: Array of floats within range [-ampl ... apml] +/// +func genCos(_ sample_rate: Int,_ freq: Float,_ ampl: Float,_ phase: Float,_ sample_num: Float) -> Array<Float> { + return [0.0] +} + |