Skip to content

Commit

Permalink
- fix audio driver initialisation after changing number of output cha…
Browse files Browse the repository at this point in the history
…nnels in HISE standalone build
  • Loading branch information
christoph-hart committed Oct 10, 2024
1 parent bc6a0cd commit c3ee75c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion currentGitHash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f63458c2e3732e7b788bc3056ddea4a71dc6be7d
bc6a0cd141f7087ae277432dde42aacc604abc22
2 changes: 1 addition & 1 deletion hi_backend/backend/currentGit.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define PREVIOUS_HISE_COMMIT "f63458c2e3732e7b788bc3056ddea4a71dc6be7d"
#define PREVIOUS_HISE_COMMIT "bc6a0cd141f7087ae277432dde42aacc604abc22"
23 changes: 22 additions & 1 deletion hi_core/hi_core/StandaloneProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,29 @@ StandaloneProcessor::StandaloneProcessor()
ScopedPointer<XmlElement> xml = AudioProcessorDriver::getSettings();

#if USE_BACKEND
if(!CompileExporter::isExportingFromCommandLine())
if(!CompileExporter::isExportingFromCommandLine())
{
if(xml != nullptr)
{
BigInteger numOutputChannels;

numOutputChannels.parseString(xml->getStringAttribute("audioDeviceOutChans"), 2);

auto numOutputsInDeviceSetting = numOutputChannels.countNumberOfSetBits();

if(numOutputsInDeviceSetting != HISE_NUM_STANDALONE_OUTPUTS)
{
if(PresetHandler::showYesNoWindow("Channel amount mismatch", "The number of channels used in the audio device settings do not match the amount of channels defined by `HISE_NUM_STANDALONE_OUTPUTS`. \nPress OK to remove the xml file and initialise the default value."))
{
AudioProcessorDriver::getDeviceSettingsFile().deleteFile();
xml = nullptr;
}
}
}

dynamic_cast<AudioProcessorDriver*>(wrappedProcessor.get())->initialiseAudioDriver(xml);
}

#else

auto apd = dynamic_cast<AudioProcessorDriver*>(wrappedProcessor.get());
Expand Down
2 changes: 1 addition & 1 deletion hi_tools/mcl_editor/code_editor/TextEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void TextEditor::setNewTokenCollectionForAllChildren(Component* any, const Ident

Component::callRecursive<TextEditor>(top, [&](TextEditor* t)
{
if(t->languageManager->getLanguageId() == languageId)
if(t->languageManager->getLanguageId() == languageId && newCollection != nullptr)
{
t->tokenCollection = newCollection;
newCollection->addListener(t);
Expand Down

0 comments on commit c3ee75c

Please sign in to comment.