Skip to content

Commit a69c34f

Browse files
committed
Small refactor to audio device manager initialise (to prevent compile breakage on Mac)
1 parent 140fbad commit a69c34f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Qt/AudioPlaybackThread.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,16 @@ namespace openshot
4141
// Create the actual instance of device manager only once
4242
m_pInstance = new AudioDeviceManagerSingleton;
4343

44+
// Get preferred audio device name (if any)
45+
string preferred_audio_device = Settings::Instance()->PLAYBACK_AUDIO_DEVICE_NAME;
46+
4447
// Initialize audio device only 1 time
4548
String error = m_pInstance->audioDeviceManager.initialise (
4649
0, /* number of input channels */
4750
2, /* number of output channels */
4851
0, /* no XML settings.. */
4952
true, /* select default device on failure */
50-
Settings::Instance()->PLAYBACK_AUDIO_DEVICE_NAME /* preferredDefaultDeviceName */);
53+
preferred_audio_device /* preferredDefaultDeviceName */);
5154

5255
// Persist any errors detected
5356
if (error.isNotEmpty()) {

0 commit comments

Comments
 (0)