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

#include <i_audio_instrument.hpp>

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

Public Types

typedef i_audio_instrument abstract_type
 
typedef audio_frame_index time_point
 
typedef audio_frame_count time_interval
 
- Public Types inherited from neogfx::i_audio_bitstream
typedef i_audio_bitstream abstract_type
 
typedef void * handle
 

Public Member Functions

virtual ~i_audio_instrument ()=default
 
virtual time_point play_note (note aNote, std::chrono::duration< double > const &aDuration, float aAmplitude=1.0f)=0
 
virtual time_point play_note (std::chrono::duration< double > const &aWhen, note aNote, std::chrono::duration< double > const &aDuration, float aAmplitude=1.0f)=0
 
virtual time_point play_note (time_point aWhen, note aNote, std::chrono::duration< double > const &aDuration, float aAmplitude=1.0f)=0
 
virtual time_point rest (std::chrono::duration< double > const &aDuration)=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_instrument.hpp.

Member Typedef Documentation

◆ abstract_type

◆ time_interval

◆ time_point

Constructor & Destructor Documentation

◆ ~i_audio_instrument()

virtual neogfx::i_audio_instrument::~i_audio_instrument ( )
virtualdefault

Member Function Documentation

◆ play_note() [1/3]

virtual time_point neogfx::i_audio_instrument::play_note ( note  aNote,
std::chrono::duration< double > const &  aDuration,
float  aAmplitude = 1.0f 
)
pure virtual

◆ play_note() [2/3]

virtual time_point neogfx::i_audio_instrument::play_note ( std::chrono::duration< double > const &  aWhen,
note  aNote,
std::chrono::duration< double > const &  aDuration,
float  aAmplitude = 1.0f 
)
pure virtual

◆ play_note() [3/3]

virtual time_point neogfx::i_audio_instrument::play_note ( time_point  aWhen,
note  aNote,
std::chrono::duration< double > const &  aDuration,
float  aAmplitude = 1.0f 
)
pure virtual

◆ rest()

virtual time_point neogfx::i_audio_instrument::rest ( std::chrono::duration< double > const &  aDuration)
pure virtual

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