Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoundManager: Use correct PortAudio backend on iOS #12716

Merged
merged 1 commit into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/soundio/soundmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ class ControlObject;
#define MIXXX_PORTAUDIO_OSS_STRING "OSS"
#define MIXXX_PORTAUDIO_ASIO_STRING "ASIO"
#define MIXXX_PORTAUDIO_DIRECTSOUND_STRING "Windows DirectSound"
// NOTE: This is what our patched version of PortAudio uses for the Core Audio
// backend on iOS. If/when upstream supports iOS officially
// (https://github.com/PortAudio/portaudio/pull/881), we may have to update this
#define MIXXX_PORTAUDIO_IOSAUDIO_STRING "iOS Audio"
#define MIXXX_PORTAUDIO_COREAUDIO_STRING "Core Audio"

#define SOUNDMANAGER_DISCONNECTED 0
Expand Down
5 changes: 4 additions & 1 deletion src/soundio/soundmanagerconfig.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "soundio/soundmanagerconfig.h"

#include <QRegularExpression>
#include <QtGlobal>

#include "audio/types.h"
#include "soundio/sounddevice.h"
Expand Down Expand Up @@ -495,7 +496,9 @@ void SoundManagerConfig::loadDefaults(SoundManager* soundManager, unsigned int f
m_api = MIXXX_PORTAUDIO_DIRECTSOUND_STRING;
}
#endif
#ifdef __APPLE__
#ifdef Q_OS_IOS
m_api = MIXXX_PORTAUDIO_IOSAUDIO_STRING;
#elif defined(Q_OS_MACOS)
m_api = MIXXX_PORTAUDIO_COREAUDIO_STRING;
#endif
}
Expand Down
Loading