Line 0
Link Here
|
|
|
1 |
--- src/audio/audio.cpp.orig 2016-12-02 04:06:35 UTC |
2 |
+++ src/audio/audio.cpp |
3 |
@@ -352,10 +352,10 @@ bool Audio::initInput(const QString& dev |
4 |
const uint32_t chnls = AUDIO_CHANNELS; |
5 |
const ALCsizei bufSize = (frameDuration * sampleRate * 4) / 1000 * chnls; |
6 |
|
7 |
- const ALchar* tmpDevName = deviceName.isEmpty() |
8 |
- ? nullptr |
9 |
- : deviceName.toUtf8().constData(); |
10 |
- alInDev = alcCaptureOpenDevice(tmpDevName, sampleRate, stereoFlag, bufSize); |
11 |
+ alInDev = alcCaptureOpenDevice(deviceName.isEmpty() |
12 |
+ ? nullptr |
13 |
+ : deviceName.toUtf8().constData(), |
14 |
+ sampleRate, stereoFlag, bufSize); |
15 |
|
16 |
// Restart the capture if necessary |
17 |
if (!alInDev) |
18 |
@@ -386,11 +386,9 @@ bool Audio::initOutput(const QString& de |
19 |
qDebug() << "Opening audio output" << deviceName; |
20 |
assert(!alOutDev); |
21 |
|
22 |
- const ALchar* tmpDevName = deviceName.isEmpty() |
23 |
- ? nullptr |
24 |
- : deviceName.toUtf8().constData(); |
25 |
- alOutDev = alcOpenDevice(tmpDevName); |
26 |
- |
27 |
+ alOutDev = alcOpenDevice(deviceName.isEmpty() |
28 |
+ ? nullptr |
29 |
+ : deviceName.toUtf8().constData()); |
30 |
if (!alOutDev) |
31 |
{ |
32 |
qWarning() << "Cannot open output audio device" << deviceName; |