Nsound
0.9.4
|
#include <Nsound/AudioBackend.h>
Public Types | |
enum | State { BACKEND_NOT_INITIALIZED, BACKEND_READY, BACKEND_ERROR } |
Public Member Functions | |
AudioBackend (uint32 sample_rate=44100, uint32 channels=1, uint32 bits_per_sample=16) | |
virtual | ~AudioBackend () |
virtual AudioBackendType | getBackendType ()=0 |
uint32 | getBitsPerSample () |
uint32 | getChannels () |
virtual std::string | getError ()=0 |
virtual std::string | getInfo ()=0 |
uint32 | getSampleRate () |
State | getState () |
std::string | getStateString () |
Returns the backend state. More... | |
virtual void | initialize ()=0 |
virtual void | play (void *data, uint32 n_bytes)=0 |
virtual void | scanDevices (AudioPlayback &pb, const AudioStream &test_clip)=0 |
virtual void | setOption (const std::string &key, const std::string &value)=0 |
virtual void | shutdown ()=0 |
Static Public Member Functions | |
static std::string | getStateString (const AudioBackend::State &state) |
Returns the backend state string. More... | |
Protected Attributes | |
uint32 | sample_rate_ |
uint32 | channels_ |
uint32 | bits_per_sample_ |
State | state_ |
Definition at line 48 of file AudioBackend.h.
Enumerator | |
---|---|
BACKEND_NOT_INITIALIZED | |
BACKEND_READY | |
BACKEND_ERROR |
Definition at line 52 of file AudioBackend.h.
|
inline |
Definition at line 59 of file AudioBackend.h.
|
inlinevirtual |
Definition at line 70 of file AudioBackend.h.
|
pure virtual |
Implemented in Nsound::AudioBackendLibportaudio, and Nsound::AudioBackendLibao.
|
inline |
Definition at line 77 of file AudioBackend.h.
References bits_per_sample_.
Referenced by Nsound::AudioPlayback::getBitsPerSample().
|
inline |
Definition at line 80 of file AudioBackend.h.
References channels_.
Referenced by Nsound::AudioPlayback::getChannels(), and play_int().
|
pure virtual |
Implemented in Nsound::AudioBackendLibportaudio, and Nsound::AudioBackendLibao.
Referenced by Nsound::AudioPlayback::getError(), Nsound::AudioPlayback::initialize(), and Nsound::AudioPlayback::scanDevices().
|
pure virtual |
Implemented in Nsound::AudioBackendLibportaudio, and Nsound::AudioBackendLibao.
Referenced by Nsound::AudioPlayback::getInfo().
|
inline |
Definition at line 91 of file AudioBackend.h.
References sample_rate_.
Referenced by Nsound::AudioPlayback::getSampleRate().
|
inline |
Definition at line 94 of file AudioBackend.h.
References state_.
Referenced by Nsound::AudioPlayback::getState(), Nsound::AudioPlayback::initialize(), Nsound::AudioPlayback::scanDevices(), and Nsound::AudioPlayback::setOption().
std::string AudioBackend::getStateString | ( | ) |
Returns the backend state.
Definition at line 43 of file AudioBackend.cc.
References state_, and state_strings.
Referenced by Nsound::AudioPlayback::getStateString().
|
static |
Returns the backend state string.
Definition at line 51 of file AudioBackend.cc.
References BACKEND_ERROR, BACKEND_NOT_INITIALIZED, and state_strings.
|
pure virtual |
Implemented in Nsound::AudioBackendLibportaudio, and Nsound::AudioBackendLibao.
Referenced by Nsound::AudioPlayback::initialize().
|
pure virtual |
Implemented in Nsound::AudioBackendLibportaudio, and Nsound::AudioBackendLibao.
Referenced by play_int().
|
pure virtual |
Implemented in Nsound::AudioBackendLibportaudio, and Nsound::AudioBackendLibao.
Referenced by Nsound::AudioPlayback::scanDevices().
|
pure virtual |
Implemented in Nsound::AudioBackendLibportaudio, and Nsound::AudioBackendLibao.
Referenced by Nsound::AudioPlayback::setOption().
|
pure virtual |
Implemented in Nsound::AudioBackendLibportaudio, and Nsound::AudioBackendLibao.
Referenced by Nsound::AudioPlayback::shutdown(), and Nsound::AudioPlayback::~AudioPlayback().
|
protected |
Definition at line 127 of file AudioBackend.h.
Referenced by getSampleRate(), Nsound::AudioBackendLibao::initialize(), and Nsound::AudioBackendLibportaudio::initialize().
|
protected |
Definition at line 128 of file AudioBackend.h.
Referenced by getChannels(), Nsound::AudioBackendLibao::initialize(), and Nsound::AudioBackendLibportaudio::initialize().
|
protected |
Definition at line 129 of file AudioBackend.h.
Referenced by getBitsPerSample(), Nsound::AudioBackendLibao::initialize(), and Nsound::AudioBackendLibportaudio::initialize().
|
protected |
Definition at line 130 of file AudioBackend.h.
Referenced by Nsound::AudioBackendLibao::getInfo(), Nsound::AudioBackendLibportaudio::getInfo(), getState(), getStateString(), Nsound::AudioBackendLibao::initialize(), Nsound::AudioBackendLibportaudio::initialize(), Nsound::AudioBackendLibao::play(), Nsound::AudioBackendLibportaudio::play(), Nsound::AudioBackendLibao::setOption(), Nsound::AudioBackendLibportaudio::setOption(), Nsound::AudioBackendLibao::shutdown(), Nsound::AudioBackendLibportaudio::shutdown(), and Nsound::AudioBackendLibportaudio::~AudioBackendLibportaudio().