Skip to content

Commit 03c2fb7

Browse files
author
Qt Continuous Integration System
committed
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging: Fix compliation of ALSA audio backend when checking for surround support.
2 parents 3e833cb + fb96047 commit 03c2fb7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ QAudioDeviceInfoInternal::QAudioDeviceInfoInternal(QByteArray dev, QAudio::Mode
6363
device = QLatin1String(dev);
6464
this->mode = mode;
6565

66+
#if (SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
6667
checkSurround();
68+
#endif
6769
}
6870

6971
QAudioDeviceInfoInternal::~QAudioDeviceInfoInternal()
@@ -394,9 +396,11 @@ void QAudioDeviceInfoInternal::updateLists()
394396
}
395397
channelz.append(1);
396398
channelz.append(2);
399+
#if (SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
397400
if (surround40) channelz.append(4);
398401
if (surround51) channelz.append(6);
399402
if (surround71) channelz.append(8);
403+
#endif
400404
sizez.append(8);
401405
sizez.append(16);
402406
sizez.append(32);
@@ -494,6 +498,7 @@ QByteArray QAudioDeviceInfoInternal::defaultOutputDevice()
494498
return devices.first();
495499
}
496500

501+
#if (SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
497502
void QAudioDeviceInfoInternal::checkSurround()
498503
{
499504
QList<QByteArray> devices;
@@ -534,5 +539,6 @@ void QAudioDeviceInfoInternal::checkSurround()
534539
}
535540
snd_device_name_free_hint(hints);
536541
}
542+
#endif
537543

538544
QT_END_NAMESPACE

src/multimedia/audio/qaudiodeviceinfo_alsa_p.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,12 @@ class QAudioDeviceInfoInternal : public QAbstractAudioDeviceInfo
9898
bool open();
9999
void close();
100100

101+
#if (SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
101102
void checkSurround();
102103
bool surround40;
103104
bool surround51;
104105
bool surround71;
106+
#endif
105107

106108
QString device;
107109
QAudio::Mode mode;

0 commit comments

Comments
 (0)