![]() |
Mixxx
|
#include <soundmanager.h>
Signals | |
void | devicesUpdated () |
void | devicesSetup () |
void | outputRegistered (AudioOutput output, const AudioSource *src) |
void | inputRegistered (AudioInput input, AudioDestination *dest) |
Public Member Functions | |
SoundManager (ConfigObject< ConfigValue > *pConfig, EngineMaster *_master) | |
~SoundManager () | |
const EngineMaster * | getEngine () const |
QList< SoundDevice * > | getDeviceList (QString filterAPI, bool bOutputDevices, bool bInputDevices) |
void | closeDevices () |
void | clearDeviceList () |
void | queryDevices () |
int | setupDevices () |
SoundDevice * | getErrorDevice () const |
QList< unsigned int > | getSampleRates (QString api) const |
QList< unsigned int > | getSampleRates () const |
QList< QString > | getHostAPIList () const |
SoundManagerConfig | getConfig () const |
int | setConfig (SoundManagerConfig config) |
void | checkConfig () |
QHash< AudioOutput, const CSAMPLE * > | requestBuffer (QList< AudioOutput > outputs, unsigned long iFramesPerBuffer, SoundDevice *device, double streamTime=0) |
void | pushBuffer (QList< AudioInput > inputs, short *inputBuffer, unsigned long iFramesPerBuffer, unsigned int iFrameSize) |
void | registerOutput (AudioOutput output, const AudioSource *src) |
void | registerInput (AudioInput input, AudioDestination *dest) |
QList< AudioOutput > | registeredOutputs () const |
QList< AudioInput > | registeredInputs () const |
Definition at line 40 of file soundmanager.h.
SoundManager::SoundManager | ( | ConfigObject< ConfigValue > * | pConfig, |
EngineMaster * | pMaster | ||
) |
Initializes Mixxx's audio core
pConfig | The config key table |
pMaster | A pointer to the audio engine's mastering class. |
Definition at line 42 of file soundmanager.cpp.
SoundManager::~SoundManager | ( | ) |
Destructor for the SoundManager class. Closes all the devices, cleans up their pointers and terminates PortAudio.
Definition at line 89 of file soundmanager.cpp.
void SoundManager::checkConfig | ( | ) |
Definition at line 500 of file soundmanager.cpp.
void SoundManager::clearDeviceList | ( | ) |
Closes all the devices and empties the list of devices we have.
Definition at line 254 of file soundmanager.cpp.
void SoundManager::closeDevices | ( | ) |
Closes all the open sound devices.
Because multiple soundcards might be open, this member function simply runs through the list of all known soundcards (from PortAudio) and attempts to close them all. Closing a soundcard that isn't open is safe.
Definition at line 215 of file soundmanager.cpp.
void SoundManager::devicesSetup | ( | ) | [signal] |
void SoundManager::devicesUpdated | ( | ) | [signal] |
SoundManagerConfig SoundManager::getConfig | ( | ) | const |
QList< SoundDevice * > SoundManager::getDeviceList | ( | QString | filterAPI, |
bool | bOutputDevices, | ||
bool | bInputDevices | ||
) |
Returns a list of all the devices we've enumerated through PortAudio.
filterAPI | If filterAPI is the name of an audio API used by PortAudio, this function will only return devices that belong to that API. Otherwise, the list will contain all devices on all PortAudio-supported APIs. |
bOutputDevices | If bOutputDevices is true, then devices supporting audio output will be listed. |
bInputDevices | If bInputDevices is true, then devices supporting audio input will be listed too. |
Definition at line 146 of file soundmanager.cpp.
const EngineMaster * SoundManager::getEngine | ( | ) | const |
Returns a pointer to the EngineMaster instance this SoundManager is using.
Definition at line 131 of file soundmanager.cpp.
SoundDevice * SoundManager::getErrorDevice | ( | ) | const |
QList< QString > SoundManager::getHostAPIList | ( | ) | const |
Get a list of host APIs supported by PortAudio.
Definition at line 193 of file soundmanager.cpp.
QList< unsigned int > SoundManager::getSampleRates | ( | QString | api | ) | const |
Returns a list of samplerates we will attempt to support for a given API.
API | a string describing the API, some APIs support a more limited subset of APIs (for instance, JACK) |
Definition at line 281 of file soundmanager.cpp.
QList< unsigned int > SoundManager::getSampleRates | ( | ) | const |
Convenience overload for SoundManager::getSampleRates(QString)
Definition at line 298 of file soundmanager.cpp.
void SoundManager::inputRegistered | ( | AudioInput | input, |
AudioDestination * | dest | ||
) | [signal] |
void SoundManager::outputRegistered | ( | AudioOutput | output, |
const AudioSource * | src | ||
) | [signal] |
void SoundManager::pushBuffer | ( | QList< AudioInput > | inputs, |
short * | inputBuffer, | ||
unsigned long | iFramesPerBuffer, | ||
unsigned int | iFrameSize | ||
) |
If the framesize is only 2, then we only have one pair of input channels That means we don't have to do any deinterlacing, and we can pass the audio on to its intended destination.
Definition at line 568 of file soundmanager.cpp.
void SoundManager::queryDevices | ( | ) |
Definition at line 304 of file soundmanager.cpp.
QList< AudioInput > SoundManager::registeredInputs | ( | ) | const |
Definition at line 699 of file soundmanager.cpp.
QList< AudioOutput > SoundManager::registeredOutputs | ( | ) | const |
Definition at line 695 of file soundmanager.cpp.
void SoundManager::registerInput | ( | AudioInput | input, |
AudioDestination * | dest | ||
) |
Definition at line 685 of file soundmanager.cpp.
void SoundManager::registerOutput | ( | AudioOutput | output, |
const AudioSource * | src | ||
) |
Definition at line 677 of file soundmanager.cpp.
QHash< AudioOutput, const CSAMPLE * > SoundManager::requestBuffer | ( | QList< AudioOutput > | outputs, |
unsigned long | iFramesPerBuffer, | ||
SoundDevice * | device, | ||
double | streamTime = 0 |
||
) |
Definition at line 514 of file soundmanager.cpp.
int SoundManager::setConfig | ( | SoundManagerConfig | config | ) |
Definition at line 483 of file soundmanager.cpp.
int SoundManager::setupDevices | ( | ) |
Definition at line 365 of file soundmanager.cpp.