mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-11 23:54:18 +00:00
Converted AudioSampleBuffer into a templated class that can use either float or double types. Used this to implement 64-bit audio plugin support in VST and AU
This commit is contained in:
parent
ba672f03fb
commit
c562cfc3cc
27 changed files with 1713 additions and 1104 deletions
|
|
@ -240,6 +240,7 @@ PopupMenu MainHostWindow::getMenuForIndex (int topLevelMenuIndex, const String&
|
|||
|
||||
menu.addSeparator();
|
||||
menu.addCommandItem (&getCommandManager(), CommandIDs::showAudioSettings);
|
||||
menu.addCommandItem (&getCommandManager(), CommandIDs::toggleDoublePrecision);
|
||||
|
||||
menu.addSeparator();
|
||||
menu.addCommandItem (&getCommandManager(), CommandIDs::aboutBox);
|
||||
|
|
@ -331,6 +332,7 @@ void MainHostWindow::getAllCommands (Array <CommandID>& commands)
|
|||
CommandIDs::saveAs,
|
||||
CommandIDs::showPluginListEditor,
|
||||
CommandIDs::showAudioSettings,
|
||||
CommandIDs::toggleDoublePrecision,
|
||||
CommandIDs::aboutBox,
|
||||
CommandIDs::allWindowsForward
|
||||
};
|
||||
|
|
@ -376,6 +378,10 @@ void MainHostWindow::getCommandInfo (const CommandID commandID, ApplicationComma
|
|||
result.addDefaultKeypress ('a', ModifierKeys::commandModifier);
|
||||
break;
|
||||
|
||||
case CommandIDs::toggleDoublePrecision:
|
||||
updatePrecisionMenuItem (result);
|
||||
break;
|
||||
|
||||
case CommandIDs::aboutBox:
|
||||
result.setInfo ("About...", String::empty, category, 0);
|
||||
break;
|
||||
|
|
@ -427,6 +433,23 @@ bool MainHostWindow::perform (const InvocationInfo& info)
|
|||
showAudioSettings();
|
||||
break;
|
||||
|
||||
case CommandIDs::toggleDoublePrecision:
|
||||
if (PropertiesFile* props = getAppProperties().getUserSettings())
|
||||
{
|
||||
bool newIsDoublePrecision = ! isDoublePrecisionProcessing();
|
||||
props->setValue ("doublePrecisionProcessing", var (newIsDoublePrecision));
|
||||
|
||||
{
|
||||
ApplicationCommandInfo cmdInfo (info.commandID);
|
||||
updatePrecisionMenuItem (cmdInfo);
|
||||
menuItemsChanged();
|
||||
}
|
||||
|
||||
if (graphEditor != nullptr)
|
||||
graphEditor->setDoublePrecision (newIsDoublePrecision);
|
||||
}
|
||||
break;
|
||||
|
||||
case CommandIDs::aboutBox:
|
||||
// TODO
|
||||
break;
|
||||
|
|
@ -524,3 +547,17 @@ GraphDocumentComponent* MainHostWindow::getGraphEditor() const
|
|||
{
|
||||
return dynamic_cast <GraphDocumentComponent*> (getContentComponent());
|
||||
}
|
||||
|
||||
bool MainHostWindow::isDoublePrecisionProcessing()
|
||||
{
|
||||
if (PropertiesFile* props = getAppProperties().getUserSettings())
|
||||
return props->getBoolValue ("doublePrecisionProcessing", false);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void MainHostWindow::updatePrecisionMenuItem (ApplicationCommandInfo& info)
|
||||
{
|
||||
info.setInfo ("Double floating point precision rendering", String::empty, "General", 0);
|
||||
info.setTicked (isDoublePrecisionProcessing());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue