Skip to content

Commit

Permalink
osx no audiodevicelistener
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrra committed Feb 21, 2025
1 parent b452954 commit c03609b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/framework/audio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ elseif(OS_IS_MAC)
set(DRIVER_SRC
${CMAKE_CURRENT_LIST_DIR}/internal/audiomidimanager.cpp
${CMAKE_CURRENT_LIST_DIR}/internal/audiomidimanager.h
${CMAKE_CURRENT_LIST_DIR}/internal/platform/lin/audiodeviceslistener.cpp
${CMAKE_CURRENT_LIST_DIR}/internal/platform/lin/audiodeviceslistener.h
${CMAKE_CURRENT_LIST_DIR}/internal/platform/osx/osxaudiodriver.mm
${CMAKE_CURRENT_LIST_DIR}/internal/platform/osx/osxaudiodriver.h
${JACK_SRC}
Expand Down
2 changes: 2 additions & 0 deletions src/framework/audio/internal/audiomidimanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,15 @@ AudioMidiManager::~AudioMidiManager()

void AudioMidiManager::init()
{
#ifndef Q_OS_MACOS
m_devicesListener.startWithCallback([this]() {
return availableOutputDevices();
});

m_devicesListener.devicesChanged().onNotify(this, [this]() {
m_availableOutputDevicesChanged.notify();
});
#endif

// notify driver if when musescore changes play-position or play/pause
playbackController()->isPlayingChanged().onNotify(this, [this]() {
Expand Down
2 changes: 1 addition & 1 deletion src/framework/audio/internal/audiomidimanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class AudioMidiManager : public IAudioDriver, public async::Asyncable
muse::async::Notification m_outputDeviceChanged;

mutable std::mutex m_devicesMutex;
AudioDevicesListener m_devicesListener;
//AudioDevicesListener m_devicesListener;
muse::async::Notification m_availableOutputDevicesChanged;

std::string m_deviceId;
Expand Down

0 comments on commit c03609b

Please sign in to comment.