1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 17:58:43 -05:00

Audio: list available devices to console in debug mode

This commit is contained in:
f4exb 2018-10-06 22:34:48 +02:00
parent 15bc1e2149
commit 863c7e15ef
3 changed files with 10 additions and 2 deletions

View File

@ -58,6 +58,14 @@ AudioDeviceManager::AudioDeviceManager()
{ {
m_inputDevicesInfo = QAudioDeviceInfo::availableDevices(QAudio::AudioInput); m_inputDevicesInfo = QAudioDeviceInfo::availableDevices(QAudio::AudioInput);
m_outputDevicesInfo = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput); m_outputDevicesInfo = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput);
for (int i = 0; i < m_inputDevicesInfo.size(); i++) {
qDebug("AudioDeviceManager::AudioDeviceManager: input device #%d: %s", i, qPrintable(m_inputDevicesInfo[i].deviceName()));
}
for (int i = 0; i < m_outputDevicesInfo.size(); i++) {
qDebug("AudioDeviceManager::AudioDeviceManager: output device #%d: %s", i, qPrintable(m_outputDevicesInfo[i].deviceName()));
}
} }
AudioDeviceManager::~AudioDeviceManager() AudioDeviceManager::~AudioDeviceManager()

View File

@ -94,7 +94,7 @@ bool AudioInput::start(int device, int rate)
if (m_audioFormat.sampleSize() != 16) if (m_audioFormat.sampleSize() != 16)
{ {
qWarning("AudioInput::start: Audio device ( %s ) failed", qPrintable(devInfo.defaultInputDevice().deviceName())); qWarning("AudioInput::start: Audio device '%s' failed", qPrintable(devInfo.defaultInputDevice().deviceName()));
return false; return false;
} }

View File

@ -106,7 +106,7 @@ bool AudioOutput::start(int device, int rate)
if (m_audioFormat.sampleSize() != 16) if (m_audioFormat.sampleSize() != 16)
{ {
qWarning("AudioOutput::start: Audio device ( %s ) failed", qPrintable(devInfo.defaultOutputDevice().deviceName())); qWarning("AudioOutput::start: Audio device '%s' failed", qPrintable(devInfo.defaultOutputDevice().deviceName()));
return false; return false;
} }