Nsound
0.9.4
|
#include <Nsound/AudioPlaybackRt.h>
Classes | |
struct | Driver |
Public Member Functions | |
AudioPlaybackRt (float64 sample_rate=44100.0, uint32 channels=1, uint32 n_buffers=3, float64 buffer_size_sec=-1.0) | |
~AudioPlaybackRt () | |
uint32 | getSamplesPerBuffer () const |
float64 | getActualLatencySeconds () const |
void | setBufferUnderrunMode (BufferUnderrunMode bum) |
std::string | getInfo () |
Returns information about the backend driver. More... | |
void | play (const AudioStream &a) |
Writes samples to the internal circular buffer to be played. More... | |
void | play (const Buffer &b) |
Writes samples to the internal circular buffer to be played. More... | |
void | play (float64 sample) |
Writes sample to the internal circular buffer to be played. More... | |
void | play (float64 left, float64 right) |
Writes sample to the internal circular buffer to be played. More... | |
void | stop () |
Stops playback. More... | |
std::string | debug_print () |
AudioPlaybackRtDebug | get_debug_info () const |
void | _swig_shadow () |
Static Public Member Functions | |
static void | use_jack (bool flag) |
Private Types | |
typedef std::vector< int16 > | Int16Vector |
typedef std::vector < Int16Vector * > | Pool |
Private Member Functions | |
AudioPlaybackRt (const AudioPlaybackRt ©) | |
AudioPlaybackRt & | operator= (const AudioPlaybackRt &rhs) |
int | _callback (const void *input, void *output, const uint32 frame_count, const PaStreamCallbackTimeInfo *time_info, PaStreamCallbackFlags status_flags) |
void | _start () |
Static Private Member Functions | |
static int | _pa_callback (const void *input, void *output, unsigned long frame_count, const PaStreamCallbackTimeInfo *time_info, PaStreamCallbackFlags status_flags, void *ap_obj) |
Private Attributes | |
float64 | sample_rate_ |
uint32 | channels_ |
BufferUnderrunMode | underrun_mode_ |
uint32 | underrun_count_ |
uint32 | overrun_count_ |
uint32 | unknown_error_count_ |
uint32 | stop_error_count_ |
uint32 | pa_underrun_count_ |
uint32 | pa_overrun_count_ |
std::vector< uint32 > | n_history_ |
Sine * | sine_ |
Pool | pool_ |
uint32 | pool_size_ |
Pool::iterator | pool_begin_ |
Pool::iterator | pool_end_ |
uint32 | n_ready_ |
Pool::iterator | rd_ptr_ |
Pool::iterator | wr_ptr_ |
uint32 | wr_index_ |
Driver | driver_ |
float64 | actual_latency_sec_ |
Static Private Attributes | |
static bool | use_jack_ = false |
Definition at line 90 of file AudioPlaybackRt.h.
|
private |
Definition at line 159 of file AudioPlaybackRt.h.
|
private |
Definition at line 160 of file AudioPlaybackRt.h.
Nsound::AudioPlaybackRt::AudioPlaybackRt | ( | float64 | sample_rate = 44100.0 , |
uint32 | channels = 1 , |
||
uint32 | n_buffers = 3 , |
||
float64 | buffer_size_sec = -1.0 |
||
) |
Nsound::AudioPlaybackRt::~AudioPlaybackRt | ( | ) |
Definition at line 78 of file AudioPlaybackRt.cc.
|
inlineprivate |
Definition at line 136 of file AudioPlaybackRt.h.
|
inlinestatic |
|
inline |
Definition at line 104 of file AudioPlaybackRt.h.
References driver_, and Nsound::AudioPlaybackRt::Driver::n_samples_per_buffer_.
|
inline |
Definition at line 105 of file AudioPlaybackRt.h.
References actual_latency_sec_.
void Nsound::AudioPlaybackRt::setBufferUnderrunMode | ( | BufferUnderrunMode | bum | ) |
Definition at line 79 of file AudioPlaybackRt.cc.
std::string Nsound::AudioPlaybackRt::getInfo | ( | ) |
Returns information about the backend driver.
Definition at line 80 of file AudioPlaybackRt.cc.
void Nsound::AudioPlaybackRt::play | ( | const AudioStream & | a | ) |
Writes samples to the internal circular buffer to be played.
Definition at line 81 of file AudioPlaybackRt.cc.
Referenced by Nsound::operator>>().
void Nsound::AudioPlaybackRt::play | ( | const Buffer & | b | ) |
Writes samples to the internal circular buffer to be played.
Definition at line 82 of file AudioPlaybackRt.cc.
void Nsound::AudioPlaybackRt::play | ( | float64 | sample | ) |
Writes sample to the internal circular buffer to be played.
Definition at line 83 of file AudioPlaybackRt.cc.
Writes sample to the internal circular buffer to be played.
Definition at line 84 of file AudioPlaybackRt.cc.
void Nsound::AudioPlaybackRt::stop | ( | ) |
std::string Nsound::AudioPlaybackRt::debug_print | ( | ) |
Definition at line 86 of file AudioPlaybackRt.cc.
AudioPlaybackRtDebug Nsound::AudioPlaybackRt::get_debug_info | ( | ) | const |
Definition at line 88 of file AudioPlaybackRt.cc.
|
inline |
Definition at line 131 of file AudioPlaybackRt.h.
|
inlineprivate |
Definition at line 137 of file AudioPlaybackRt.h.
|
private |
|
staticprivate |
|
private |
|
private |
Definition at line 165 of file AudioPlaybackRt.h.
|
private |
Definition at line 166 of file AudioPlaybackRt.h.
|
private |
Definition at line 168 of file AudioPlaybackRt.h.
|
private |
Definition at line 170 of file AudioPlaybackRt.h.
|
private |
Definition at line 171 of file AudioPlaybackRt.h.
|
private |
Definition at line 172 of file AudioPlaybackRt.h.
|
private |
Definition at line 173 of file AudioPlaybackRt.h.
|
private |
Definition at line 175 of file AudioPlaybackRt.h.
|
private |
Definition at line 176 of file AudioPlaybackRt.h.
|
private |
Definition at line 178 of file AudioPlaybackRt.h.
|
private |
Definition at line 180 of file AudioPlaybackRt.h.
|
private |
Definition at line 182 of file AudioPlaybackRt.h.
|
private |
Definition at line 183 of file AudioPlaybackRt.h.
|
private |
Definition at line 185 of file AudioPlaybackRt.h.
|
private |
Definition at line 186 of file AudioPlaybackRt.h.
|
private |
Definition at line 191 of file AudioPlaybackRt.h.
|
private |
Definition at line 194 of file AudioPlaybackRt.h.
|
private |
Definition at line 195 of file AudioPlaybackRt.h.
|
private |
Definition at line 197 of file AudioPlaybackRt.h.
|
private |
Definition at line 220 of file AudioPlaybackRt.h.
Referenced by getSamplesPerBuffer().
|
private |
Definition at line 222 of file AudioPlaybackRt.h.
Referenced by getActualLatencySeconds().
|
staticprivate |
Definition at line 224 of file AudioPlaybackRt.h.
Referenced by use_jack().