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

◆ update_phase_increment()

void MayaFlux::Nodes::Generator::Impulse::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 impulses at the specified frequency at the current sample rate.

Definition at line 57 of file Impulse.cpp.

58{
59 uint64_t s_rate = 48000U;
61 s_rate = Config::get_sample_rate();
62 }
63 m_phase_inc = frequency / (double)s_rate;
64}
double m_phase_inc
Phase increment per sample.
Definition Impulse.hpp:247
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 Impulse(), Impulse(), Impulse(), Impulse(), process_sample(), and set_frequency().

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