neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neogfx::i_audio_waveform Class Referenceabstract

#include <i_audio_waveform.hpp>

Inheritance diagram for neogfx::i_audio_waveform:
neogfx::i_audio_bitstream neolib::i_reference_counted

Public Types

typedef i_audio_waveform abstract_type
 
- Public Types inherited from neogfx::i_audio_bitstream
typedef i_audio_bitstream abstract_type
 
typedef void * handle
 

Public Member Functions

virtual ~i_audio_waveform ()=default
 
virtual i_audio_oscillatorcreate_oscillator (float aFrequency, float aAmplitude=1.0f, oscillator_function aFunction=oscillator_function::Sine)=0
 
virtual i_audio_oscillatorcreate_oscillator (float aFrequency, float aAmplitude, std::function< float(float)> const &aFunction)=0
 Note: not plugin-safe.
 
virtual i_audio_oscillatoradd_oscillator (i_audio_oscillator &aOscillator)=0
 
virtual i_audio_oscillatoradd_oscillator (i_ref_ptr< i_audio_oscillator > const &aOscillator)=0
 
virtual void remove_oscillator (i_audio_oscillator const &aOscillator)=0
 
- Public Member Functions inherited from neogfx::i_audio_bitstream
virtual ~i_audio_bitstream ()=default
 
virtual audio_sample_rate sample_rate () const =0
 
virtual void set_sample_rate (audio_sample_rate aSampleRate)=0
 
virtual float amplitude () const =0
 
virtual void set_amplitude (float aAmplitude)=0
 
virtual bool has_envelope () const =0
 
virtual adsr_envelope const & envelope () const =0
 
virtual void clear_envelope ()=0
 
virtual void set_envelope (adsr_envelope const &aEnvelope)=0
 
virtual audio_frame_count length () const =0
 
virtual void generate (audio_channel aChannel, audio_frame_count aFrameCount, float *aOutputFrames)=0
 
virtual void generate_from (audio_channel aChannel, audio_frame_index aFrameFrom, audio_frame_count aFrameCount, float *aOutputFrames)=0
 
- Public Member Functions inherited from neolib::i_reference_counted
virtual ~i_reference_counted ()=default
 
virtual void add_ref () const noexcept=0
 
virtual void release () const =0
 
virtual int32_t use_count () const noexcept=0
 
virtual const i_reference_countedrelease_and_take_ownership () const =0
 
virtual i_reference_countedrelease_and_take_ownership ()=0
 
virtual void pin () const noexcept=0
 
virtual void unpin () const =0
 
virtual i_ref_control_blockcontrol_block ()=0
 

Detailed Description

Definition at line 29 of file i_audio_waveform.hpp.

Member Typedef Documentation

◆ abstract_type

Constructor & Destructor Documentation

◆ ~i_audio_waveform()

virtual neogfx::i_audio_waveform::~i_audio_waveform ( )
virtualdefault

Member Function Documentation

◆ add_oscillator() [1/2]

virtual i_audio_oscillator & neogfx::i_audio_waveform::add_oscillator ( i_audio_oscillator aOscillator)
pure virtual

◆ add_oscillator() [2/2]

virtual i_audio_oscillator & neogfx::i_audio_waveform::add_oscillator ( i_ref_ptr< i_audio_oscillator > const &  aOscillator)
pure virtual

◆ create_oscillator() [1/2]

virtual i_audio_oscillator & neogfx::i_audio_waveform::create_oscillator ( float  aFrequency,
float  aAmplitude,
std::function< float(float)> const &  aFunction 
)
pure virtual

Note: not plugin-safe.

◆ create_oscillator() [2/2]

virtual i_audio_oscillator & neogfx::i_audio_waveform::create_oscillator ( float  aFrequency,
float  aAmplitude = 1.0f,
oscillator_function  aFunction = oscillator_function::Sine 
)
pure virtual

◆ remove_oscillator()

virtual void neogfx::i_audio_waveform::remove_oscillator ( i_audio_oscillator const &  aOscillator)
pure virtual

The documentation for this class was generated from the following file: