Mixxx

SoundManager Class Reference

#include <soundmanager.h>

Collaboration diagram for SoundManager:

List of all members.

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 EngineMastergetEngine () const
QList< SoundDevice * > getDeviceList (QString filterAPI, bool bOutputDevices, bool bInputDevices)
void closeDevices ()
void clearDeviceList ()
void queryDevices ()
int setupDevices ()
SoundDevicegetErrorDevice () 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< AudioOutputregisteredOutputs () const
QList< AudioInputregisteredInputs () const

Detailed Description

Definition at line 40 of file soundmanager.h.


Constructor & Destructor Documentation

SoundManager::SoundManager ( ConfigObject< ConfigValue > *  pConfig,
EngineMaster pMaster 
)

Initializes Mixxx's audio core

Parameters:
pConfigThe config key table
pMasterA pointer to the audio engine's mastering class.

Definition at line 42 of file soundmanager.cpp.

Here is the call graph for this function:

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.

Here is the call graph for this function:


Member Function Documentation

void SoundManager::checkConfig ( )

Definition at line 500 of file soundmanager.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void SoundManager::clearDeviceList ( )

Closes all the devices and empties the list of devices we have.

Definition at line 254 of file soundmanager.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the caller graph for this function:

void SoundManager::devicesSetup ( ) [signal]

Here is the caller graph for this function:

void SoundManager::devicesUpdated ( ) [signal]

Here is the caller graph for this function:

SoundManagerConfig SoundManager::getConfig ( ) const

Definition at line 479 of file soundmanager.cpp.

Here is the caller graph for this function:

QList< SoundDevice * > SoundManager::getDeviceList ( QString  filterAPI,
bool  bOutputDevices,
bool  bInputDevices 
)

Returns a list of all the devices we've enumerated through PortAudio.

Parameters:
filterAPIIf 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.
bOutputDevicesIf bOutputDevices is true, then devices supporting audio output will be listed.
bInputDevicesIf bInputDevices is true, then devices supporting audio input will be listed too.

Definition at line 146 of file soundmanager.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const EngineMaster * SoundManager::getEngine ( ) const

Returns a pointer to the EngineMaster instance this SoundManager is using.

Note:
pointer is const at this point because this is only being inserted so that the prefs can find out how many channels there are and I feel uneasy about providing mutable access to the engine. Make it non-const if you end up needing a non-const pointer to the engine where you only have SoundMan.

Definition at line 131 of file soundmanager.cpp.

SoundDevice * SoundManager::getErrorDevice ( ) const

Definition at line 475 of file soundmanager.cpp.

Here is the caller graph for this function:

QList< QString > SoundManager::getHostAPIList ( ) const

Get a list of host APIs supported by PortAudio.

Returns:
The list of audio APIs supported on the current computer.

Definition at line 193 of file soundmanager.cpp.

Here is the caller graph for this function:

QList< unsigned int > SoundManager::getSampleRates ( QString  api) const

Returns a list of samplerates we will attempt to support for a given API.

Parameters:
APIa string describing the API, some APIs support a more limited subset of APIs (for instance, JACK)
Returns:
The list of available samplerates.

Definition at line 281 of file soundmanager.cpp.

Here is the caller graph for this function:

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]

Here is the caller graph for this function:

void SoundManager::outputRegistered ( AudioOutput  output,
const AudioSource src 
) [signal]

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

void SoundManager::queryDevices ( )

Definition at line 304 of file soundmanager.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

void SoundManager::registerOutput ( AudioOutput  output,
const AudioSource src 
)

Definition at line 677 of file soundmanager.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

int SoundManager::setConfig ( SoundManagerConfig  config)

Definition at line 483 of file soundmanager.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int SoundManager::setupDevices ( )

Definition at line 365 of file soundmanager.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines