Mixxx

SoundManagerConfig Class Reference

#include <soundmanagerconfig.h>

List of all members.

Public Types

enum  Defaults { API = (1 << 0), DEVICES = (1 << 1), OTHER = (1 << 2), ALL = (API | DEVICES | OTHER) }

Public Member Functions

 SoundManagerConfig ()
 ~SoundManagerConfig ()
bool readFromDisk ()
bool writeToDisk () const
QString getAPI () const
void setAPI (const QString &api)
bool checkAPI (const SoundManager &soundManager)
unsigned int getSampleRate () const
void setSampleRate (unsigned int sampleRate)
bool checkSampleRate (const SoundManager &soundManager)
unsigned int getLatency () const
unsigned int getFramesPerBuffer () const
void setLatency (unsigned int latency)
void addOutput (const QString &device, const AudioOutput &out)
void addInput (const QString &device, const AudioInput &in)
QMultiHash< QString, AudioOutputgetOutputs () const
QMultiHash< QString, AudioInputgetInputs () const
void clearOutputs ()
void clearInputs ()
void filterOutputs (SoundManager *soundManager)
void filterInputs (SoundManager *soundManager)
void loadDefaults (SoundManager *soundManager, unsigned int flags)

Static Public Attributes

static const unsigned int kMaxLatency = 7
static const QString kDefaultAPI = QString("None")
static const unsigned int kDefaultSampleRate = 48000
static const int kDefaultLatency = 5

Detailed Description

Definition at line 30 of file soundmanagerconfig.h.


Member Enumeration Documentation

Enumerator:
API 
DEVICES 
OTHER 
ALL 

Definition at line 32 of file soundmanagerconfig.h.


Constructor & Destructor Documentation

SoundManagerConfig::SoundManagerConfig ( )

Definition at line 29 of file soundmanagerconfig.cpp.

SoundManagerConfig::~SoundManagerConfig ( )

Definition at line 39 of file soundmanagerconfig.cpp.


Member Function Documentation

void SoundManagerConfig::addInput ( const QString &  device,
const AudioInput in 
)

Definition at line 222 of file soundmanagerconfig.cpp.

Here is the caller graph for this function:

void SoundManagerConfig::addOutput ( const QString &  device,
const AudioOutput out 
)

Definition at line 218 of file soundmanagerconfig.cpp.

Here is the caller graph for this function:

bool SoundManagerConfig::checkAPI ( const SoundManager soundManager)

Checks that the API in the object is valid according to the list of APIs given by SoundManager.

Returns:
false if the API is not found in SoundManager's list, otherwise true

Definition at line 158 of file soundmanagerconfig.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool SoundManagerConfig::checkSampleRate ( const SoundManager soundManager)

Checks that the sample rate in the object is valid according to the list of sample rates given by SoundManager.

Returns:
false if the sample rate is not found in SoundManager's list, otherwise true

Definition at line 180 of file soundmanagerconfig.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void SoundManagerConfig::clearInputs ( )

Definition at line 238 of file soundmanagerconfig.cpp.

Here is the caller graph for this function:

void SoundManagerConfig::clearOutputs ( )

Definition at line 234 of file soundmanagerconfig.cpp.

Here is the caller graph for this function:

void SoundManagerConfig::filterInputs ( SoundManager soundManager)

Removes any inputs with devices that do not exist in the given SoundManager.

Definition at line 266 of file soundmanagerconfig.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void SoundManagerConfig::filterOutputs ( SoundManager soundManager)

Removes any outputs with devices that do not exist in the given SoundManager.

Definition at line 246 of file soundmanagerconfig.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString SoundManagerConfig::getAPI ( ) const

Definition at line 142 of file soundmanagerconfig.cpp.

Here is the caller graph for this function:

unsigned int SoundManagerConfig::getFramesPerBuffer ( ) const

Definition at line 191 of file soundmanagerconfig.cpp.

Here is the caller graph for this function:

QMultiHash< QString, AudioInput > SoundManagerConfig::getInputs ( ) const

Definition at line 230 of file soundmanagerconfig.cpp.

Here is the caller graph for this function:

unsigned int SoundManagerConfig::getLatency ( ) const

Definition at line 187 of file soundmanagerconfig.cpp.

QMultiHash< QString, AudioOutput > SoundManagerConfig::getOutputs ( ) const

Definition at line 226 of file soundmanagerconfig.cpp.

Here is the caller graph for this function:

unsigned int SoundManagerConfig::getSampleRate ( ) const

Definition at line 165 of file soundmanagerconfig.cpp.

Here is the caller graph for this function:

void SoundManagerConfig::loadDefaults ( SoundManager soundManager,
unsigned int  flags 
)

Loads default values for API, master output, sample rate and/or latency.

Parameters:
soundManagerpointer to SoundManager instance to load data from
flagsBitfield to determine which defaults to load, use something like SoundManagerConfig::API | SoundManagerConfig::DEVICES to load default API and master device.

Definition at line 289 of file soundmanagerconfig.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool SoundManagerConfig::readFromDisk ( )

Read the SoundManagerConfig xml serialization at the predetermined path

Returns:
false if the file can't be read or is invalid XML, true otherwise

Definition at line 49 of file soundmanagerconfig.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void SoundManagerConfig::setAPI ( const QString &  api)

Definition at line 146 of file soundmanagerconfig.cpp.

Here is the caller graph for this function:

void SoundManagerConfig::setLatency ( unsigned int  latency)

Set the latency value.

Warning:
This IS NOT a value in milliseconds, or a number of frames per buffer. It is an index, where 1 is the first power-of-two buffer size (in frames) which corresponds to a latency greater than or equal to 1 ms, 2 is the second, etc. This is so that latency values are roughly equivalent between different sample rates.

Definition at line 212 of file soundmanagerconfig.cpp.

Here is the caller graph for this function:

void SoundManagerConfig::setSampleRate ( unsigned int  sampleRate)

Definition at line 169 of file soundmanagerconfig.cpp.

Here is the caller graph for this function:

bool SoundManagerConfig::writeToDisk ( ) const

Definition at line 111 of file soundmanagerconfig.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

const QString SoundManagerConfig::kDefaultAPI = QString("None") [static]

Definition at line 39 of file soundmanagerconfig.h.

const int SoundManagerConfig::kDefaultLatency = 5 [static]

Definition at line 41 of file soundmanagerconfig.h.

const unsigned int SoundManagerConfig::kDefaultSampleRate = 48000 [static]

Definition at line 40 of file soundmanagerconfig.h.

const unsigned int SoundManagerConfig::kMaxLatency = 7 [static]

Definition at line 38 of file soundmanagerconfig.h.


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