Improvements to device selection

This commit is contained in:
Jonas Kvinge
2018-06-07 19:38:40 +02:00
parent d45f8672cd
commit 60b55b6d7d
10 changed files with 66 additions and 57 deletions

View File

@@ -62,7 +62,7 @@ std::unique_ptr<T> GetProperty(const AudioDeviceID& device_id, const AudioObject
OsxDeviceFinder::OsxDeviceFinder()
: DeviceFinder("osxaudiosink") {
: DeviceFinder("osxaudio") {
}
QList<DeviceFinder::Device> OsxDeviceFinder::ListDevices() {
@@ -94,8 +94,7 @@ QList<DeviceFinder::Device> OsxDeviceFinder::ListDevices() {
continue;
}
// Determine if the device is an output device (it is an output device if
// it has output channels)
// Determine if the device is an output device (it is an output device if it has output channels)
address.mSelector = kAudioDevicePropertyStreamConfiguration;
std::unique_ptr<AudioBufferList> buffer_list = GetProperty<AudioBufferList>(id, address);
if (!buffer_list.get() || buffer_list->mNumberBuffers == 0) {