42 double sample_rate) = 0;
Abstract base — host-callable audio source.
Definition source.hpp:33
virtual void release_resources()=0
Called when playback is finished.
virtual void get_next_audio_block(BufferView< float > out, int start_sample, int num_samples)=0
Fill num_samples of out, starting at start_sample within out.
virtual void prepare_to_play(int samples_per_block_expected, double sample_rate)=0
Called before playback begins.
virtual ~AudioSource()=default
Non-owning view over multi-channel audio sample data.
Definition buffer.hpp:30
AudioSource with a notion of position.
Definition source.hpp:60
virtual void set_looping(bool)
Enable / disable looping.
Definition source.hpp:82
virtual uint64_t get_total_length() const =0
Total length in frames. 0 means "unknown" or "infinite".
virtual void set_next_read_position(uint64_t new_position)=0
Move the read head to new_position (frames from the start of the source).
virtual uint64_t get_next_read_position() const =0
Current frame position the next get_next_audio_block call will read from.
virtual bool is_looping() const =0
True if the source should wrap back to 0 when it reaches the end.
Definition analyzer_provider.hpp:12