34
33
SOUNDDEVICE_ERROR_EXCESSIVE_INPUT_CHANNEL,
40
SoundDevice(ConfigObject<ConfigValue> *config, SoundManager* sm);
41
virtual ~SoundDevice();
42
QString getInternalName() const;
43
QString getDisplayName() const;
44
QString getHostAPI() const;
45
void setHostAPI(QString api);
46
void setSampleRate(double sampleRate);
47
void setFramesPerBuffer(unsigned int framesPerBuffer);
48
virtual int open() = 0;
49
virtual int close() = 0;
50
virtual QString getError() const = 0;
51
virtual unsigned int getDefaultSampleRate() const = 0;
52
int getNumOutputChannels() const;
53
int getNumInputChannels() const;
54
SoundDeviceError addOutput(const AudioOutput &out);
55
SoundDeviceError addInput(const AudioInput &in);
58
bool operator==(const SoundDevice &other) const;
59
bool operator==(const QString &other) const;
61
ConfigObject<ConfigValue> *m_pConfig;
62
SoundManager *m_pSoundManager; //Pointer to the SoundManager object which we'll request audio from.
63
QString m_strInternalName; //The name of the soundcard, used internally (may include the device ID)
64
QString m_strDisplayName; //The name of the soundcard, as displayed to the user
65
int m_iNumOutputChannels; //The number of output channels that the soundcard has
66
int m_iNumInputChannels; //The number of input channels that the soundcard has
67
double m_dSampleRate; //The current samplerate for the sound device.
68
QString m_hostAPI; //The name of the audio API used by this device.
69
unsigned int m_framesPerBuffer;
70
QList<AudioOutput> m_audioOutputs;
71
QList<AudioInput> m_audioInputs;
38
SoundDevice(ConfigObject<ConfigValue> *config, SoundManager* sm);
39
virtual ~SoundDevice();
41
QString getInternalName() const;
42
QString getDisplayName() const;
43
QString getHostAPI() const;
44
void setHostAPI(QString api);
45
void setSampleRate(double sampleRate);
46
void setFramesPerBuffer(unsigned int framesPerBuffer);
47
virtual int open() = 0;
48
virtual int close() = 0;
49
virtual QString getError() const = 0;
50
virtual unsigned int getDefaultSampleRate() const = 0;
51
int getNumOutputChannels() const;
52
int getNumInputChannels() const;
53
SoundDeviceError addOutput(const AudioOutput &out);
54
SoundDeviceError addInput(const AudioInput &in);
57
bool operator==(const SoundDevice &other) const;
58
bool operator==(const QString &other) const;
61
ConfigObject<ConfigValue> *m_pConfig;
62
// Pointer to the SoundManager object which we'll request audio from.
63
SoundManager *m_pSoundManager;
64
// The name of the soundcard, used internally (may include the device ID)
65
QString m_strInternalName;
66
// The name of the soundcard, as displayed to the user
67
QString m_strDisplayName;
68
// The number of output channels that the soundcard has
69
int m_iNumOutputChannels;
70
// The number of input channels that the soundcard has
71
int m_iNumInputChannels;
72
// The current samplerate for the sound device.
74
// The name of the audio API used by this device.
76
unsigned int m_framesPerBuffer;
77
QList<AudioOutput> m_audioOutputs;
78
QList<AudioInput> m_audioInputs;