Skip to content

Commit

Permalink
Re-add callback
Browse files Browse the repository at this point in the history
  • Loading branch information
koteq committed Aug 25, 2024
1 parent 2168124 commit 8f9154c
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions Source/IconMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ IconMenu::IconMenu() : INDEX_EDIT(1000000), INDEX_BYPASS(2000000), INDEX_DELETE(
formatManager.addDefaultFormats();
// Audio device
std::unique_ptr<XmlElement> savedAudioState (getAppProperties().getUserSettings()->getXmlValue("audioDeviceState"));
deviceManager.initialise(256, 256, savedAudioState.get(), false);
deviceManager.initialise(256, 256, savedAudioState.get(), true);
player.setProcessor(&graph);
deviceManager.addAudioCallback(&player);
deviceManager.addChangeListener(this);
Expand Down Expand Up @@ -221,9 +221,8 @@ void IconMenu::changeListenerCallback(ChangeBroadcaster* changed)
}
else if (changed == &deviceManager)
{
// deviceManager.removeAudioCallback(&player);
// deviceManager.addAudioCallback(&player);
// deviceManager.restartLastAudioDevice
deviceManager.removeAudioCallback(&player);
deviceManager.addAudioCallback(&player);
dumpDeviceInfo();
}
}
Expand All @@ -236,12 +235,8 @@ void IconMenu::dumpDeviceInfo()
: "<none>"));

auto setup = deviceManager.getAudioDeviceSetup();
logger->logMessage("inputDeviceName: " + setup.inputDeviceName.quoted());
logger->logMessage("outputDeviceName: " + setup.outputDeviceName.quoted());
logger->logMessage("useDefaultInputChannels: " + setup.useDefaultInputChannels);
logger->logMessage("useDefaultOutputChannels: " + setup.useDefaultOutputChannels);
logger->logMessage("bufferSize: " + setup.bufferSize);
logger->logMessage("sampleRate: " + String(setup.sampleRate));
logger->logMessage("Current input device name: " + setup.inputDeviceName.quoted());
logger->logMessage("Current output device name: " + setup.outputDeviceName.quoted());
}

#if JUCE_MAC
Expand Down

0 comments on commit 8f9154c

Please sign in to comment.