MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ update_phase_increment()

void MayaFlux::Nodes::Generator::Phasor::update_phase_increment ( double  frequency)
private

Updates the phase increment based on a new frequency.

Parameters
frequencyNew frequency in Hz

This method calculates the phase increment needed to produce a complete cycle at the specified frequency at the current sample rate.

Definition at line 60 of file Phasor.cpp.

61{
62 uint64_t s_rate = 48000U;
64 s_rate = Config::get_sample_rate();
65 }
66 m_phase_inc = frequency / (double)s_rate;
67}
double m_phase_inc
Phase increment per sample.
Definition Phasor.hpp:294
uint32_t get_sample_rate()
Gets the sample rate from the default engine.
Definition Config.cpp:46
bool is_engine_initialized()
Checks if the default audio engine is initialized.
Definition Config.cpp:9

References MayaFlux::Config::get_sample_rate(), MayaFlux::is_engine_initialized(), and m_phase_inc.

Referenced by Phasor(), Phasor(), Phasor(), Phasor(), process_sample(), reset(), and set_frequency().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: