mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Formatting
This commit is contained in:
parent
ff0cb4ad5b
commit
4153d59e39
279 changed files with 1281 additions and 1281 deletions
|
|
@ -96,7 +96,7 @@ struct IIRFilterDemoDSP
|
|||
|
||||
ChoiceParameter typeParam { { "Low-pass", "High-pass", "Band-pass" }, 1, "Type" };
|
||||
SliderParameter cutoffParam { { 20.0, 20000.0 }, 0.5, 440.0f, "Cutoff", "Hz" };
|
||||
SliderParameter qParam { { 0.3, 20.0 }, 0.5, 1.0 / std::sqrt(2.0), "Q" };
|
||||
SliderParameter qParam { { 0.3, 20.0 }, 0.5, 1.0 / std::sqrt (2.0), "Q" };
|
||||
|
||||
std::vector<DSPDemoParameterBase*> parameters { &typeParam, &cutoffParam, &qParam };
|
||||
double sampleRate = 0.0;
|
||||
|
|
|
|||
|
|
@ -99,8 +99,8 @@ public:
|
|||
|
||||
private:
|
||||
//==============================================================================
|
||||
Label helloWorldLabel { {}, TRANS("Hello World!") };
|
||||
TextButton quitButton { TRANS("Quit") };
|
||||
Label helloWorldLabel { {}, TRANS ("Hello World!") };
|
||||
TextButton quitButton { TRANS ("Quit") };
|
||||
Path internalPath;
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -1281,7 +1281,7 @@ private:
|
|||
shader.reset (newShader.release());
|
||||
shader->use();
|
||||
|
||||
shape .reset (new OpenGLUtils::Shape ());
|
||||
shape .reset (new OpenGLUtils::Shape());
|
||||
attributes.reset (new OpenGLUtils::Attributes (*shader));
|
||||
uniforms .reset (new OpenGLUtils::Uniforms (*shader));
|
||||
|
||||
|
|
|
|||
|
|
@ -543,7 +543,7 @@ private:
|
|||
|
||||
curVideoComp->onPlaybackStarted = [this]() { processPlaybackStarted(); };
|
||||
curVideoComp->onPlaybackStopped = [this]() { processPlaybackPaused(); };
|
||||
curVideoComp->onErrorOccurred = [this](const String& errorMessage) { errorOccurred (errorMessage); };
|
||||
curVideoComp->onErrorOccurred = [this] (const String& errorMessage) { errorOccurred (errorMessage); };
|
||||
curVideoComp->setVisible (true);
|
||||
|
||||
#if JUCE_SYNC_VIDEO_VOLUME_WITH_OS_MEDIA_VOLUME
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ struct SlidersPage final : public Component
|
|||
|
||||
for (int i = 8; i <= 11; ++i)
|
||||
{
|
||||
auto* selectedSlider = sliders.getUnchecked(i);
|
||||
auto* selectedSlider = sliders.getUnchecked (i);
|
||||
selectedSlider->setTextBoxStyle (Slider::NoTextBox, false, 0, 0);
|
||||
selectedSlider->getMaxValueObject().referTo (sharedValueMax);
|
||||
selectedSlider->getMinValueObject().referTo (sharedValueMin);
|
||||
|
|
@ -1133,7 +1133,7 @@ public:
|
|||
|
||||
String getText (const int columnNumber, const int rowNumber) const
|
||||
{
|
||||
return dataList->getChildElement (rowNumber)->getStringAttribute ( getAttributeNameForColumnId(columnNumber));
|
||||
return dataList->getChildElement (rowNumber)->getStringAttribute (getAttributeNameForColumnId (columnNumber));
|
||||
}
|
||||
|
||||
void setText (const int columnNumber, const int rowNumber, const String& newText)
|
||||
|
|
@ -1188,7 +1188,7 @@ private:
|
|||
{
|
||||
row = newRow;
|
||||
columnId = newColumn;
|
||||
setText (owner.getText(columnId, row), dontSendNotification);
|
||||
setText (owner.getText (columnId, row), dontSendNotification);
|
||||
}
|
||||
|
||||
void paint (Graphics& g) override
|
||||
|
|
|
|||
|
|
@ -1103,7 +1103,7 @@ public:
|
|||
const int x = timeToViewScaling.getXForTime (tempoConverter.getTimeForQuarter (quarterPos));
|
||||
const auto barSignature = barSignaturesConverter.getBarSignatureForQuarter (quarterPos);
|
||||
const int lineWidth = (approximatelyEqual (quarterPos, barSignature.position)) ? heavyLineWidth : lightLineWidth;
|
||||
const int beatsSinceBarStart = roundToInt( barSignaturesConverter.getBeatDistanceFromBarStartForQuarter (quarterPos));
|
||||
const int beatsSinceBarStart = roundToInt (barSignaturesConverter.getBeatDistanceFromBarStartForQuarter (quarterPos));
|
||||
const int lineHeight = (beatsSinceBarStart == 0) ? rulerHeight : rulerHeight / 2;
|
||||
rects.addWithoutMerging (Rectangle<int> (x - lineWidth / 2, 2 * rulerHeight - lineHeight, lineWidth, lineHeight));
|
||||
}
|
||||
|
|
@ -2196,7 +2196,7 @@ private:
|
|||
|
||||
void addTrackViews (ARARegionSequence* regionSequence)
|
||||
{
|
||||
const auto insertIntoMap = [](auto& map, auto key, auto value) -> auto&
|
||||
const auto insertIntoMap = [] (auto& map, auto key, auto value) -> auto&
|
||||
{
|
||||
auto it = map.insert ({ std::move (key), std::move (value) });
|
||||
return *(it.first->second);
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public:
|
|||
ignoreUnused (style, minSliderPos, maxSliderPos);
|
||||
|
||||
auto r = Rectangle<int> (x + haloRadius, y, width - (haloRadius * 2), height);
|
||||
auto backgroundBar = r.withSizeKeepingCentre(r.getWidth(), 2);
|
||||
auto backgroundBar = r.withSizeKeepingCentre (r.getWidth(), 2);
|
||||
|
||||
sliderPos = (sliderPos - minSliderPos) / static_cast<float> (width);
|
||||
|
||||
|
|
@ -312,7 +312,7 @@ private:
|
|||
class AUv3SynthProcessor final : public AudioProcessor
|
||||
{
|
||||
public:
|
||||
AUv3SynthProcessor ()
|
||||
AUv3SynthProcessor()
|
||||
: AudioProcessor (BusesProperties().withOutput ("Output", AudioChannelSet::stereo(), true)),
|
||||
currentRecording (1, 1), currentProgram (0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2358,7 +2358,7 @@ public:
|
|||
// These accessors are just for an 'overview' and won't give the exact
|
||||
// state of the audio engine at a particular point in time.
|
||||
// If you call getNumVoices(), get the result '10', and then call
|
||||
// getPlaybackPosiiton(9), there's a chance the audio engine will have
|
||||
// getPlaybackPosiiton (9), there's a chance the audio engine will have
|
||||
// been updated to remove some voices in the meantime, so the returned
|
||||
// value won't correspond to an existing voice.
|
||||
int getNumVoices() const { return synthesiser.getNumVoices(); }
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ public:
|
|||
int statusCode = 0;
|
||||
|
||||
if (auto stream = url.createInputStream (URL::InputStreamOptions (URL::ParameterHandling::inAddress)
|
||||
.withConnectionTimeoutMs(10000)
|
||||
.withConnectionTimeoutMs (10000)
|
||||
.withResponseHeaders (&responseHeaders)
|
||||
.withStatusCode (&statusCode)))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -152,13 +152,13 @@ public:
|
|||
typeAsString = "(unknown)";
|
||||
}
|
||||
|
||||
oscLogList.add (getIndentationString (level + 1) + "- " + typeAsString.paddedRight(' ', 12) + valueAsString);
|
||||
oscLogList.add (getIndentationString (level + 1) + "- " + typeAsString.paddedRight (' ', 12) + valueAsString);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void addInvalidOSCPacket (const char* /* data */, int dataSize)
|
||||
{
|
||||
oscLogList.add ("- (" + String(dataSize) + "bytes with invalid format)");
|
||||
oscLogList.add ("- (" + String (dataSize) + "bytes with invalid format)");
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -111,8 +111,8 @@ public class JuceActivity extends Activity
|
|||
@Override
|
||||
protected void onNewIntent (Intent intent)
|
||||
{
|
||||
super.onNewIntent(intent);
|
||||
setIntent(intent);
|
||||
super.onNewIntent (intent);
|
||||
setIntent (intent);
|
||||
|
||||
appNewIntent (intent);
|
||||
}
|
||||
|
|
@ -1191,7 +1191,7 @@ private:
|
|||
|
||||
void resized()
|
||||
{
|
||||
auto rowSize = getHeight () / 10;
|
||||
auto rowSize = getHeight() / 10;
|
||||
|
||||
auto bounds = getLocalBounds().reduced (getWidth() / 10, getHeight() / 10);
|
||||
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ public:
|
|||
auto area = getLocalBounds();
|
||||
|
||||
typeBox.setBounds (area.removeFromTop (36).removeFromRight (150).reduced (8));
|
||||
codeDocumentComponent.setBounds (area.removeFromTop(area.getHeight() / 2).reduced (8));
|
||||
codeDocumentComponent.setBounds (area.removeFromTop (area.getHeight() / 2).reduced (8));
|
||||
resultsTree .setBounds (area.reduced (8));
|
||||
errorMessage .setBounds (resultsTree.getBounds());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ private:
|
|||
std::unique_ptr<PluginScannerSubprocess> storedScannerSubprocess;
|
||||
};
|
||||
|
||||
static PluginHostApp& getApp() { return *dynamic_cast<PluginHostApp*>(JUCEApplication::getInstance()); }
|
||||
static PluginHostApp& getApp() { return *dynamic_cast<PluginHostApp*> (JUCEApplication::getInstance()); }
|
||||
|
||||
ApplicationProperties& getAppProperties() { return *getApp().appProperties; }
|
||||
ApplicationCommandManager& getCommandManager() { return getApp().commandManager; }
|
||||
|
|
|
|||
|
|
@ -524,7 +524,7 @@ MainHostWindow* IOConfigurationWindow::getMainWindow() const
|
|||
auto& desktop = Desktop::getInstance();
|
||||
|
||||
for (int i = desktop.getNumComponents(); --i >= 0;)
|
||||
if (auto* mainWindow = dynamic_cast<MainHostWindow*> (desktop.getComponent(i)))
|
||||
if (auto* mainWindow = dynamic_cast<MainHostWindow*> (desktop.getComponent (i)))
|
||||
return mainWindow;
|
||||
|
||||
return nullptr;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ void PluginGraph::changeListenerCallback (ChangeBroadcaster*)
|
|||
changed();
|
||||
|
||||
for (int i = activePluginWindows.size(); --i >= 0;)
|
||||
if (! graph.getNodes().contains (activePluginWindows.getUnchecked(i)->node))
|
||||
if (! graph.getNodes().contains (activePluginWindows.getUnchecked (i)->node))
|
||||
activePluginWindows.remove (i);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -847,11 +847,11 @@ void GraphEditorPanel::changeListenerCallback (ChangeBroadcaster*)
|
|||
void GraphEditorPanel::updateComponents()
|
||||
{
|
||||
for (int i = nodes.size(); --i >= 0;)
|
||||
if (graph.graph.getNodeForId (nodes.getUnchecked(i)->pluginID) == nullptr)
|
||||
if (graph.graph.getNodeForId (nodes.getUnchecked (i)->pluginID) == nullptr)
|
||||
nodes.remove (i);
|
||||
|
||||
for (int i = connectors.size(); --i >= 0;)
|
||||
if (! graph.graph.isConnected (connectors.getUnchecked(i)->connection))
|
||||
if (! graph.graph.isConnected (connectors.getUnchecked (i)->connection))
|
||||
connectors.remove (i);
|
||||
|
||||
for (auto* fc : nodes)
|
||||
|
|
@ -1283,7 +1283,7 @@ void GraphDocumentComponent::resized()
|
|||
const int statusHeight = 20;
|
||||
|
||||
if (isOnTouchDevice())
|
||||
titleBarComponent->setBounds (r.removeFromTop(titleBarHeight));
|
||||
titleBarComponent->setBounds (r.removeFromTop (titleBarHeight));
|
||||
|
||||
keyboardComp->setBounds (r.removeFromBottom (keysHeight));
|
||||
statusBar->setBounds (r.removeFromBottom (statusHeight));
|
||||
|
|
|
|||
|
|
@ -759,7 +759,7 @@ void MainHostWindow::getCommandInfo (const CommandID commandID, ApplicationComma
|
|||
#if ! (JUCE_IOS || JUCE_ANDROID)
|
||||
case CommandIDs::newFile:
|
||||
result.setInfo ("New", "Creates a new filter graph file", category, 0);
|
||||
result.defaultKeypresses.add(KeyPress('n', ModifierKeys::commandModifier, 0));
|
||||
result.defaultKeypresses.add (KeyPress ('n', ModifierKeys::commandModifier, 0));
|
||||
break;
|
||||
|
||||
case CommandIDs::open:
|
||||
|
|
@ -1002,7 +1002,7 @@ void MainHostWindow::filesDropped (const StringArray& files, int x, int y)
|
|||
auto pos = graphHolder->getLocalPoint (this, Point<int> (x, y));
|
||||
|
||||
for (int i = 0; i < jmin (5, typesFound.size()); ++i)
|
||||
if (auto* desc = typesFound.getUnchecked(i))
|
||||
if (auto* desc = typesFound.getUnchecked (i))
|
||||
createPlugin (PluginDescriptionAndPreference { *desc }, pos);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ private:
|
|||
|
||||
void resized() override
|
||||
{
|
||||
list.setBounds(getLocalBounds());
|
||||
list.setBounds (getLocalBounds());
|
||||
}
|
||||
|
||||
int getNumRows() override
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ namespace build_tools
|
|||
|
||||
for (int i = 0; i < files.size(); ++i)
|
||||
{
|
||||
auto& file = files.getReference(i);
|
||||
auto& file = files.getReference (i);
|
||||
|
||||
if (! file.existsAsFile())
|
||||
return Result::fail ("Can't open resource file: " + file.getFullPathName());
|
||||
|
|
@ -142,7 +142,7 @@ namespace build_tools
|
|||
|
||||
while (i < files.size())
|
||||
{
|
||||
auto& file = files.getReference(i);
|
||||
auto& file = files.getReference (i);
|
||||
auto variableName = variableNames[i];
|
||||
|
||||
FileInputStream fileStream (file);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace build_tools
|
|||
|
||||
String getSizeVariableFor (const File& file) const;
|
||||
|
||||
int getNumFiles() const { return files.size (); }
|
||||
int getNumFiles() const { return files.size(); }
|
||||
|
||||
const File& getFile (int index) const { return files.getReference (index); }
|
||||
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ namespace build_tools
|
|||
const auto& types = getAllTypes();
|
||||
|
||||
for (auto i = types.size(); --i >= 0;)
|
||||
if (types.getUnchecked(i)->getType() == typeCode)
|
||||
return types.getUnchecked(i);
|
||||
if (types.getUnchecked (i)->getType() == typeCode)
|
||||
return types.getUnchecked (i);
|
||||
|
||||
jassertfalse;
|
||||
return nullptr;
|
||||
|
|
@ -319,7 +319,7 @@ namespace build_tools
|
|||
static ProjectType_AudioPlugin plugin;
|
||||
static ProjectType_ARAAudioPlugin araplugin;
|
||||
|
||||
return Array<ProjectType*>(&guiApp, &consoleApp, &staticLib, &dll, &plugin, &araplugin);
|
||||
return Array<ProjectType*> (&guiApp, &consoleApp, &staticLib, &dll, &plugin, &araplugin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ struct FlockDemo : public BackgroundLogo
|
|||
|
||||
for (int i = 0; i < birds.size(); ++i)
|
||||
for (int j = i + 1; j < birds.size(); ++j)
|
||||
attractBirds (birds.getReference(i), birds.getReference(j));
|
||||
attractBirds (birds.getReference (i), birds.getReference (j));
|
||||
|
||||
for (auto& b : birds)
|
||||
{
|
||||
|
|
@ -172,8 +172,8 @@ struct FlockDemo : public BackgroundLogo
|
|||
|
||||
for (int i = rings.size(); --i >= 0;)
|
||||
{
|
||||
if (rings.getReference(i).update())
|
||||
rings.getReference(i).draw (g);
|
||||
if (rings.getReference (i).update())
|
||||
rings.getReference (i).draw (g);
|
||||
else
|
||||
rings.remove (i);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ private:
|
|||
void updateDeviceComponents()
|
||||
{
|
||||
for (int i = devices.size(); --i >= 0;)
|
||||
if (getClient (devices.getUnchecked(i)->getName()) == nullptr)
|
||||
if (getClient (devices.getUnchecked (i)->getName()) == nullptr)
|
||||
devices.remove (i);
|
||||
|
||||
for (const auto& c : clients)
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ private:
|
|||
for (int i = 0; i < cg.getNumColours(); ++i)
|
||||
{
|
||||
out.writeDouble (cg.getColourPosition (i));
|
||||
out.writeInt ((int) cg.getColour(i).getARGB());
|
||||
out.writeInt ((int) cg.getColour (i).getARGB());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -467,7 +467,7 @@ struct BlockPacketiser
|
|||
for (int i = 0; i < blocks.size(); ++i)
|
||||
{
|
||||
auto index = (uint32) ByteOrder::swapIfBigEndian (i);
|
||||
blocks.getReference(i).append (&index, sizeof (index));
|
||||
blocks.getReference (i).append (&index, sizeof (index));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -487,7 +487,7 @@ struct BlockPacketiser
|
|||
if (blocks.size() > 1)
|
||||
{
|
||||
for (int i = 0; i < blocks.size() - 1; ++i)
|
||||
result.append (blocks.getReference(i).getData(), blocks.getReference(i).getSize() - 4);
|
||||
result.append (blocks.getReference (i).getData(), blocks.getReference (i).getSize() - 4);
|
||||
|
||||
String storedMD5 (String (CharPointer_ASCII ((const char*) blocks.getLast().getData()))
|
||||
.fromFirstOccurrenceOf (getLastPacketPrefix(), false, false));
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ private:
|
|||
|
||||
StringArray strings;
|
||||
TranslationHelpers::scanFolderForTranslations (strings, fc.getResult());
|
||||
setPreTranslationText (TranslationHelpers::mungeStrings(strings));
|
||||
setPreTranslationText (TranslationHelpers::mungeStrings (strings));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -196,7 +196,7 @@ private:
|
|||
Label label1, label2, label3, label4;
|
||||
Label instructionsLabel;
|
||||
|
||||
TextButton generateButton { TRANS("Generate") },
|
||||
TextButton generateButton { TRANS ("Generate") },
|
||||
scanProjectButton { "Scan project for TRANS macros" },
|
||||
scanFolderButton { "Scan folder for TRANS macros" },
|
||||
loadTranslationButton { "Load existing translation file..."};
|
||||
|
|
|
|||
|
|
@ -501,7 +501,7 @@ PopupMenu ProjucerApplication::createDocumentMenu()
|
|||
|
||||
for (int i = 0; i < numDocs; ++i)
|
||||
{
|
||||
OpenDocumentManager::Document* doc = openDocumentManager.getOpenDocument(i);
|
||||
OpenDocumentManager::Document* doc = openDocumentManager.getOpenDocument (i);
|
||||
menu.addItem (activeDocumentsBaseID + i, doc->getName());
|
||||
}
|
||||
|
||||
|
|
@ -1156,7 +1156,7 @@ void ProjucerApplication::saveAllDocuments()
|
|||
openDocumentManager.saveAllSyncWithoutAsking();
|
||||
|
||||
for (int i = 0; i < mainWindowList.windows.size(); ++i)
|
||||
if (auto* pcc = mainWindowList.windows.getUnchecked(i)->getProjectContentComponent())
|
||||
if (auto* pcc = mainWindowList.windows.getUnchecked (i)->getProjectContentComponent())
|
||||
pcc->refreshProjectTreeFileStatuses();
|
||||
}
|
||||
|
||||
|
|
@ -1352,7 +1352,7 @@ void ProjucerApplication::deleteLogger()
|
|||
files.addUsingDefaultSort (f);
|
||||
|
||||
for (int i = 0; i < files.size() - maxNumLogFilesToKeep; ++i)
|
||||
files.getReference(i).file.deleteFile();
|
||||
files.getReference (i).file.deleteFile();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ namespace
|
|||
command.add ("-m");
|
||||
command.add (version.quoted());
|
||||
|
||||
std::cout << "Performing command: " << command.joinIntoString(" ") << std::endl;
|
||||
std::cout << "Performing command: " << command.joinIntoString (" ") << std::endl;
|
||||
|
||||
ChildProcess c;
|
||||
|
||||
|
|
@ -525,7 +525,7 @@ namespace
|
|||
auto files = findAllSourceFiles (target);
|
||||
|
||||
for (int i = 0; i < files.size(); ++i)
|
||||
fixIncludes (files.getReference(i), files);
|
||||
fixIncludes (files.getReference (i), files);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -586,7 +586,7 @@ namespace
|
|||
}
|
||||
|
||||
for (int i = 0; i < sections.size(); ++i)
|
||||
sections.getReference(i).index = i;
|
||||
sections.getReference (i).index = i;
|
||||
|
||||
for (int i = 0; i < sections.size(); ++i)
|
||||
sections.swap (i, rng.nextInt (sections.size()));
|
||||
|
|
@ -597,7 +597,7 @@ namespace
|
|||
<< "{" << preferredLineFeed;
|
||||
|
||||
for (int i = 0; i < sections.size(); ++i)
|
||||
sections.getReference(i).writeGenerator (out);
|
||||
sections.getReference (i).writeGenerator (out);
|
||||
|
||||
out << preferredLineFeed
|
||||
<< " String result = " << getStringConcatenationExpression (rng, 0, sections.size()) << ";" << preferredLineFeed
|
||||
|
|
|
|||
|
|
@ -560,14 +560,14 @@ bool MainWindow::shouldDropFilesWhenDraggedExternally (const DragAndDropTarget::
|
|||
Array<JucerTreeViewBase*> selected;
|
||||
|
||||
for (int i = tv->getNumSelectedItems(); --i >= 0;)
|
||||
if (auto* b = dynamic_cast<JucerTreeViewBase*> (tv->getSelectedItem(i)))
|
||||
if (auto* b = dynamic_cast<JucerTreeViewBase*> (tv->getSelectedItem (i)))
|
||||
selected.add (b);
|
||||
|
||||
if (! selected.isEmpty())
|
||||
{
|
||||
for (int i = selected.size(); --i >= 0;)
|
||||
{
|
||||
if (auto* jtvb = selected.getUnchecked(i))
|
||||
if (auto* jtvb = selected.getUnchecked (i))
|
||||
{
|
||||
auto f = jtvb->getDraggableFile();
|
||||
|
||||
|
|
@ -801,7 +801,7 @@ void MainWindowList::openDocument (OpenDocumentManager::Document* doc, bool grab
|
|||
|
||||
for (int i = desktop.getNumComponents(); --i >= 0;)
|
||||
{
|
||||
if (auto* mw = dynamic_cast<MainWindow*> (desktop.getComponent(i)))
|
||||
if (auto* mw = dynamic_cast<MainWindow*> (desktop.getComponent (i)))
|
||||
{
|
||||
if (auto* pcc = mw->getProjectContentComponent())
|
||||
{
|
||||
|
|
@ -1012,7 +1012,7 @@ void MainWindowList::saveCurrentlyOpenProjectList()
|
|||
|
||||
for (int i = 0; i < desktop.getNumComponents(); ++i)
|
||||
{
|
||||
if (auto* mw = dynamic_cast<MainWindow*> (desktop.getComponent(i)))
|
||||
if (auto* mw = dynamic_cast<MainWindow*> (desktop.getComponent (i)))
|
||||
if (auto* p = mw->getProject())
|
||||
if (! p->isTemporaryProject())
|
||||
projects.add (p->getFile());
|
||||
|
|
@ -1041,7 +1041,7 @@ Project* MainWindowList::getFrontmostProject()
|
|||
auto& desktop = Desktop::getInstance();
|
||||
|
||||
for (int i = desktop.getNumComponents(); --i >= 0;)
|
||||
if (auto* mw = dynamic_cast<MainWindow*> (desktop.getComponent(i)))
|
||||
if (auto* mw = dynamic_cast<MainWindow*> (desktop.getComponent (i)))
|
||||
if (auto* p = mw->getProject())
|
||||
return p;
|
||||
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ void OpenDocumentManager::removeListener (DocumentCloseListener* listener)
|
|||
bool OpenDocumentManager::canOpenFile (const File& file)
|
||||
{
|
||||
for (int i = types.size(); --i >= 0;)
|
||||
if (types.getUnchecked(i)->canOpenFile (file))
|
||||
if (types.getUnchecked (i)->canOpenFile (file))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
@ -136,16 +136,16 @@ bool OpenDocumentManager::canOpenFile (const File& file)
|
|||
OpenDocumentManager::Document* OpenDocumentManager::openFile (Project* project, const File& file)
|
||||
{
|
||||
for (int i = documents.size(); --i >= 0;)
|
||||
if (documents.getUnchecked(i)->isForFile (file))
|
||||
return documents.getUnchecked(i);
|
||||
if (documents.getUnchecked (i)->isForFile (file))
|
||||
return documents.getUnchecked (i);
|
||||
|
||||
Document* d = nullptr;
|
||||
|
||||
for (int i = types.size(); --i >= 0 && d == nullptr;)
|
||||
{
|
||||
if (types.getUnchecked(i)->canOpenFile (file))
|
||||
if (types.getUnchecked (i)->canOpenFile (file))
|
||||
{
|
||||
d = types.getUnchecked(i)->openFile (project, file);
|
||||
d = types.getUnchecked (i)->openFile (project, file);
|
||||
jassert (d != nullptr);
|
||||
}
|
||||
}
|
||||
|
|
@ -448,7 +448,7 @@ OpenDocumentManager::Document* RecentDocumentList::getNext()
|
|||
bool RecentDocumentList::contains (const File& f) const
|
||||
{
|
||||
for (int i = previousDocs.size(); --i >= 0;)
|
||||
if (previousDocs.getUnchecked(i)->getFile() == f)
|
||||
if (previousDocs.getUnchecked (i)->getFile() == f)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
@ -457,8 +457,8 @@ bool RecentDocumentList::contains (const File& f) const
|
|||
OpenDocumentManager::Document* RecentDocumentList::getClosestPreviousDocOtherThan (OpenDocumentManager::Document* oneToAvoid) const
|
||||
{
|
||||
for (int i = previousDocs.size(); --i >= 0;)
|
||||
if (previousDocs.getUnchecked(i) != oneToAvoid)
|
||||
return previousDocs.getUnchecked(i);
|
||||
if (previousDocs.getUnchecked (i) != oneToAvoid)
|
||||
return previousDocs.getUnchecked (i);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
@ -512,7 +512,7 @@ static void saveDocList (const Array <OpenDocumentManager::Document*>& list, Xml
|
|||
{
|
||||
for (int i = 0; i < list.size(); ++i)
|
||||
{
|
||||
const OpenDocumentManager::Document& doc = *list.getUnchecked(i);
|
||||
const OpenDocumentManager::Document& doc = *list.getUnchecked (i);
|
||||
|
||||
XmlElement* e = xml.createNewChildElement ("DOC");
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ void SourceCodeDocument::saveAsync (std::function<void (bool)> callback)
|
|||
|
||||
void SourceCodeDocument::saveAsAsync (std::function<void (bool)> callback)
|
||||
{
|
||||
chooser = std::make_unique<FileChooser> (TRANS("Save As..."), getFile(), "*");
|
||||
chooser = std::make_unique<FileChooser> (TRANS ("Save As..."), getFile(), "*");
|
||||
auto flags = FileBrowserComponent::saveMode
|
||||
| FileBrowserComponent::canSelectFiles
|
||||
| FileBrowserComponent::warnAboutOverwriting;
|
||||
|
|
@ -643,7 +643,7 @@ void CppCodeEditorComponent::addPopupMenuItems (PopupMenu& menu, const MouseEven
|
|||
GenericCodeEditorComponent::addPopupMenuItems (menu, e);
|
||||
|
||||
menu.addSeparator();
|
||||
menu.addItem (insertComponentID, TRANS("Insert code for a new Component class..."));
|
||||
menu.addItem (insertComponentID, TRANS ("Insert code for a new Component class..."));
|
||||
}
|
||||
|
||||
void CppCodeEditorComponent::performPopupMenuAction (int menuItemID)
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ private:
|
|||
|
||||
for (int i = 0; i < resourceFile.getNumFiles(); ++i)
|
||||
{
|
||||
const File& file = resourceFile.getFile(i);
|
||||
const File& file = resourceFile.getFile (i);
|
||||
|
||||
if (imageResourceName == resourceFile.getClassName() + "::" + resourceFile.getDataVariableFor (file))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -127,9 +127,9 @@ public:
|
|||
|
||||
for (int i = 0; i < resourceFile.getNumFiles(); ++i)
|
||||
{
|
||||
const File& file = resourceFile.getFile(i);
|
||||
const File& file = resourceFile.getFile (i);
|
||||
|
||||
if (ImageFileFormat::findImageFormatForFileExtension(file))
|
||||
if (ImageFileFormat::findImageFormatForFileExtension (file))
|
||||
choices.add (resourceFile.getClassName() + "::" + resourceFile.getDataVariableFor (file));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ void PaintElement::updateBounds (const Rectangle<int>& parentArea)
|
|||
borderThickness));
|
||||
|
||||
for (int i = siblingComponents.size(); --i >= 0;)
|
||||
siblingComponents.getUnchecked(i)->updatePosition();
|
||||
siblingComponents.getUnchecked (i)->updatePosition();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -652,7 +652,7 @@ void PaintElement::updateSiblingComps()
|
|||
createSiblingComponents();
|
||||
|
||||
for (int i = siblingComponents.size(); --i >= 0;)
|
||||
siblingComponents.getUnchecked(i)->updatePosition();
|
||||
siblingComponents.getUnchecked (i)->updatePosition();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ void PaintElementGroup::ungroup (const bool undoable)
|
|||
|
||||
for (int i = 0; i < subElements.size(); ++i)
|
||||
{
|
||||
std::unique_ptr<XmlElement> xml (subElements.getUnchecked(i)->createXml());
|
||||
std::unique_ptr<XmlElement> xml (subElements.getUnchecked (i)->createXml());
|
||||
|
||||
PaintElement* newOne = getOwner()->addElementFromXml (*xml, index, undoable);
|
||||
getOwner()->getSelectedElements().addToSelection (newOne);
|
||||
|
|
@ -62,7 +62,7 @@ void PaintElementGroup::groupSelected (PaintRoutine* routine)
|
|||
{
|
||||
if (routine->getSelectedElements().isSelected (routine->getElement (i)))
|
||||
{
|
||||
std::unique_ptr<XmlElement> xml (routine->getElement(i)->createXml());
|
||||
std::unique_ptr<XmlElement> xml (routine->getElement (i)->createXml());
|
||||
|
||||
if (auto* newOne = ObjectTypes::createElementForXml (xml.get(), routine))
|
||||
newGroup->subElements.add (newOne);
|
||||
|
|
@ -91,7 +91,7 @@ bool PaintElementGroup::containsElement (const PaintElement* element) const
|
|||
return true;
|
||||
|
||||
for (int i = subElements.size(); --i >= 0;)
|
||||
if (PaintElementGroup* pg = dynamic_cast<PaintElementGroup*> (subElements.getUnchecked(i)))
|
||||
if (PaintElementGroup* pg = dynamic_cast<PaintElementGroup*> (subElements.getUnchecked (i)))
|
||||
if (pg->containsElement (element))
|
||||
return true;
|
||||
|
||||
|
|
@ -109,10 +109,10 @@ Rectangle<int> PaintElementGroup::getCurrentBounds (const Rectangle<int>& parent
|
|||
|
||||
if (subElements.size() > 0)
|
||||
{
|
||||
r = subElements.getUnchecked(0)->getCurrentBounds (parentArea);
|
||||
r = subElements.getUnchecked (0)->getCurrentBounds (parentArea);
|
||||
|
||||
for (int i = 1; i < subElements.size(); ++i)
|
||||
r = r.getUnion (subElements.getUnchecked(i)->getCurrentBounds (parentArea));
|
||||
r = r.getUnion (subElements.getUnchecked (i)->getCurrentBounds (parentArea));
|
||||
}
|
||||
|
||||
return r;
|
||||
|
|
@ -138,7 +138,7 @@ void PaintElementGroup::setCurrentBounds (const Rectangle<int>& b, const Rectang
|
|||
|
||||
for (int i = 0; i < subElements.size(); ++i)
|
||||
{
|
||||
PaintElement* const e = subElements.getUnchecked(i);
|
||||
PaintElement* const e = subElements.getUnchecked (i);
|
||||
|
||||
Rectangle<int> pos (e->getCurrentBounds (parentArea));
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ void PaintElementGroup::setCurrentBounds (const Rectangle<int>& b, const Rectang
|
|||
void PaintElementGroup::draw (Graphics& g, const ComponentLayout* layout, const Rectangle<int>& parentArea)
|
||||
{
|
||||
for (int i = 0; i < subElements.size(); ++i)
|
||||
subElements.getUnchecked(i)->draw (g, layout, parentArea);
|
||||
subElements.getUnchecked (i)->draw (g, layout, parentArea);
|
||||
}
|
||||
|
||||
void PaintElementGroup::getEditableProperties (Array<PropertyComponent*>& props, bool multipleSelected)
|
||||
|
|
@ -170,7 +170,7 @@ void PaintElementGroup::getEditableProperties (Array<PropertyComponent*>& props,
|
|||
void PaintElementGroup::fillInGeneratedCode (GeneratedCode& code, String& paintMethodCode)
|
||||
{
|
||||
for (int i = 0; i < subElements.size(); ++i)
|
||||
subElements.getUnchecked(i)->fillInGeneratedCode (code, paintMethodCode);
|
||||
subElements.getUnchecked (i)->fillInGeneratedCode (code, paintMethodCode);
|
||||
}
|
||||
|
||||
const char* PaintElementGroup::getTagName() noexcept { return "GROUP"; }
|
||||
|
|
@ -181,7 +181,7 @@ XmlElement* PaintElementGroup::createXml() const
|
|||
|
||||
for (int i = 0; i < subElements.size(); ++i)
|
||||
{
|
||||
XmlElement* const sub = subElements.getUnchecked(i)->createXml();
|
||||
XmlElement* const sub = subElements.getUnchecked (i)->createXml();
|
||||
e->addChildElement (sub);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ void PaintElementPath::setCurrentBounds (const Rectangle<int>& b,
|
|||
|
||||
for (int i = 0; i < points.size(); ++i)
|
||||
{
|
||||
PathPoint* const destPoint = points.getUnchecked(i);
|
||||
PathPoint* const destPoint = points.getUnchecked (i);
|
||||
PathPoint p (*destPoint);
|
||||
|
||||
for (int j = p.getNumPoints(); --j >= 0;)
|
||||
|
|
@ -455,14 +455,14 @@ void PaintElementPath::fillInGeneratedCode (GeneratedCode& code, String& paintMe
|
|||
{
|
||||
s << " ";
|
||||
fillType.fillInGeneratedCode ("fill", zero, code, s);
|
||||
s << " g.fillPath (" << pathVariable << ", juce::AffineTransform::translation(x, y));\n";
|
||||
s << " g.fillPath (" << pathVariable << ", juce::AffineTransform::translation (x, y));\n";
|
||||
}
|
||||
|
||||
if (isStrokePresent && ! strokeType.isInvisible())
|
||||
{
|
||||
s << " ";
|
||||
strokeType.fill.fillInGeneratedCode ("stroke", zero, code, s);
|
||||
s << " g.strokePath (" << pathVariable << ", " << strokeType.getPathStrokeCode() << ", juce::AffineTransform::translation(x, y));\n";
|
||||
s << " g.strokePath (" << pathVariable << ", " << strokeType.getPathStrokeCode() << ", juce::AffineTransform::translation (x, y));\n";
|
||||
}
|
||||
|
||||
s << "}\n\n";
|
||||
|
|
@ -477,7 +477,7 @@ void PaintElementPath::applyCustomPaintSnippets (StringArray& snippets)
|
|||
if (! snippets.isEmpty() && (! fillType.isInvisible() || (isStrokePresent && ! strokeType.isInvisible())))
|
||||
{
|
||||
customPaintCode = snippets[0];
|
||||
snippets.remove(0);
|
||||
snippets.remove (0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -517,7 +517,7 @@ void PaintElementPath::createSiblingComponents()
|
|||
|
||||
for (int i = 0; i < points.size(); ++i)
|
||||
{
|
||||
switch (points.getUnchecked(i)->type)
|
||||
switch (points.getUnchecked (i)->type)
|
||||
{
|
||||
case Path::Iterator::startNewSubPath:
|
||||
siblingComponents.add (new PathPointComponent (this, i, 0));
|
||||
|
|
@ -544,8 +544,8 @@ void PaintElementPath::createSiblingComponents()
|
|||
|
||||
for (int i = 0; i < siblingComponents.size(); ++i)
|
||||
{
|
||||
getParentComponent()->addAndMakeVisible (siblingComponents.getUnchecked(i));
|
||||
siblingComponents.getUnchecked(i)->updatePosition();
|
||||
getParentComponent()->addAndMakeVisible (siblingComponents.getUnchecked (i));
|
||||
siblingComponents.getUnchecked (i)->updatePosition();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -556,7 +556,7 @@ String PaintElementPath::pathToString() const
|
|||
|
||||
for (int i = 0; i < points.size(); ++i)
|
||||
{
|
||||
const PathPoint* const p = points.getUnchecked(i);
|
||||
const PathPoint* const p = points.getUnchecked (i);
|
||||
|
||||
switch (p->type)
|
||||
{
|
||||
|
|
@ -703,7 +703,7 @@ void PaintElementPath::updateStoredPath (const ComponentLayout* layout, const Re
|
|||
|
||||
for (int i = 0; i < points.size(); ++i)
|
||||
{
|
||||
const PathPoint* const p = points.getUnchecked(i);
|
||||
const PathPoint* const p = points.getUnchecked (i);
|
||||
|
||||
switch (p->type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public:
|
|||
|
||||
for (int i = 1; i < containerGroups.size(); ++i)
|
||||
{
|
||||
group = dynamic_cast<PaintElementGroup*> (group->getElement (containerGroups.getUnchecked(i)));
|
||||
group = dynamic_cast<PaintElementGroup*> (group->getElement (containerGroups.getUnchecked (i)));
|
||||
|
||||
if (group == nullptr)
|
||||
return nullptr;
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ public:
|
|||
<< CodeHelpers::floatLiteral (font.getHeight(), 2)
|
||||
<< ", ";
|
||||
|
||||
if (font.getAvailableStyles().contains(font.getTypefaceStyle()))
|
||||
if (font.getAvailableStyles().contains (font.getTypefaceStyle()))
|
||||
s << "juce::Font::plain).withTypefaceStyle ("
|
||||
<< CodeHelpers::stringLiteral (font.getTypefaceStyle())
|
||||
<< ")";
|
||||
|
|
|
|||
|
|
@ -393,8 +393,8 @@ void ComponentLayoutEditor::itemDropped (const SourceDetails& dragSourceDetails)
|
|||
StringArray filenames;
|
||||
|
||||
for (int i = 0; i < selectedNodes.size(); ++i)
|
||||
if (selectedNodes.getUnchecked(i)->getFile().hasFileExtension (cppFileExtensions))
|
||||
filenames.add (selectedNodes.getUnchecked(i)->getFile().getFullPathName());
|
||||
if (selectedNodes.getUnchecked (i)->getFile().hasFileExtension (cppFileExtensions))
|
||||
filenames.add (selectedNodes.getUnchecked (i)->getFile().getFullPathName());
|
||||
|
||||
filesDropped (filenames, dragSourceDetails.localPosition.x, dragSourceDetails.localPosition.y);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public:
|
|||
private:
|
||||
void updateBounds (Component* child)
|
||||
{
|
||||
auto childArea = getLocalArea(child, child->getLocalBounds());
|
||||
auto childArea = getLocalArea (child, child->getLocalBounds());
|
||||
setSize (childArea.getWidth(), childArea.getHeight());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -744,25 +744,25 @@ void JucerDocumentEditor::getCommandInfo (const CommandID commandID, Application
|
|||
switch (commandID)
|
||||
{
|
||||
case JucerCommandIDs::toFront:
|
||||
result.setInfo (TRANS("Bring to front"), TRANS("Brings the currently selected component to the front."), CommandCategories::editing, 0);
|
||||
result.setInfo (TRANS ("Bring to front"), TRANS ("Brings the currently selected component to the front."), CommandCategories::editing, 0);
|
||||
result.setActive (isSomethingSelected());
|
||||
result.defaultKeypresses.add (KeyPress ('f', cmd, 0));
|
||||
break;
|
||||
|
||||
case JucerCommandIDs::toBack:
|
||||
result.setInfo (TRANS("Send to back"), TRANS("Sends the currently selected component to the back."), CommandCategories::editing, 0);
|
||||
result.setInfo (TRANS ("Send to back"), TRANS ("Sends the currently selected component to the back."), CommandCategories::editing, 0);
|
||||
result.setActive (isSomethingSelected());
|
||||
result.defaultKeypresses.add (KeyPress ('b', cmd, 0));
|
||||
break;
|
||||
|
||||
case JucerCommandIDs::group:
|
||||
result.setInfo (TRANS("Group selected items"), TRANS("Turns the currently selected elements into a single group object."), CommandCategories::editing, 0);
|
||||
result.setInfo (TRANS ("Group selected items"), TRANS ("Turns the currently selected elements into a single group object."), CommandCategories::editing, 0);
|
||||
result.setActive (currentPaintRoutine != nullptr && currentPaintRoutine->getSelectedElements().getNumSelected() > 1);
|
||||
result.defaultKeypresses.add (KeyPress ('k', cmd, 0));
|
||||
break;
|
||||
|
||||
case JucerCommandIDs::ungroup:
|
||||
result.setInfo (TRANS("Ungroup selected items"), TRANS("Turns the currently selected elements into a single group object."), CommandCategories::editing, 0);
|
||||
result.setInfo (TRANS ("Ungroup selected items"), TRANS ("Turns the currently selected elements into a single group object."), CommandCategories::editing, 0);
|
||||
result.setActive (currentPaintRoutine != nullptr
|
||||
&& currentPaintRoutine->getSelectedElements().getNumSelected() == 1
|
||||
&& currentPaintRoutine->getSelectedElements().getSelectedItem (0)->getTypeName() == "Group");
|
||||
|
|
@ -770,60 +770,60 @@ void JucerDocumentEditor::getCommandInfo (const CommandID commandID, Application
|
|||
break;
|
||||
|
||||
case JucerCommandIDs::test:
|
||||
result.setInfo (TRANS("Test component..."), TRANS("Runs the current component interactively."), CommandCategories::view, 0);
|
||||
result.setInfo (TRANS ("Test component..."), TRANS ("Runs the current component interactively."), CommandCategories::view, 0);
|
||||
result.defaultKeypresses.add (KeyPress ('t', cmd, 0));
|
||||
break;
|
||||
|
||||
case JucerCommandIDs::enableSnapToGrid:
|
||||
result.setInfo (TRANS("Enable snap-to-grid"), TRANS("Toggles whether components' positions are aligned to a grid."), CommandCategories::view, 0);
|
||||
result.setInfo (TRANS ("Enable snap-to-grid"), TRANS ("Toggles whether components' positions are aligned to a grid."), CommandCategories::view, 0);
|
||||
result.setTicked (document != nullptr && document->isSnapActive (false));
|
||||
result.defaultKeypresses.add (KeyPress ('g', cmd, 0));
|
||||
break;
|
||||
|
||||
case JucerCommandIDs::showGrid:
|
||||
result.setInfo (TRANS("Show snap-to-grid"), TRANS("Toggles whether the snapping grid is displayed on-screen."), CommandCategories::view, 0);
|
||||
result.setInfo (TRANS ("Show snap-to-grid"), TRANS ("Toggles whether the snapping grid is displayed on-screen."), CommandCategories::view, 0);
|
||||
result.setTicked (document != nullptr && document->isSnapShown());
|
||||
result.defaultKeypresses.add (KeyPress ('g', cmd | shift, 0));
|
||||
break;
|
||||
|
||||
case JucerCommandIDs::editCompLayout:
|
||||
result.setInfo (TRANS("Edit sub-component layout"), TRANS("Switches to the sub-component editor view."), CommandCategories::view, 0);
|
||||
result.setInfo (TRANS ("Edit sub-component layout"), TRANS ("Switches to the sub-component editor view."), CommandCategories::view, 0);
|
||||
result.setTicked (currentLayout != nullptr);
|
||||
result.defaultKeypresses.add (KeyPress ('n', cmd, 0));
|
||||
break;
|
||||
|
||||
case JucerCommandIDs::editCompGraphics:
|
||||
result.setInfo (TRANS("Edit background graphics"), TRANS("Switches to the background graphics editor view."), CommandCategories::view, 0);
|
||||
result.setInfo (TRANS ("Edit background graphics"), TRANS ("Switches to the background graphics editor view."), CommandCategories::view, 0);
|
||||
result.setTicked (currentPaintRoutine != nullptr);
|
||||
result.defaultKeypresses.add (KeyPress ('m', cmd, 0));
|
||||
break;
|
||||
|
||||
case JucerCommandIDs::bringBackLostItems:
|
||||
result.setInfo (TRANS("Retrieve offscreen items"), TRANS("Moves any items that are lost beyond the edges of the screen back to the centre."), CommandCategories::editing, 0);
|
||||
result.setInfo (TRANS ("Retrieve offscreen items"), TRANS ("Moves any items that are lost beyond the edges of the screen back to the centre."), CommandCategories::editing, 0);
|
||||
result.setActive (currentPaintRoutine != nullptr || currentLayout != nullptr);
|
||||
result.defaultKeypresses.add (KeyPress ('m', cmd, 0));
|
||||
break;
|
||||
|
||||
case JucerCommandIDs::zoomIn:
|
||||
result.setInfo (TRANS("Zoom in"), TRANS("Zooms in on the current component."), CommandCategories::editing, 0);
|
||||
result.setInfo (TRANS ("Zoom in"), TRANS ("Zooms in on the current component."), CommandCategories::editing, 0);
|
||||
result.setActive (currentPaintRoutine != nullptr || currentLayout != nullptr);
|
||||
result.defaultKeypresses.add (KeyPress (']', cmd, 0));
|
||||
break;
|
||||
|
||||
case JucerCommandIDs::zoomOut:
|
||||
result.setInfo (TRANS("Zoom out"), TRANS("Zooms out on the current component."), CommandCategories::editing, 0);
|
||||
result.setInfo (TRANS ("Zoom out"), TRANS ("Zooms out on the current component."), CommandCategories::editing, 0);
|
||||
result.setActive (currentPaintRoutine != nullptr || currentLayout != nullptr);
|
||||
result.defaultKeypresses.add (KeyPress ('[', cmd, 0));
|
||||
break;
|
||||
|
||||
case JucerCommandIDs::zoomNormal:
|
||||
result.setInfo (TRANS("Zoom to 100%"), TRANS("Restores the zoom level to normal."), CommandCategories::editing, 0);
|
||||
result.setInfo (TRANS ("Zoom to 100%"), TRANS ("Restores the zoom level to normal."), CommandCategories::editing, 0);
|
||||
result.setActive (currentPaintRoutine != nullptr || currentLayout != nullptr);
|
||||
result.defaultKeypresses.add (KeyPress ('1', cmd, 0));
|
||||
break;
|
||||
|
||||
case JucerCommandIDs::spaceBarDrag:
|
||||
result.setInfo (TRANS("Scroll while dragging mouse"), TRANS("When held down, this key lets you scroll around by dragging with the mouse."),
|
||||
result.setInfo (TRANS ("Scroll while dragging mouse"), TRANS ("When held down, this key lets you scroll around by dragging with the mouse."),
|
||||
CommandCategories::view, ApplicationCommandInfo::wantsKeyUpDownCallbacks);
|
||||
result.setActive (currentPaintRoutine != nullptr || currentLayout != nullptr);
|
||||
result.defaultKeypresses.add (KeyPress (KeyPress::spaceKey, 0, 0));
|
||||
|
|
@ -863,9 +863,9 @@ void JucerDocumentEditor::getCommandInfo (const CommandID commandID, Application
|
|||
currentAmount = 33;
|
||||
|
||||
result.setInfo (commandID == JucerCommandIDs::compOverlay0
|
||||
? TRANS("No component overlay")
|
||||
: TRANS("Overlay with opacity of 123%").replace ("123", String (amount)),
|
||||
TRANS("Changes the opacity of the components that are shown over the top of the graphics editor."),
|
||||
? TRANS ("No component overlay")
|
||||
: TRANS ("Overlay with opacity of 123%").replace ("123", String (amount)),
|
||||
TRANS ("Changes the opacity of the components that are shown over the top of the graphics editor."),
|
||||
CommandCategories::view, 0);
|
||||
result.setActive (currentPaintRoutine != nullptr && document->getComponentLayout() != nullptr);
|
||||
result.setTicked (amount == currentAmount);
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ TestComponent::~TestComponent()
|
|||
void TestComponent::reloadAll()
|
||||
{
|
||||
for (int i = testComponents.size(); --i >= 0;)
|
||||
testComponents.getUnchecked(i)->reload();
|
||||
testComponents.getUnchecked (i)->reload();
|
||||
}
|
||||
|
||||
void TestComponent::reload()
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ void ComponentLayout::copySelectedToClipboard()
|
|||
|
||||
for (int i = 0; i < components.size(); ++i)
|
||||
{
|
||||
auto c = components.getUnchecked(i);
|
||||
auto c = components.getUnchecked (i);
|
||||
|
||||
if (selected.isSelected (c))
|
||||
{
|
||||
|
|
@ -310,7 +310,7 @@ void ComponentLayout::selectedToFront()
|
|||
const SelectedItemSet <Component*> temp (selected);
|
||||
|
||||
for (int i = temp.getNumSelected(); --i >= 0;)
|
||||
componentToFront (temp.getSelectedItem(i), true);
|
||||
componentToFront (temp.getSelectedItem (i), true);
|
||||
}
|
||||
|
||||
void ComponentLayout::selectedToBack()
|
||||
|
|
@ -318,7 +318,7 @@ void ComponentLayout::selectedToBack()
|
|||
const SelectedItemSet <Component*> temp (selected);
|
||||
|
||||
for (int i = 0; i < temp.getNumSelected(); ++i)
|
||||
componentToBack (temp.getSelectedItem(i), true);
|
||||
componentToBack (temp.getSelectedItem (i), true);
|
||||
}
|
||||
|
||||
void ComponentLayout::alignTop()
|
||||
|
|
@ -457,8 +457,8 @@ Component* ComponentLayout::addComponentFromXml (const XmlElement& xml, const bo
|
|||
Component* ComponentLayout::findComponentWithId (const int64 componentId) const
|
||||
{
|
||||
for (int i = 0; i < components.size(); ++i)
|
||||
if (ComponentTypeHandler::getComponentId (components.getUnchecked(i)) == componentId)
|
||||
return components.getUnchecked(i);
|
||||
if (ComponentTypeHandler::getComponentId (components.getUnchecked (i)) == componentId)
|
||||
return components.getUnchecked (i);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
@ -626,7 +626,7 @@ public:
|
|||
newBounds (bounds),
|
||||
oldBounds (comp->getBounds()),
|
||||
newProps (props),
|
||||
oldProps(comp->getProperties())
|
||||
oldProps (comp->getProperties())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -839,7 +839,7 @@ void ComponentLayout::stretchSelectedComps (int dw, int dh, bool allowSnap)
|
|||
void ComponentLayout::fillInGeneratedCode (GeneratedCode& code) const
|
||||
{
|
||||
for (int i = 0; i < components.size(); ++i)
|
||||
if (Component* const comp = components.getUnchecked(i))
|
||||
if (Component* const comp = components.getUnchecked (i))
|
||||
if (ComponentTypeHandler* const type = ComponentTypeHandler::getHandlerFor (*comp))
|
||||
type->fillInGeneratedCode (comp, code);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ String& GeneratedCode::getCallbackCode (const String& requiredParentClass,
|
|||
|
||||
for (int i = callbacks.size(); --i >= 0;)
|
||||
{
|
||||
CallbackMethod* const cm = callbacks.getUnchecked(i);
|
||||
CallbackMethod* const cm = callbacks.getUnchecked (i);
|
||||
|
||||
if (cm->requiredParentClass == parentClass
|
||||
&& cm->returnType == returnType
|
||||
|
|
@ -81,7 +81,7 @@ void GeneratedCode::removeCallback (const String& returnType, const String& prot
|
|||
{
|
||||
for (int i = callbacks.size(); --i >= 0;)
|
||||
{
|
||||
CallbackMethod* const cm = callbacks.getUnchecked(i);
|
||||
CallbackMethod* const cm = callbacks.getUnchecked (i);
|
||||
|
||||
if (cm->returnType == returnType && cm->prototype == prototype)
|
||||
callbacks.remove (i);
|
||||
|
|
@ -104,7 +104,7 @@ StringArray GeneratedCode::getExtraParentClasses() const
|
|||
|
||||
for (int i = 0; i < callbacks.size(); ++i)
|
||||
{
|
||||
CallbackMethod* const cm = callbacks.getUnchecked(i);
|
||||
CallbackMethod* const cm = callbacks.getUnchecked (i);
|
||||
s.add (cm->requiredParentClass);
|
||||
}
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ String GeneratedCode::getCallbackDeclarations() const
|
|||
|
||||
for (int i = 0; i < callbacks.size(); ++i)
|
||||
{
|
||||
CallbackMethod* const cm = callbacks.getUnchecked(i);
|
||||
CallbackMethod* const cm = callbacks.getUnchecked (i);
|
||||
|
||||
s << cm->returnType << " " << cm->prototype << " override;\n";
|
||||
}
|
||||
|
|
@ -131,7 +131,7 @@ String GeneratedCode::getCallbackDefinitions() const
|
|||
|
||||
for (int i = 0; i < callbacks.size(); ++i)
|
||||
{
|
||||
CallbackMethod* const cm = callbacks.getUnchecked(i);
|
||||
CallbackMethod* const cm = callbacks.getUnchecked (i);
|
||||
|
||||
const String userCodeBlockName ("User"
|
||||
+ build_tools::makeValidIdentifier (cm->prototype.upToFirstOccurrenceOf ("(", false, false),
|
||||
|
|
@ -217,7 +217,7 @@ static String getIncludeFileCode (const Array<File>& files, const File& targetFi
|
|||
String s;
|
||||
|
||||
for (int i = 0; i < files.size(); ++i)
|
||||
s << CodeHelpers::createIncludeStatement (files.getReference(i), targetFile) << newLine;
|
||||
s << CodeHelpers::createIncludeStatement (files.getReference (i), targetFile) << newLine;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ void PaintRoutine::selectedToFront()
|
|||
const SelectedItemSet<PaintElement*> temp (selectedElements);
|
||||
|
||||
for (int i = temp.getNumSelected(); --i >= 0;)
|
||||
elementToFront (temp.getSelectedItem(i), true);
|
||||
elementToFront (temp.getSelectedItem (i), true);
|
||||
}
|
||||
|
||||
void PaintRoutine::selectedToBack()
|
||||
|
|
@ -369,7 +369,7 @@ void PaintRoutine::selectedToBack()
|
|||
const SelectedItemSet<PaintElement*> temp (selectedElements);
|
||||
|
||||
for (int i = 0; i < temp.getNumSelected(); ++i)
|
||||
elementToBack (temp.getSelectedItem(i), true);
|
||||
elementToBack (temp.getSelectedItem (i), true);
|
||||
}
|
||||
|
||||
void PaintRoutine::alignTop()
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ inline String quotedString (const String& s, bool wrapInTransMacro)
|
|||
String lit (CodeHelpers::stringLiteral (s));
|
||||
|
||||
if (wrapInTransMacro && lit.startsWithChar ('"'))
|
||||
return "TRANS(" + lit + ")";
|
||||
return "TRANS (" + lit + ")";
|
||||
|
||||
return lit;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ private:
|
|||
if (job->shouldExit())
|
||||
return;
|
||||
|
||||
pathsToCheck.push({ iter.getFile(), path.depth + 1 });
|
||||
pathsToCheck.push ({ iter.getFile(), path.depth + 1 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -712,7 +712,7 @@ void EnabledModulesList::removeModule (String moduleID) // must be pass-by-value
|
|||
const ScopedLock sl (stateLock);
|
||||
|
||||
for (auto i = state.getNumChildren(); --i >= 0;)
|
||||
if (state.getChild(i) [Ids::ID] == moduleID)
|
||||
if (state.getChild (i) [Ids::ID] == moduleID)
|
||||
state.removeChild (i, getUndoManager());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ public:
|
|||
|
||||
for (auto i = fsToTrash.size(); --i >= 0;)
|
||||
{
|
||||
auto f = fsToTrash.getUnchecked(i);
|
||||
auto f = fsToTrash.getUnchecked (i);
|
||||
|
||||
om.closeFileWithoutSaving (f);
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ public:
|
|||
String fileList;
|
||||
auto maxFilesToList = 10;
|
||||
for (auto i = jmin (maxFilesToList, filesToTrash.size()); --i >= 0;)
|
||||
fileList << filesToTrash.getUnchecked(i).getFullPathName() << "\n";
|
||||
fileList << filesToTrash.getUnchecked (i).getFullPathName() << "\n";
|
||||
|
||||
if (filesToTrash.size() > maxFilesToList)
|
||||
fileList << "\n...plus " << (filesToTrash.size() - maxFilesToList) << " more files...";
|
||||
|
|
@ -187,7 +187,7 @@ public:
|
|||
StringArray files;
|
||||
|
||||
for (int i = 0; i < fc.getResults().size(); ++i)
|
||||
files.add (fc.getResults().getReference(i).getFullPathName());
|
||||
files.add (fc.getResults().getReference (i).getFullPathName());
|
||||
|
||||
addFilesRetainingSortOrder (files);
|
||||
});
|
||||
|
|
@ -250,7 +250,7 @@ public:
|
|||
|
||||
for (auto i = getNumSubItems(); --i >= 0;)
|
||||
{
|
||||
if (auto* pg = dynamic_cast<FileTreeItemBase*> (getSubItem(i)))
|
||||
if (auto* pg = dynamic_cast<FileTreeItemBase*> (getSubItem (i)))
|
||||
if (auto* found = pg->findTreeViewItem (itemToFind))
|
||||
return found;
|
||||
}
|
||||
|
|
@ -275,7 +275,7 @@ public:
|
|||
void addSubItems() override
|
||||
{
|
||||
for (int i = 0; i < item.getNumChildren(); ++i)
|
||||
if (auto* p = createSubItem (item.getChild(i)))
|
||||
if (auto* p = createSubItem (item.getChild (i)))
|
||||
addSubItem (p);
|
||||
}
|
||||
|
||||
|
|
@ -423,7 +423,7 @@ protected:
|
|||
{
|
||||
for (auto i = selectedNodes.size(); --i >= 0;)
|
||||
{
|
||||
auto* n = selectedNodes.getUnchecked(i);
|
||||
auto* n = selectedNodes.getUnchecked (i);
|
||||
|
||||
if (destNode == *n || destNode.state.isAChildOf (n->state)) // Check for recursion.
|
||||
return;
|
||||
|
|
@ -435,11 +435,11 @@ protected:
|
|||
// Don't include any nodes that are children of other selected nodes..
|
||||
for (auto i = selectedNodes.size(); --i >= 0;)
|
||||
{
|
||||
auto* n = selectedNodes.getUnchecked(i);
|
||||
auto* n = selectedNodes.getUnchecked (i);
|
||||
|
||||
for (auto j = selectedNodes.size(); --j >= 0;)
|
||||
{
|
||||
if (j != i && n->state.isAChildOf (selectedNodes.getUnchecked(j)->state))
|
||||
if (j != i && n->state.isAChildOf (selectedNodes.getUnchecked (j)->state))
|
||||
{
|
||||
selectedNodes.remove (i);
|
||||
break;
|
||||
|
|
@ -450,7 +450,7 @@ protected:
|
|||
// Remove and re-insert them one at a time..
|
||||
for (int i = 0; i < selectedNodes.size(); ++i)
|
||||
{
|
||||
auto* selectedNode = selectedNodes.getUnchecked(i);
|
||||
auto* selectedNode = selectedNodes.getUnchecked (i);
|
||||
|
||||
if (selectedNode->state.getParent() == destNode.state
|
||||
&& indexOfNode (destNode.state, selectedNode->state) < insertIndex)
|
||||
|
|
@ -672,7 +672,7 @@ public:
|
|||
bool acceptsDragItems (const OwnedArray<Project::Item>& selectedNodes) override
|
||||
{
|
||||
for (auto i = selectedNodes.size(); --i >= 0;)
|
||||
if (item.canContain (*selectedNodes.getUnchecked(i)))
|
||||
if (item.canContain (*selectedNodes.getUnchecked (i)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
@ -701,7 +701,7 @@ public:
|
|||
void checkFileStatus() override
|
||||
{
|
||||
for (int i = 0; i < getNumSubItems(); ++i)
|
||||
if (auto* p = dynamic_cast<FileTreeItemBase*> (getSubItem(i)))
|
||||
if (auto* p = dynamic_cast<FileTreeItemBase*> (getSubItem (i)))
|
||||
p->checkFileStatus();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -340,7 +340,7 @@ void Project::initialiseAudioPluginValues()
|
|||
|
||||
pluginFormatsValue.referTo (projectRoot, Ids::pluginFormats, getUndoManager(),
|
||||
Array<var> (Ids::buildVST3.toString(), Ids::buildAU.toString(), Ids::buildStandalone.toString()), ",");
|
||||
pluginCharacteristicsValue.referTo (projectRoot, Ids::pluginCharacteristicsValue, getUndoManager(), Array<var> (), ",");
|
||||
pluginCharacteristicsValue.referTo (projectRoot, Ids::pluginCharacteristicsValue, getUndoManager(), Array<var>(), ",");
|
||||
|
||||
pluginNameValue.referTo (projectRoot, Ids::pluginName, getUndoManager(), getProjectNameString());
|
||||
pluginDescriptionValue.referTo (projectRoot, Ids::pluginDesc, getUndoManager(), getProjectNameString());
|
||||
|
|
@ -1415,8 +1415,8 @@ void Project::createPropertyEditors (PropertyListBuilder& props)
|
|||
|
||||
for (int i = 0; i < types.size(); ++i)
|
||||
{
|
||||
projectTypeNames.add (types.getUnchecked(i)->getDescription());
|
||||
projectTypeCodes.add (types.getUnchecked(i)->getType());
|
||||
projectTypeNames.add (types.getUnchecked (i)->getDescription());
|
||||
projectTypeCodes.add (types.getUnchecked (i)->getType());
|
||||
}
|
||||
|
||||
props.add (new ChoicePropertyComponent (projectTypeValue, "Project Type", projectTypeNames, projectTypeCodes),
|
||||
|
|
@ -1698,7 +1698,7 @@ Project::Item Project::Item::findItemWithID (const String& targetId) const
|
|||
{
|
||||
for (auto i = getNumChildren(); --i >= 0;)
|
||||
{
|
||||
auto found = getChild(i).findItemWithID (targetId);
|
||||
auto found = getChild (i).findItemWithID (targetId);
|
||||
|
||||
if (found.isValid())
|
||||
return found;
|
||||
|
|
@ -1819,7 +1819,7 @@ Project::Item Project::Item::findItemForFile (const File& file) const
|
|||
{
|
||||
for (auto i = getNumChildren(); --i >= 0;)
|
||||
{
|
||||
auto found = getChild(i).findItemForFile (file);
|
||||
auto found = getChild (i).findItemForFile (file);
|
||||
|
||||
if (found.isValid())
|
||||
return found;
|
||||
|
|
@ -1836,7 +1836,7 @@ File Project::Item::determineGroupFolder() const
|
|||
|
||||
for (int i = 0; i < getNumChildren(); ++i)
|
||||
{
|
||||
f = getChild(i).getFile();
|
||||
f = getChild (i).getFile();
|
||||
|
||||
if (f.exists())
|
||||
return f.getParentDirectory();
|
||||
|
|
@ -1873,7 +1873,7 @@ void Project::Item::initialiseMissingProperties()
|
|||
else if (isGroup())
|
||||
{
|
||||
for (auto i = getNumChildren(); --i >= 0;)
|
||||
getChild(i).initialiseMissingProperties();
|
||||
getChild (i).initialiseMissingProperties();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1960,7 +1960,7 @@ void Project::Item::sortAlphabetically (bool keepGroupsAtStart, bool recursive)
|
|||
|
||||
if (recursive)
|
||||
for (auto i = getNumChildren(); --i >= 0;)
|
||||
getChild(i).sortAlphabetically (keepGroupsAtStart, true);
|
||||
getChild (i).sortAlphabetically (keepGroupsAtStart, true);
|
||||
}
|
||||
|
||||
Project::Item Project::Item::getOrCreateSubGroup (const String& name)
|
||||
|
|
@ -2831,9 +2831,9 @@ StringPairArray Project::getAudioPluginFlags() const
|
|||
flags.set ("JucePlugin_VSTNumMidiOutputs", getVSTNumMIDIOutputsString());
|
||||
flags.set ("JucePlugin_ARAContentTypes", String (getARAContentTypes()));
|
||||
flags.set ("JucePlugin_ARATransformationFlags", String (getARATransformationFlags()));
|
||||
flags.set ("JucePlugin_ARAFactoryID", toStringLiteral(getARAFactoryIDString()));
|
||||
flags.set ("JucePlugin_ARADocumentArchiveID", toStringLiteral(getARADocumentArchiveIDString()));
|
||||
flags.set ("JucePlugin_ARACompatibleArchiveIDs", toStringLiteral(getARACompatibleArchiveIDStrings()));
|
||||
flags.set ("JucePlugin_ARAFactoryID", toStringLiteral (getARAFactoryIDString()));
|
||||
flags.set ("JucePlugin_ARADocumentArchiveID", toStringLiteral (getARADocumentArchiveIDString()));
|
||||
flags.set ("JucePlugin_ARACompatibleArchiveIDs", toStringLiteral (getARACompatibleArchiveIDStrings()));
|
||||
|
||||
{
|
||||
String plugInChannelConfig = getPluginChannelConfigsString();
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ private:
|
|||
|
||||
if (! first)
|
||||
{
|
||||
ProjectExporter::BuildConfiguration::Ptr config (getConfiguration(0));
|
||||
ProjectExporter::BuildConfiguration::Ptr config (getConfiguration (0));
|
||||
|
||||
if (config)
|
||||
{
|
||||
|
|
@ -836,7 +836,7 @@ private:
|
|||
auto numConfigs = getNumConfigurations();
|
||||
for (int i = 0; i < numConfigs; ++i)
|
||||
{
|
||||
auto config = getConfiguration(i);
|
||||
auto config = getConfiguration (i);
|
||||
|
||||
if (config->isDebug()) numDebugConfigs++;
|
||||
|
||||
|
|
@ -954,7 +954,7 @@ private:
|
|||
return mo.toString();
|
||||
}
|
||||
|
||||
void addModuleJavaFolderToSourceSet(StringArray& javaSourceSets, const File& source) const
|
||||
void addModuleJavaFolderToSourceSet (StringArray& javaSourceSets, const File& source) const
|
||||
{
|
||||
if (source.isDirectory())
|
||||
{
|
||||
|
|
@ -1493,7 +1493,7 @@ private:
|
|||
Array<std::pair<build_tools::RelativePath, String>>& extraCompilerFlags) const
|
||||
{
|
||||
for (int i = 0; i < getAllGroups().size(); ++i)
|
||||
addCompileUnits (getAllGroups().getReference(i), mo, excludeFromBuild, extraCompilerFlags);
|
||||
addCompileUnits (getAllGroups().getReference (i), mo, excludeFromBuild, extraCompilerFlags);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -895,7 +895,7 @@ private:
|
|||
if (projectItem.isGroup())
|
||||
{
|
||||
for (int i = 0; i < projectItem.getNumChildren(); ++i)
|
||||
addCompileUnits (projectItem.getChild(i), xml);
|
||||
addCompileUnits (projectItem.getChild (i), xml);
|
||||
}
|
||||
else if (projectItem.shouldBeAddedToTargetProject() && projectItem.shouldBeAddedToTargetExporter (*this))
|
||||
{
|
||||
|
|
@ -947,7 +947,7 @@ private:
|
|||
}
|
||||
|
||||
for (int i = 0; i < getAllGroups().size(); ++i)
|
||||
addCompileUnits (getAllGroups().getReference(i), xml);
|
||||
addCompileUnits (getAllGroups().getReference (i), xml);
|
||||
|
||||
if (hasResourceFile())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ void JucerResourceFile::addResourcesFromProjectItem (const Project::Item& projec
|
|||
if (projectItem.isGroup())
|
||||
{
|
||||
for (int i = 0; i < projectItem.getNumChildren(); ++i)
|
||||
addResourcesFromProjectItem (projectItem.getChild(i));
|
||||
addResourcesFromProjectItem (projectItem.getChild (i));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ AppearanceSettings::AppearanceSettings (bool updateAppWhenChanged)
|
|||
|
||||
for (int i = cs.types.size(); --i >= 0;)
|
||||
{
|
||||
auto& t = cs.types.getReference(i);
|
||||
auto& t = cs.types.getReference (i);
|
||||
getColourValue (t.name) = t.colour.toString();
|
||||
}
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ StringArray AppearanceSettings::getPresetSchemes()
|
|||
{
|
||||
StringArray s;
|
||||
for (int i = 0; i < presetSchemeFiles.size(); ++i)
|
||||
s.add (presetSchemeFiles.getReference(i).getFileNameWithoutExtension());
|
||||
s.add (presetSchemeFiles.getReference (i).getFileNameWithoutExtension());
|
||||
|
||||
return s;
|
||||
}
|
||||
|
|
@ -165,7 +165,7 @@ void AppearanceSettings::applyToCodeEditor (CodeEditorComponent& editor) const
|
|||
|
||||
for (int i = cs.types.size(); --i >= 0;)
|
||||
{
|
||||
CodeEditorComponent::ColourScheme::TokenType& t = cs.types.getReference(i);
|
||||
CodeEditorComponent::ColourScheme::TokenType& t = cs.types.getReference (i);
|
||||
getColour (t.name, t.colour);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ PropertiesFile& StoredSettings::getProjectProperties (const String& projectUID)
|
|||
|
||||
for (auto i = propertyFiles.size(); --i >= 0;)
|
||||
{
|
||||
auto* const props = propertyFiles.getUnchecked(i);
|
||||
auto* const props = propertyFiles.getUnchecked (i);
|
||||
if (props->getFile().getFileNameWithoutExtension() == filename)
|
||||
return *props;
|
||||
}
|
||||
|
|
@ -127,7 +127,7 @@ void StoredSettings::flush()
|
|||
saveSwatchColours();
|
||||
|
||||
for (auto i = propertyFiles.size(); --i >= 0;)
|
||||
propertyFiles.getUnchecked(i)->saveIfNeeded();
|
||||
propertyFiles.getUnchecked (i)->saveIfNeeded();
|
||||
}
|
||||
|
||||
void StoredSettings::reload()
|
||||
|
|
@ -166,7 +166,7 @@ void StoredSettings::setLastProjects (const Array<File>& files)
|
|||
{
|
||||
StringArray s;
|
||||
for (int i = 0; i < files.size(); ++i)
|
||||
s.add (files.getReference(i).getFullPathName());
|
||||
s.add (files.getReference (i).getFullPathName());
|
||||
|
||||
getGlobalProperties().setValue ("lastProjects", s.joinIntoString ("|"));
|
||||
}
|
||||
|
|
@ -233,7 +233,7 @@ void StoredSettings::saveSwatchColours()
|
|||
auto& props = getGlobalProperties();
|
||||
|
||||
for (auto i = 0; i < swatchColours.size(); ++i)
|
||||
props.setValue ("swatchColour" + String (i), swatchColours.getReference(i).toString());
|
||||
props.setValue ("swatchColour" + String (i), swatchColours.getReference (i).toString());
|
||||
}
|
||||
|
||||
StoredSettings::ColourSelectorWithSwatches::ColourSelectorWithSwatches() {}
|
||||
|
|
|
|||
|
|
@ -132,12 +132,12 @@ namespace CodeHelpers
|
|||
}
|
||||
|
||||
for (int i = 0; i < lines.size(); ++i)
|
||||
lines.getReference(i) = CppTokeniserFunctions::addEscapeChars (lines.getReference(i));
|
||||
lines.getReference (i) = CppTokeniserFunctions::addEscapeChars (lines.getReference (i));
|
||||
|
||||
lines.removeEmptyStrings();
|
||||
|
||||
for (int i = 0; i < lines.size(); ++i)
|
||||
lines.getReference(i) = "\"" + lines.getReference(i) + "\"";
|
||||
lines.getReference (i) = "\"" + lines.getReference (i) + "\"";
|
||||
|
||||
String result (lines.joinIntoString (newLine));
|
||||
|
||||
|
|
|
|||
|
|
@ -23,140 +23,140 @@
|
|||
==============================================================================
|
||||
*/
|
||||
|
||||
COL(black)
|
||||
COL(white)
|
||||
COL(blue)
|
||||
COL(grey)
|
||||
COL(green)
|
||||
COL(red)
|
||||
COL(yellow)
|
||||
COL(aliceblue)
|
||||
COL(antiquewhite)
|
||||
COL(aqua)
|
||||
COL(aquamarine)
|
||||
COL(azure)
|
||||
COL(beige)
|
||||
COL(bisque)
|
||||
COL(blanchedalmond)
|
||||
COL(blueviolet)
|
||||
COL(brown)
|
||||
COL(burlywood)
|
||||
COL(cadetblue)
|
||||
COL(chartreuse)
|
||||
COL(chocolate)
|
||||
COL(coral)
|
||||
COL(cornflowerblue)
|
||||
COL(cornsilk)
|
||||
COL(crimson)
|
||||
COL(cyan)
|
||||
COL(darkblue)
|
||||
COL(darkcyan)
|
||||
COL(darkgoldenrod)
|
||||
COL(darkgrey)
|
||||
COL(darkgreen)
|
||||
COL(darkkhaki)
|
||||
COL(darkmagenta)
|
||||
COL(darkolivegreen)
|
||||
COL(darkorange)
|
||||
COL(darkorchid)
|
||||
COL(darkred)
|
||||
COL(darksalmon)
|
||||
COL(darkseagreen)
|
||||
COL(darkslateblue)
|
||||
COL(darkslategrey)
|
||||
COL(darkturquoise)
|
||||
COL(darkviolet)
|
||||
COL(deeppink)
|
||||
COL(deepskyblue)
|
||||
COL(dimgrey)
|
||||
COL(dodgerblue)
|
||||
COL(firebrick)
|
||||
COL(floralwhite)
|
||||
COL(forestgreen)
|
||||
COL(fuchsia)
|
||||
COL(gainsboro)
|
||||
COL(gold)
|
||||
COL(goldenrod)
|
||||
COL(greenyellow)
|
||||
COL(honeydew)
|
||||
COL(hotpink)
|
||||
COL(indianred)
|
||||
COL(indigo)
|
||||
COL(ivory)
|
||||
COL(khaki)
|
||||
COL(lavender)
|
||||
COL(lavenderblush)
|
||||
COL(lemonchiffon)
|
||||
COL(lightblue)
|
||||
COL(lightcoral)
|
||||
COL(lightcyan)
|
||||
COL(lightgoldenrodyellow)
|
||||
COL(lightgreen)
|
||||
COL(lightgrey)
|
||||
COL(lightpink)
|
||||
COL(lightsalmon)
|
||||
COL(lightseagreen)
|
||||
COL(lightskyblue)
|
||||
COL(lightslategrey)
|
||||
COL(lightsteelblue)
|
||||
COL(lightyellow)
|
||||
COL(lime)
|
||||
COL(limegreen)
|
||||
COL(linen)
|
||||
COL(magenta)
|
||||
COL(maroon)
|
||||
COL(mediumaquamarine)
|
||||
COL(mediumblue)
|
||||
COL(mediumorchid)
|
||||
COL(mediumpurple)
|
||||
COL(mediumseagreen)
|
||||
COL(mediumslateblue)
|
||||
COL(mediumspringgreen)
|
||||
COL(mediumturquoise)
|
||||
COL(mediumvioletred)
|
||||
COL(midnightblue)
|
||||
COL(mintcream)
|
||||
COL(mistyrose)
|
||||
COL(navajowhite)
|
||||
COL(navy)
|
||||
COL(oldlace)
|
||||
COL(olive)
|
||||
COL(olivedrab)
|
||||
COL(orange)
|
||||
COL(orangered)
|
||||
COL(orchid)
|
||||
COL(palegoldenrod)
|
||||
COL(palegreen)
|
||||
COL(paleturquoise)
|
||||
COL(palevioletred)
|
||||
COL(papayawhip)
|
||||
COL(peachpuff)
|
||||
COL(peru)
|
||||
COL(pink)
|
||||
COL(plum)
|
||||
COL(powderblue)
|
||||
COL(purple)
|
||||
COL(rosybrown)
|
||||
COL(royalblue)
|
||||
COL(saddlebrown)
|
||||
COL(salmon)
|
||||
COL(sandybrown)
|
||||
COL(seagreen)
|
||||
COL(seashell)
|
||||
COL(sienna)
|
||||
COL(silver)
|
||||
COL(skyblue)
|
||||
COL(slateblue)
|
||||
COL(slategrey)
|
||||
COL(snow)
|
||||
COL(springgreen)
|
||||
COL(steelblue)
|
||||
COL(tan)
|
||||
COL(teal)
|
||||
COL(thistle)
|
||||
COL(tomato)
|
||||
COL(turquoise)
|
||||
COL(violet)
|
||||
COL(wheat)
|
||||
COL(whitesmoke)
|
||||
COL(yellowgreen)
|
||||
COL (black)
|
||||
COL (white)
|
||||
COL (blue)
|
||||
COL (grey)
|
||||
COL (green)
|
||||
COL (red)
|
||||
COL (yellow)
|
||||
COL (aliceblue)
|
||||
COL (antiquewhite)
|
||||
COL (aqua)
|
||||
COL (aquamarine)
|
||||
COL (azure)
|
||||
COL (beige)
|
||||
COL (bisque)
|
||||
COL (blanchedalmond)
|
||||
COL (blueviolet)
|
||||
COL (brown)
|
||||
COL (burlywood)
|
||||
COL (cadetblue)
|
||||
COL (chartreuse)
|
||||
COL (chocolate)
|
||||
COL (coral)
|
||||
COL (cornflowerblue)
|
||||
COL (cornsilk)
|
||||
COL (crimson)
|
||||
COL (cyan)
|
||||
COL (darkblue)
|
||||
COL (darkcyan)
|
||||
COL (darkgoldenrod)
|
||||
COL (darkgrey)
|
||||
COL (darkgreen)
|
||||
COL (darkkhaki)
|
||||
COL (darkmagenta)
|
||||
COL (darkolivegreen)
|
||||
COL (darkorange)
|
||||
COL (darkorchid)
|
||||
COL (darkred)
|
||||
COL (darksalmon)
|
||||
COL (darkseagreen)
|
||||
COL (darkslateblue)
|
||||
COL (darkslategrey)
|
||||
COL (darkturquoise)
|
||||
COL (darkviolet)
|
||||
COL (deeppink)
|
||||
COL (deepskyblue)
|
||||
COL (dimgrey)
|
||||
COL (dodgerblue)
|
||||
COL (firebrick)
|
||||
COL (floralwhite)
|
||||
COL (forestgreen)
|
||||
COL (fuchsia)
|
||||
COL (gainsboro)
|
||||
COL (gold)
|
||||
COL (goldenrod)
|
||||
COL (greenyellow)
|
||||
COL (honeydew)
|
||||
COL (hotpink)
|
||||
COL (indianred)
|
||||
COL (indigo)
|
||||
COL (ivory)
|
||||
COL (khaki)
|
||||
COL (lavender)
|
||||
COL (lavenderblush)
|
||||
COL (lemonchiffon)
|
||||
COL (lightblue)
|
||||
COL (lightcoral)
|
||||
COL (lightcyan)
|
||||
COL (lightgoldenrodyellow)
|
||||
COL (lightgreen)
|
||||
COL (lightgrey)
|
||||
COL (lightpink)
|
||||
COL (lightsalmon)
|
||||
COL (lightseagreen)
|
||||
COL (lightskyblue)
|
||||
COL (lightslategrey)
|
||||
COL (lightsteelblue)
|
||||
COL (lightyellow)
|
||||
COL (lime)
|
||||
COL (limegreen)
|
||||
COL (linen)
|
||||
COL (magenta)
|
||||
COL (maroon)
|
||||
COL (mediumaquamarine)
|
||||
COL (mediumblue)
|
||||
COL (mediumorchid)
|
||||
COL (mediumpurple)
|
||||
COL (mediumseagreen)
|
||||
COL (mediumslateblue)
|
||||
COL (mediumspringgreen)
|
||||
COL (mediumturquoise)
|
||||
COL (mediumvioletred)
|
||||
COL (midnightblue)
|
||||
COL (mintcream)
|
||||
COL (mistyrose)
|
||||
COL (navajowhite)
|
||||
COL (navy)
|
||||
COL (oldlace)
|
||||
COL (olive)
|
||||
COL (olivedrab)
|
||||
COL (orange)
|
||||
COL (orangered)
|
||||
COL (orchid)
|
||||
COL (palegoldenrod)
|
||||
COL (palegreen)
|
||||
COL (paleturquoise)
|
||||
COL (palevioletred)
|
||||
COL (papayawhip)
|
||||
COL (peachpuff)
|
||||
COL (peru)
|
||||
COL (pink)
|
||||
COL (plum)
|
||||
COL (powderblue)
|
||||
COL (purple)
|
||||
COL (rosybrown)
|
||||
COL (royalblue)
|
||||
COL (saddlebrown)
|
||||
COL (salmon)
|
||||
COL (sandybrown)
|
||||
COL (seagreen)
|
||||
COL (seashell)
|
||||
COL (sienna)
|
||||
COL (silver)
|
||||
COL (skyblue)
|
||||
COL (slateblue)
|
||||
COL (slategrey)
|
||||
COL (snow)
|
||||
COL (springgreen)
|
||||
COL (steelblue)
|
||||
COL (tan)
|
||||
COL (teal)
|
||||
COL (thistle)
|
||||
COL (tomato)
|
||||
COL (turquoise)
|
||||
COL (violet)
|
||||
COL (wheat)
|
||||
COL (whitesmoke)
|
||||
COL (yellowgreen)
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ struct PropertyListBuilder
|
|||
void setPreferredHeight (int height)
|
||||
{
|
||||
for (int j = components.size(); --j >= 0;)
|
||||
components.getUnchecked(j)->setPreferredHeight (height);
|
||||
components.getUnchecked (j)->setPreferredHeight (height);
|
||||
}
|
||||
|
||||
Array<PropertyComponent*> components;
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ NewFileWizard::~NewFileWizard()
|
|||
void NewFileWizard::addWizardsToMenu (PopupMenu& m) const
|
||||
{
|
||||
for (int i = 0; i < wizards.size(); ++i)
|
||||
m.addItem (menuBaseID + i, "Add New " + wizards.getUnchecked(i)->getName() + "...");
|
||||
m.addItem (menuBaseID + i, "Add New " + wizards.getUnchecked (i)->getName() + "...");
|
||||
}
|
||||
|
||||
bool NewFileWizard::runWizardFromMenu (int chosenMenuItemID, Project& project, const Project::Item& projectGroupToAddTo) const
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ struct TranslationHelpers
|
|||
const auto file = i.getFile();
|
||||
|
||||
if (file.hasFileExtension (sourceOrHeaderFileExtensions))
|
||||
scanFileForTranslations(strings, file);
|
||||
scanFileForTranslations (strings, file);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -186,13 +186,13 @@ struct TranslationHelpers
|
|||
|
||||
for (int j = 0; j < modules.size(); ++j)
|
||||
{
|
||||
const File localFolder (modules.getUnchecked(j)->getFolder());
|
||||
const File localFolder (modules.getUnchecked (j)->getFolder());
|
||||
|
||||
Array<File> files;
|
||||
modules.getUnchecked(j)->findBrowseableFiles (localFolder, files);
|
||||
modules.getUnchecked (j)->findBrowseableFiles (localFolder, files);
|
||||
|
||||
for (int i = 0; i < files.size(); ++i)
|
||||
scanFileForTranslations (strings, files.getReference(i));
|
||||
scanFileForTranslations (strings, files.getReference (i));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -512,7 +512,7 @@ void ProjucerLookAndFeel::setupColours()
|
|||
setColour (BooleanPropertyComponent::outlineColourId, Colours::transparentBlack);
|
||||
setColour (BooleanPropertyComponent::backgroundColourId, findColour (widgetBackgroundColourId));
|
||||
setColour (ToggleButton::tickDisabledColourId, Colour (0xffa9a9a9));
|
||||
setColour (ToggleButton::tickColourId, findColour (defaultButtonBackgroundColourId).withMultipliedBrightness(1.3f));
|
||||
setColour (ToggleButton::tickColourId, findColour (defaultButtonBackgroundColourId).withMultipliedBrightness (1.3f));
|
||||
setColour (CodeEditorComponent::backgroundColourId, findColour (secondaryBackgroundColourId));
|
||||
setColour (CodeEditorComponent::lineNumberTextId, findColour (codeEditorLineNumberColourId));
|
||||
setColour (CodeEditorComponent::lineNumberBackgroundId, findColour (backgroundColourId));
|
||||
|
|
|
|||
|
|
@ -110,9 +110,9 @@ void SlidingPanelComponent::resized()
|
|||
.reduced ((content.getWidth() - dotSize * getNumTabs()) / 2, 10);
|
||||
|
||||
for (int i = 0; i < getNumTabs(); ++i)
|
||||
pages.getUnchecked(i)->dotButton->setBounds (dotHolder.removeFromLeft (dotSize));
|
||||
pages.getUnchecked (i)->dotButton->setBounds (dotHolder.removeFromLeft (dotSize));
|
||||
|
||||
for (int i = pages.size(); --i >= 0;)
|
||||
if (Component* c = pages.getUnchecked(i)->content)
|
||||
if (Component* c = pages.getUnchecked (i)->content)
|
||||
c->setBounds (content.translated (i * content.getWidth(), 0));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,105 +46,105 @@ String AudioChannelSet::getChannelTypeName (AudioChannelSet::ChannelType type)
|
|||
|
||||
switch (type)
|
||||
{
|
||||
case left: return NEEDS_TRANS("Left");
|
||||
case right: return NEEDS_TRANS("Right");
|
||||
case centre: return NEEDS_TRANS("Centre");
|
||||
case LFE: return NEEDS_TRANS("LFE");
|
||||
case leftSurround: return NEEDS_TRANS("Left Surround");
|
||||
case rightSurround: return NEEDS_TRANS("Right Surround");
|
||||
case leftCentre: return NEEDS_TRANS("Left Centre");
|
||||
case rightCentre: return NEEDS_TRANS("Right Centre");
|
||||
case centreSurround: return NEEDS_TRANS("Centre Surround");
|
||||
case leftSurroundRear: return NEEDS_TRANS("Left Surround Rear");
|
||||
case rightSurroundRear: return NEEDS_TRANS("Right Surround Rear");
|
||||
case topMiddle: return NEEDS_TRANS("Top Middle");
|
||||
case topFrontLeft: return NEEDS_TRANS("Top Front Left");
|
||||
case topFrontCentre: return NEEDS_TRANS("Top Front Centre");
|
||||
case topFrontRight: return NEEDS_TRANS("Top Front Right");
|
||||
case topRearLeft: return NEEDS_TRANS("Top Rear Left");
|
||||
case topRearCentre: return NEEDS_TRANS("Top Rear Centre");
|
||||
case topRearRight: return NEEDS_TRANS("Top Rear Right");
|
||||
case wideLeft: return NEEDS_TRANS("Wide Left");
|
||||
case wideRight: return NEEDS_TRANS("Wide Right");
|
||||
case LFE2: return NEEDS_TRANS("LFE 2");
|
||||
case leftSurroundSide: return NEEDS_TRANS("Left Surround Side");
|
||||
case rightSurroundSide: return NEEDS_TRANS("Right Surround Side");
|
||||
case ambisonicW: return NEEDS_TRANS("Ambisonic W");
|
||||
case ambisonicX: return NEEDS_TRANS("Ambisonic X");
|
||||
case ambisonicY: return NEEDS_TRANS("Ambisonic Y");
|
||||
case ambisonicZ: return NEEDS_TRANS("Ambisonic Z");
|
||||
case topSideLeft: return NEEDS_TRANS("Top Side Left");
|
||||
case topSideRight: return NEEDS_TRANS("Top Side Right");
|
||||
case ambisonicACN4: return NEEDS_TRANS("Ambisonic 4");
|
||||
case ambisonicACN5: return NEEDS_TRANS("Ambisonic 5");
|
||||
case ambisonicACN6: return NEEDS_TRANS("Ambisonic 6");
|
||||
case ambisonicACN7: return NEEDS_TRANS("Ambisonic 7");
|
||||
case ambisonicACN8: return NEEDS_TRANS("Ambisonic 8");
|
||||
case ambisonicACN9: return NEEDS_TRANS("Ambisonic 9");
|
||||
case ambisonicACN10: return NEEDS_TRANS("Ambisonic 10");
|
||||
case ambisonicACN11: return NEEDS_TRANS("Ambisonic 11");
|
||||
case ambisonicACN12: return NEEDS_TRANS("Ambisonic 12");
|
||||
case ambisonicACN13: return NEEDS_TRANS("Ambisonic 13");
|
||||
case ambisonicACN14: return NEEDS_TRANS("Ambisonic 14");
|
||||
case ambisonicACN15: return NEEDS_TRANS("Ambisonic 15");
|
||||
case ambisonicACN16: return NEEDS_TRANS("Ambisonic 16");
|
||||
case ambisonicACN17: return NEEDS_TRANS("Ambisonic 17");
|
||||
case ambisonicACN18: return NEEDS_TRANS("Ambisonic 18");
|
||||
case ambisonicACN19: return NEEDS_TRANS("Ambisonic 19");
|
||||
case ambisonicACN20: return NEEDS_TRANS("Ambisonic 20");
|
||||
case ambisonicACN21: return NEEDS_TRANS("Ambisonic 21");
|
||||
case ambisonicACN22: return NEEDS_TRANS("Ambisonic 22");
|
||||
case ambisonicACN23: return NEEDS_TRANS("Ambisonic 23");
|
||||
case ambisonicACN24: return NEEDS_TRANS("Ambisonic 24");
|
||||
case ambisonicACN25: return NEEDS_TRANS("Ambisonic 25");
|
||||
case ambisonicACN26: return NEEDS_TRANS("Ambisonic 26");
|
||||
case ambisonicACN27: return NEEDS_TRANS("Ambisonic 27");
|
||||
case ambisonicACN28: return NEEDS_TRANS("Ambisonic 28");
|
||||
case ambisonicACN29: return NEEDS_TRANS("Ambisonic 29");
|
||||
case ambisonicACN30: return NEEDS_TRANS("Ambisonic 30");
|
||||
case ambisonicACN31: return NEEDS_TRANS("Ambisonic 31");
|
||||
case ambisonicACN32: return NEEDS_TRANS("Ambisonic 32");
|
||||
case ambisonicACN33: return NEEDS_TRANS("Ambisonic 33");
|
||||
case ambisonicACN34: return NEEDS_TRANS("Ambisonic 34");
|
||||
case ambisonicACN35: return NEEDS_TRANS("Ambisonic 35");
|
||||
case ambisonicACN36: return NEEDS_TRANS("Ambisonic 36");
|
||||
case ambisonicACN37: return NEEDS_TRANS("Ambisonic 37");
|
||||
case ambisonicACN38: return NEEDS_TRANS("Ambisonic 38");
|
||||
case ambisonicACN39: return NEEDS_TRANS("Ambisonic 39");
|
||||
case ambisonicACN40: return NEEDS_TRANS("Ambisonic 40");
|
||||
case ambisonicACN41: return NEEDS_TRANS("Ambisonic 41");
|
||||
case ambisonicACN42: return NEEDS_TRANS("Ambisonic 42");
|
||||
case ambisonicACN43: return NEEDS_TRANS("Ambisonic 43");
|
||||
case ambisonicACN44: return NEEDS_TRANS("Ambisonic 44");
|
||||
case ambisonicACN45: return NEEDS_TRANS("Ambisonic 45");
|
||||
case ambisonicACN46: return NEEDS_TRANS("Ambisonic 46");
|
||||
case ambisonicACN47: return NEEDS_TRANS("Ambisonic 47");
|
||||
case ambisonicACN48: return NEEDS_TRANS("Ambisonic 48");
|
||||
case ambisonicACN49: return NEEDS_TRANS("Ambisonic 49");
|
||||
case ambisonicACN50: return NEEDS_TRANS("Ambisonic 50");
|
||||
case ambisonicACN51: return NEEDS_TRANS("Ambisonic 51");
|
||||
case ambisonicACN52: return NEEDS_TRANS("Ambisonic 52");
|
||||
case ambisonicACN53: return NEEDS_TRANS("Ambisonic 53");
|
||||
case ambisonicACN54: return NEEDS_TRANS("Ambisonic 54");
|
||||
case ambisonicACN55: return NEEDS_TRANS("Ambisonic 55");
|
||||
case ambisonicACN56: return NEEDS_TRANS("Ambisonic 56");
|
||||
case ambisonicACN57: return NEEDS_TRANS("Ambisonic 57");
|
||||
case ambisonicACN58: return NEEDS_TRANS("Ambisonic 58");
|
||||
case ambisonicACN59: return NEEDS_TRANS("Ambisonic 59");
|
||||
case ambisonicACN60: return NEEDS_TRANS("Ambisonic 60");
|
||||
case ambisonicACN61: return NEEDS_TRANS("Ambisonic 61");
|
||||
case ambisonicACN62: return NEEDS_TRANS("Ambisonic 62");
|
||||
case ambisonicACN63: return NEEDS_TRANS("Ambisonic 63");
|
||||
case bottomFrontLeft: return NEEDS_TRANS("Bottom Front Left");
|
||||
case bottomFrontCentre: return NEEDS_TRANS("Bottom Front Centre");
|
||||
case bottomFrontRight: return NEEDS_TRANS("Bottom Front Right");
|
||||
case proximityLeft: return NEEDS_TRANS("Proximity Left");
|
||||
case proximityRight: return NEEDS_TRANS("Proximity Right");
|
||||
case bottomSideLeft: return NEEDS_TRANS("Bottom Side Left");
|
||||
case bottomSideRight: return NEEDS_TRANS("Bottom Side Right");
|
||||
case bottomRearLeft: return NEEDS_TRANS("Bottom Rear Left");
|
||||
case bottomRearCentre: return NEEDS_TRANS("Bottom Rear Centre");
|
||||
case bottomRearRight: return NEEDS_TRANS("Bottom Rear Right");
|
||||
case left: return NEEDS_TRANS ("Left");
|
||||
case right: return NEEDS_TRANS ("Right");
|
||||
case centre: return NEEDS_TRANS ("Centre");
|
||||
case LFE: return NEEDS_TRANS ("LFE");
|
||||
case leftSurround: return NEEDS_TRANS ("Left Surround");
|
||||
case rightSurround: return NEEDS_TRANS ("Right Surround");
|
||||
case leftCentre: return NEEDS_TRANS ("Left Centre");
|
||||
case rightCentre: return NEEDS_TRANS ("Right Centre");
|
||||
case centreSurround: return NEEDS_TRANS ("Centre Surround");
|
||||
case leftSurroundRear: return NEEDS_TRANS ("Left Surround Rear");
|
||||
case rightSurroundRear: return NEEDS_TRANS ("Right Surround Rear");
|
||||
case topMiddle: return NEEDS_TRANS ("Top Middle");
|
||||
case topFrontLeft: return NEEDS_TRANS ("Top Front Left");
|
||||
case topFrontCentre: return NEEDS_TRANS ("Top Front Centre");
|
||||
case topFrontRight: return NEEDS_TRANS ("Top Front Right");
|
||||
case topRearLeft: return NEEDS_TRANS ("Top Rear Left");
|
||||
case topRearCentre: return NEEDS_TRANS ("Top Rear Centre");
|
||||
case topRearRight: return NEEDS_TRANS ("Top Rear Right");
|
||||
case wideLeft: return NEEDS_TRANS ("Wide Left");
|
||||
case wideRight: return NEEDS_TRANS ("Wide Right");
|
||||
case LFE2: return NEEDS_TRANS ("LFE 2");
|
||||
case leftSurroundSide: return NEEDS_TRANS ("Left Surround Side");
|
||||
case rightSurroundSide: return NEEDS_TRANS ("Right Surround Side");
|
||||
case ambisonicW: return NEEDS_TRANS ("Ambisonic W");
|
||||
case ambisonicX: return NEEDS_TRANS ("Ambisonic X");
|
||||
case ambisonicY: return NEEDS_TRANS ("Ambisonic Y");
|
||||
case ambisonicZ: return NEEDS_TRANS ("Ambisonic Z");
|
||||
case topSideLeft: return NEEDS_TRANS ("Top Side Left");
|
||||
case topSideRight: return NEEDS_TRANS ("Top Side Right");
|
||||
case ambisonicACN4: return NEEDS_TRANS ("Ambisonic 4");
|
||||
case ambisonicACN5: return NEEDS_TRANS ("Ambisonic 5");
|
||||
case ambisonicACN6: return NEEDS_TRANS ("Ambisonic 6");
|
||||
case ambisonicACN7: return NEEDS_TRANS ("Ambisonic 7");
|
||||
case ambisonicACN8: return NEEDS_TRANS ("Ambisonic 8");
|
||||
case ambisonicACN9: return NEEDS_TRANS ("Ambisonic 9");
|
||||
case ambisonicACN10: return NEEDS_TRANS ("Ambisonic 10");
|
||||
case ambisonicACN11: return NEEDS_TRANS ("Ambisonic 11");
|
||||
case ambisonicACN12: return NEEDS_TRANS ("Ambisonic 12");
|
||||
case ambisonicACN13: return NEEDS_TRANS ("Ambisonic 13");
|
||||
case ambisonicACN14: return NEEDS_TRANS ("Ambisonic 14");
|
||||
case ambisonicACN15: return NEEDS_TRANS ("Ambisonic 15");
|
||||
case ambisonicACN16: return NEEDS_TRANS ("Ambisonic 16");
|
||||
case ambisonicACN17: return NEEDS_TRANS ("Ambisonic 17");
|
||||
case ambisonicACN18: return NEEDS_TRANS ("Ambisonic 18");
|
||||
case ambisonicACN19: return NEEDS_TRANS ("Ambisonic 19");
|
||||
case ambisonicACN20: return NEEDS_TRANS ("Ambisonic 20");
|
||||
case ambisonicACN21: return NEEDS_TRANS ("Ambisonic 21");
|
||||
case ambisonicACN22: return NEEDS_TRANS ("Ambisonic 22");
|
||||
case ambisonicACN23: return NEEDS_TRANS ("Ambisonic 23");
|
||||
case ambisonicACN24: return NEEDS_TRANS ("Ambisonic 24");
|
||||
case ambisonicACN25: return NEEDS_TRANS ("Ambisonic 25");
|
||||
case ambisonicACN26: return NEEDS_TRANS ("Ambisonic 26");
|
||||
case ambisonicACN27: return NEEDS_TRANS ("Ambisonic 27");
|
||||
case ambisonicACN28: return NEEDS_TRANS ("Ambisonic 28");
|
||||
case ambisonicACN29: return NEEDS_TRANS ("Ambisonic 29");
|
||||
case ambisonicACN30: return NEEDS_TRANS ("Ambisonic 30");
|
||||
case ambisonicACN31: return NEEDS_TRANS ("Ambisonic 31");
|
||||
case ambisonicACN32: return NEEDS_TRANS ("Ambisonic 32");
|
||||
case ambisonicACN33: return NEEDS_TRANS ("Ambisonic 33");
|
||||
case ambisonicACN34: return NEEDS_TRANS ("Ambisonic 34");
|
||||
case ambisonicACN35: return NEEDS_TRANS ("Ambisonic 35");
|
||||
case ambisonicACN36: return NEEDS_TRANS ("Ambisonic 36");
|
||||
case ambisonicACN37: return NEEDS_TRANS ("Ambisonic 37");
|
||||
case ambisonicACN38: return NEEDS_TRANS ("Ambisonic 38");
|
||||
case ambisonicACN39: return NEEDS_TRANS ("Ambisonic 39");
|
||||
case ambisonicACN40: return NEEDS_TRANS ("Ambisonic 40");
|
||||
case ambisonicACN41: return NEEDS_TRANS ("Ambisonic 41");
|
||||
case ambisonicACN42: return NEEDS_TRANS ("Ambisonic 42");
|
||||
case ambisonicACN43: return NEEDS_TRANS ("Ambisonic 43");
|
||||
case ambisonicACN44: return NEEDS_TRANS ("Ambisonic 44");
|
||||
case ambisonicACN45: return NEEDS_TRANS ("Ambisonic 45");
|
||||
case ambisonicACN46: return NEEDS_TRANS ("Ambisonic 46");
|
||||
case ambisonicACN47: return NEEDS_TRANS ("Ambisonic 47");
|
||||
case ambisonicACN48: return NEEDS_TRANS ("Ambisonic 48");
|
||||
case ambisonicACN49: return NEEDS_TRANS ("Ambisonic 49");
|
||||
case ambisonicACN50: return NEEDS_TRANS ("Ambisonic 50");
|
||||
case ambisonicACN51: return NEEDS_TRANS ("Ambisonic 51");
|
||||
case ambisonicACN52: return NEEDS_TRANS ("Ambisonic 52");
|
||||
case ambisonicACN53: return NEEDS_TRANS ("Ambisonic 53");
|
||||
case ambisonicACN54: return NEEDS_TRANS ("Ambisonic 54");
|
||||
case ambisonicACN55: return NEEDS_TRANS ("Ambisonic 55");
|
||||
case ambisonicACN56: return NEEDS_TRANS ("Ambisonic 56");
|
||||
case ambisonicACN57: return NEEDS_TRANS ("Ambisonic 57");
|
||||
case ambisonicACN58: return NEEDS_TRANS ("Ambisonic 58");
|
||||
case ambisonicACN59: return NEEDS_TRANS ("Ambisonic 59");
|
||||
case ambisonicACN60: return NEEDS_TRANS ("Ambisonic 60");
|
||||
case ambisonicACN61: return NEEDS_TRANS ("Ambisonic 61");
|
||||
case ambisonicACN62: return NEEDS_TRANS ("Ambisonic 62");
|
||||
case ambisonicACN63: return NEEDS_TRANS ("Ambisonic 63");
|
||||
case bottomFrontLeft: return NEEDS_TRANS ("Bottom Front Left");
|
||||
case bottomFrontCentre: return NEEDS_TRANS ("Bottom Front Centre");
|
||||
case bottomFrontRight: return NEEDS_TRANS ("Bottom Front Right");
|
||||
case proximityLeft: return NEEDS_TRANS ("Proximity Left");
|
||||
case proximityRight: return NEEDS_TRANS ("Proximity Right");
|
||||
case bottomSideLeft: return NEEDS_TRANS ("Bottom Side Left");
|
||||
case bottomSideRight: return NEEDS_TRANS ("Bottom Side Right");
|
||||
case bottomRearLeft: return NEEDS_TRANS ("Bottom Rear Left");
|
||||
case bottomRearCentre: return NEEDS_TRANS ("Bottom Rear Centre");
|
||||
case bottomRearRight: return NEEDS_TRANS ("Bottom Rear Right");
|
||||
case discreteChannel0:
|
||||
case unknown:
|
||||
default: break;
|
||||
|
|
@ -487,7 +487,7 @@ int AudioChannelSet::size() const noexcept
|
|||
|
||||
AudioChannelSet::ChannelType AudioChannelSet::getTypeOfChannel (int index) const noexcept
|
||||
{
|
||||
int bit = channels.findNextSetBit(0);
|
||||
int bit = channels.findNextSetBit (0);
|
||||
|
||||
for (int i = 0; i < index && bit >= 0; ++i)
|
||||
bit = channels.findNextSetBit (bit + 1);
|
||||
|
|
@ -514,7 +514,7 @@ Array<AudioChannelSet::ChannelType> AudioChannelSet::getChannelTypes() const
|
|||
{
|
||||
Array<ChannelType> result;
|
||||
|
||||
for (int bit = channels.findNextSetBit(0); bit >= 0; bit = channels.findNextSetBit (bit + 1))
|
||||
for (int bit = channels.findNextSetBit (0); bit >= 0; bit = channels.findNextSetBit (bit + 1))
|
||||
result.add (static_cast<ChannelType> (bit));
|
||||
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ namespace MidiFileHelpers
|
|||
|
||||
for (int j = 0; j < numEvents; ++j)
|
||||
{
|
||||
auto& m = track->getEventPointer(j)->message;
|
||||
auto& m = track->getEventPointer (j)->message;
|
||||
|
||||
if ((m.*method)())
|
||||
results.addEvent (m);
|
||||
|
|
@ -439,7 +439,7 @@ void MidiFile::convertTimestampTicksToSeconds()
|
|||
{
|
||||
for (int j = ms->getNumEvents(); --j >= 0;)
|
||||
{
|
||||
auto& m = ms->getEventPointer(j)->message;
|
||||
auto& m = ms->getEventPointer (j)->message;
|
||||
m.setTimeStamp (MidiFileHelpers::convertTicksToSeconds (m.getTimeStamp(), tempoEvents, timeFormat));
|
||||
}
|
||||
}
|
||||
|
|
@ -475,7 +475,7 @@ bool MidiFile::writeTrack (OutputStream& mainOut, const MidiMessageSequence& ms)
|
|||
|
||||
for (int i = 0; i < ms.getNumEvents(); ++i)
|
||||
{
|
||||
auto& mm = ms.getEventPointer(i)->message;
|
||||
auto& mm = ms.getEventPointer (i)->message;
|
||||
|
||||
if (mm.isEndOfTrackMetaEvent())
|
||||
endOfTrackEventWritten = true;
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ void MidiMessage::setChannel (const int channel) noexcept
|
|||
|
||||
if ((data[0] & 0xf0) != (uint8) 0xf0)
|
||||
data[0] = (uint8) ((data[0] & (uint8) 0xf0)
|
||||
| (uint8)(channel - 1));
|
||||
| (uint8) (channel - 1));
|
||||
}
|
||||
|
||||
bool MidiMessage::isNoteOn (const bool returnTrueForVelocity0) const noexcept
|
||||
|
|
@ -1048,38 +1048,38 @@ const char* MidiMessage::getGMInstrumentName (const int n)
|
|||
{
|
||||
static const char* names[] =
|
||||
{
|
||||
NEEDS_TRANS("Acoustic Grand Piano"), NEEDS_TRANS("Bright Acoustic Piano"), NEEDS_TRANS("Electric Grand Piano"), NEEDS_TRANS("Honky-tonk Piano"),
|
||||
NEEDS_TRANS("Electric Piano 1"), NEEDS_TRANS("Electric Piano 2"), NEEDS_TRANS("Harpsichord"), NEEDS_TRANS("Clavinet"),
|
||||
NEEDS_TRANS("Celesta"), NEEDS_TRANS("Glockenspiel"), NEEDS_TRANS("Music Box"), NEEDS_TRANS("Vibraphone"),
|
||||
NEEDS_TRANS("Marimba"), NEEDS_TRANS("Xylophone"), NEEDS_TRANS("Tubular Bells"), NEEDS_TRANS("Dulcimer"),
|
||||
NEEDS_TRANS("Drawbar Organ"), NEEDS_TRANS("Percussive Organ"), NEEDS_TRANS("Rock Organ"), NEEDS_TRANS("Church Organ"),
|
||||
NEEDS_TRANS("Reed Organ"), NEEDS_TRANS("Accordion"), NEEDS_TRANS("Harmonica"), NEEDS_TRANS("Tango Accordion"),
|
||||
NEEDS_TRANS("Acoustic Guitar (nylon)"), NEEDS_TRANS("Acoustic Guitar (steel)"), NEEDS_TRANS("Electric Guitar (jazz)"), NEEDS_TRANS("Electric Guitar (clean)"),
|
||||
NEEDS_TRANS("Electric Guitar (mute)"), NEEDS_TRANS("Overdriven Guitar"), NEEDS_TRANS("Distortion Guitar"), NEEDS_TRANS("Guitar Harmonics"),
|
||||
NEEDS_TRANS("Acoustic Bass"), NEEDS_TRANS("Electric Bass (finger)"), NEEDS_TRANS("Electric Bass (pick)"), NEEDS_TRANS("Fretless Bass"),
|
||||
NEEDS_TRANS("Slap Bass 1"), NEEDS_TRANS("Slap Bass 2"), NEEDS_TRANS("Synth Bass 1"), NEEDS_TRANS("Synth Bass 2"),
|
||||
NEEDS_TRANS("Violin"), NEEDS_TRANS("Viola"), NEEDS_TRANS("Cello"), NEEDS_TRANS("Contrabass"),
|
||||
NEEDS_TRANS("Tremolo Strings"), NEEDS_TRANS("Pizzicato Strings"), NEEDS_TRANS("Orchestral Harp"), NEEDS_TRANS("Timpani"),
|
||||
NEEDS_TRANS("String Ensemble 1"), NEEDS_TRANS("String Ensemble 2"), NEEDS_TRANS("SynthStrings 1"), NEEDS_TRANS("SynthStrings 2"),
|
||||
NEEDS_TRANS("Choir Aahs"), NEEDS_TRANS("Voice Oohs"), NEEDS_TRANS("Synth Voice"), NEEDS_TRANS("Orchestra Hit"),
|
||||
NEEDS_TRANS("Trumpet"), NEEDS_TRANS("Trombone"), NEEDS_TRANS("Tuba"), NEEDS_TRANS("Muted Trumpet"),
|
||||
NEEDS_TRANS("French Horn"), NEEDS_TRANS("Brass Section"), NEEDS_TRANS("SynthBrass 1"), NEEDS_TRANS("SynthBrass 2"),
|
||||
NEEDS_TRANS("Soprano Sax"), NEEDS_TRANS("Alto Sax"), NEEDS_TRANS("Tenor Sax"), NEEDS_TRANS("Baritone Sax"),
|
||||
NEEDS_TRANS("Oboe"), NEEDS_TRANS("English Horn"), NEEDS_TRANS("Bassoon"), NEEDS_TRANS("Clarinet"),
|
||||
NEEDS_TRANS("Piccolo"), NEEDS_TRANS("Flute"), NEEDS_TRANS("Recorder"), NEEDS_TRANS("Pan Flute"),
|
||||
NEEDS_TRANS("Blown Bottle"), NEEDS_TRANS("Shakuhachi"), NEEDS_TRANS("Whistle"), NEEDS_TRANS("Ocarina"),
|
||||
NEEDS_TRANS("Lead 1 (square)"), NEEDS_TRANS("Lead 2 (sawtooth)"), NEEDS_TRANS("Lead 3 (calliope)"), NEEDS_TRANS("Lead 4 (chiff)"),
|
||||
NEEDS_TRANS("Lead 5 (charang)"), NEEDS_TRANS("Lead 6 (voice)"), NEEDS_TRANS("Lead 7 (fifths)"), NEEDS_TRANS("Lead 8 (bass+lead)"),
|
||||
NEEDS_TRANS("Pad 1 (new age)"), NEEDS_TRANS("Pad 2 (warm)"), NEEDS_TRANS("Pad 3 (polysynth)"), NEEDS_TRANS("Pad 4 (choir)"),
|
||||
NEEDS_TRANS("Pad 5 (bowed)"), NEEDS_TRANS("Pad 6 (metallic)"), NEEDS_TRANS("Pad 7 (halo)"), NEEDS_TRANS("Pad 8 (sweep)"),
|
||||
NEEDS_TRANS("FX 1 (rain)"), NEEDS_TRANS("FX 2 (soundtrack)"), NEEDS_TRANS("FX 3 (crystal)"), NEEDS_TRANS("FX 4 (atmosphere)"),
|
||||
NEEDS_TRANS("FX 5 (brightness)"), NEEDS_TRANS("FX 6 (goblins)"), NEEDS_TRANS("FX 7 (echoes)"), NEEDS_TRANS("FX 8 (sci-fi)"),
|
||||
NEEDS_TRANS("Sitar"), NEEDS_TRANS("Banjo"), NEEDS_TRANS("Shamisen"), NEEDS_TRANS("Koto"),
|
||||
NEEDS_TRANS("Kalimba"), NEEDS_TRANS("Bag pipe"), NEEDS_TRANS("Fiddle"), NEEDS_TRANS("Shanai"),
|
||||
NEEDS_TRANS("Tinkle Bell"), NEEDS_TRANS("Agogo"), NEEDS_TRANS("Steel Drums"), NEEDS_TRANS("Woodblock"),
|
||||
NEEDS_TRANS("Taiko Drum"), NEEDS_TRANS("Melodic Tom"), NEEDS_TRANS("Synth Drum"), NEEDS_TRANS("Reverse Cymbal"),
|
||||
NEEDS_TRANS("Guitar Fret Noise"), NEEDS_TRANS("Breath Noise"), NEEDS_TRANS("Seashore"), NEEDS_TRANS("Bird Tweet"),
|
||||
NEEDS_TRANS("Telephone Ring"), NEEDS_TRANS("Helicopter"), NEEDS_TRANS("Applause"), NEEDS_TRANS("Gunshot")
|
||||
NEEDS_TRANS ("Acoustic Grand Piano"), NEEDS_TRANS ("Bright Acoustic Piano"), NEEDS_TRANS ("Electric Grand Piano"), NEEDS_TRANS ("Honky-tonk Piano"),
|
||||
NEEDS_TRANS ("Electric Piano 1"), NEEDS_TRANS ("Electric Piano 2"), NEEDS_TRANS ("Harpsichord"), NEEDS_TRANS ("Clavinet"),
|
||||
NEEDS_TRANS ("Celesta"), NEEDS_TRANS ("Glockenspiel"), NEEDS_TRANS ("Music Box"), NEEDS_TRANS ("Vibraphone"),
|
||||
NEEDS_TRANS ("Marimba"), NEEDS_TRANS ("Xylophone"), NEEDS_TRANS ("Tubular Bells"), NEEDS_TRANS ("Dulcimer"),
|
||||
NEEDS_TRANS ("Drawbar Organ"), NEEDS_TRANS ("Percussive Organ"), NEEDS_TRANS ("Rock Organ"), NEEDS_TRANS ("Church Organ"),
|
||||
NEEDS_TRANS ("Reed Organ"), NEEDS_TRANS ("Accordion"), NEEDS_TRANS ("Harmonica"), NEEDS_TRANS ("Tango Accordion"),
|
||||
NEEDS_TRANS ("Acoustic Guitar (nylon)"), NEEDS_TRANS ("Acoustic Guitar (steel)"), NEEDS_TRANS ("Electric Guitar (jazz)"), NEEDS_TRANS ("Electric Guitar (clean)"),
|
||||
NEEDS_TRANS ("Electric Guitar (mute)"), NEEDS_TRANS ("Overdriven Guitar"), NEEDS_TRANS ("Distortion Guitar"), NEEDS_TRANS ("Guitar Harmonics"),
|
||||
NEEDS_TRANS ("Acoustic Bass"), NEEDS_TRANS ("Electric Bass (finger)"), NEEDS_TRANS ("Electric Bass (pick)"), NEEDS_TRANS ("Fretless Bass"),
|
||||
NEEDS_TRANS ("Slap Bass 1"), NEEDS_TRANS ("Slap Bass 2"), NEEDS_TRANS ("Synth Bass 1"), NEEDS_TRANS ("Synth Bass 2"),
|
||||
NEEDS_TRANS ("Violin"), NEEDS_TRANS ("Viola"), NEEDS_TRANS ("Cello"), NEEDS_TRANS ("Contrabass"),
|
||||
NEEDS_TRANS ("Tremolo Strings"), NEEDS_TRANS ("Pizzicato Strings"), NEEDS_TRANS ("Orchestral Harp"), NEEDS_TRANS ("Timpani"),
|
||||
NEEDS_TRANS ("String Ensemble 1"), NEEDS_TRANS ("String Ensemble 2"), NEEDS_TRANS ("SynthStrings 1"), NEEDS_TRANS ("SynthStrings 2"),
|
||||
NEEDS_TRANS ("Choir Aahs"), NEEDS_TRANS ("Voice Oohs"), NEEDS_TRANS ("Synth Voice"), NEEDS_TRANS ("Orchestra Hit"),
|
||||
NEEDS_TRANS ("Trumpet"), NEEDS_TRANS ("Trombone"), NEEDS_TRANS ("Tuba"), NEEDS_TRANS ("Muted Trumpet"),
|
||||
NEEDS_TRANS ("French Horn"), NEEDS_TRANS ("Brass Section"), NEEDS_TRANS ("SynthBrass 1"), NEEDS_TRANS ("SynthBrass 2"),
|
||||
NEEDS_TRANS ("Soprano Sax"), NEEDS_TRANS ("Alto Sax"), NEEDS_TRANS ("Tenor Sax"), NEEDS_TRANS ("Baritone Sax"),
|
||||
NEEDS_TRANS ("Oboe"), NEEDS_TRANS ("English Horn"), NEEDS_TRANS ("Bassoon"), NEEDS_TRANS ("Clarinet"),
|
||||
NEEDS_TRANS ("Piccolo"), NEEDS_TRANS ("Flute"), NEEDS_TRANS ("Recorder"), NEEDS_TRANS ("Pan Flute"),
|
||||
NEEDS_TRANS ("Blown Bottle"), NEEDS_TRANS ("Shakuhachi"), NEEDS_TRANS ("Whistle"), NEEDS_TRANS ("Ocarina"),
|
||||
NEEDS_TRANS ("Lead 1 (square)"), NEEDS_TRANS ("Lead 2 (sawtooth)"), NEEDS_TRANS ("Lead 3 (calliope)"), NEEDS_TRANS ("Lead 4 (chiff)"),
|
||||
NEEDS_TRANS ("Lead 5 (charang)"), NEEDS_TRANS ("Lead 6 (voice)"), NEEDS_TRANS ("Lead 7 (fifths)"), NEEDS_TRANS ("Lead 8 (bass+lead)"),
|
||||
NEEDS_TRANS ("Pad 1 (new age)"), NEEDS_TRANS ("Pad 2 (warm)"), NEEDS_TRANS ("Pad 3 (polysynth)"), NEEDS_TRANS ("Pad 4 (choir)"),
|
||||
NEEDS_TRANS ("Pad 5 (bowed)"), NEEDS_TRANS ("Pad 6 (metallic)"), NEEDS_TRANS ("Pad 7 (halo)"), NEEDS_TRANS ("Pad 8 (sweep)"),
|
||||
NEEDS_TRANS ("FX 1 (rain)"), NEEDS_TRANS ("FX 2 (soundtrack)"), NEEDS_TRANS ("FX 3 (crystal)"), NEEDS_TRANS ("FX 4 (atmosphere)"),
|
||||
NEEDS_TRANS ("FX 5 (brightness)"), NEEDS_TRANS ("FX 6 (goblins)"), NEEDS_TRANS ("FX 7 (echoes)"), NEEDS_TRANS ("FX 8 (sci-fi)"),
|
||||
NEEDS_TRANS ("Sitar"), NEEDS_TRANS ("Banjo"), NEEDS_TRANS ("Shamisen"), NEEDS_TRANS ("Koto"),
|
||||
NEEDS_TRANS ("Kalimba"), NEEDS_TRANS ("Bag pipe"), NEEDS_TRANS ("Fiddle"), NEEDS_TRANS ("Shanai"),
|
||||
NEEDS_TRANS ("Tinkle Bell"), NEEDS_TRANS ("Agogo"), NEEDS_TRANS ("Steel Drums"), NEEDS_TRANS ("Woodblock"),
|
||||
NEEDS_TRANS ("Taiko Drum"), NEEDS_TRANS ("Melodic Tom"), NEEDS_TRANS ("Synth Drum"), NEEDS_TRANS ("Reverse Cymbal"),
|
||||
NEEDS_TRANS ("Guitar Fret Noise"), NEEDS_TRANS ("Breath Noise"), NEEDS_TRANS ("Seashore"), NEEDS_TRANS ("Bird Tweet"),
|
||||
NEEDS_TRANS ("Telephone Ring"), NEEDS_TRANS ("Helicopter"), NEEDS_TRANS ("Applause"), NEEDS_TRANS ("Gunshot")
|
||||
};
|
||||
|
||||
return isPositiveAndBelow (n, numElementsInArray (names)) ? names[n] : nullptr;
|
||||
|
|
@ -1089,10 +1089,10 @@ const char* MidiMessage::getGMInstrumentBankName (const int n)
|
|||
{
|
||||
static const char* names[] =
|
||||
{
|
||||
NEEDS_TRANS("Piano"), NEEDS_TRANS("Chromatic Percussion"), NEEDS_TRANS("Organ"), NEEDS_TRANS("Guitar"),
|
||||
NEEDS_TRANS("Bass"), NEEDS_TRANS("Strings"), NEEDS_TRANS("Ensemble"), NEEDS_TRANS("Brass"),
|
||||
NEEDS_TRANS("Reed"), NEEDS_TRANS("Pipe"), NEEDS_TRANS("Synth Lead"), NEEDS_TRANS("Synth Pad"),
|
||||
NEEDS_TRANS("Synth Effects"), NEEDS_TRANS("Ethnic"), NEEDS_TRANS("Percussive"), NEEDS_TRANS("Sound Effects")
|
||||
NEEDS_TRANS ("Piano"), NEEDS_TRANS ("Chromatic Percussion"), NEEDS_TRANS ("Organ"), NEEDS_TRANS ("Guitar"),
|
||||
NEEDS_TRANS ("Bass"), NEEDS_TRANS ("Strings"), NEEDS_TRANS ("Ensemble"), NEEDS_TRANS ("Brass"),
|
||||
NEEDS_TRANS ("Reed"), NEEDS_TRANS ("Pipe"), NEEDS_TRANS ("Synth Lead"), NEEDS_TRANS ("Synth Pad"),
|
||||
NEEDS_TRANS ("Synth Effects"), NEEDS_TRANS ("Ethnic"), NEEDS_TRANS ("Percussive"), NEEDS_TRANS ("Sound Effects")
|
||||
};
|
||||
|
||||
return isPositiveAndBelow (n, numElementsInArray (names)) ? names[n] : nullptr;
|
||||
|
|
@ -1102,18 +1102,18 @@ const char* MidiMessage::getRhythmInstrumentName (const int n)
|
|||
{
|
||||
static const char* names[] =
|
||||
{
|
||||
NEEDS_TRANS("Acoustic Bass Drum"), NEEDS_TRANS("Bass Drum 1"), NEEDS_TRANS("Side Stick"), NEEDS_TRANS("Acoustic Snare"),
|
||||
NEEDS_TRANS("Hand Clap"), NEEDS_TRANS("Electric Snare"), NEEDS_TRANS("Low Floor Tom"), NEEDS_TRANS("Closed Hi-Hat"),
|
||||
NEEDS_TRANS("High Floor Tom"), NEEDS_TRANS("Pedal Hi-Hat"), NEEDS_TRANS("Low Tom"), NEEDS_TRANS("Open Hi-Hat"),
|
||||
NEEDS_TRANS("Low-Mid Tom"), NEEDS_TRANS("Hi-Mid Tom"), NEEDS_TRANS("Crash Cymbal 1"), NEEDS_TRANS("High Tom"),
|
||||
NEEDS_TRANS("Ride Cymbal 1"), NEEDS_TRANS("Chinese Cymbal"), NEEDS_TRANS("Ride Bell"), NEEDS_TRANS("Tambourine"),
|
||||
NEEDS_TRANS("Splash Cymbal"), NEEDS_TRANS("Cowbell"), NEEDS_TRANS("Crash Cymbal 2"), NEEDS_TRANS("Vibraslap"),
|
||||
NEEDS_TRANS("Ride Cymbal 2"), NEEDS_TRANS("Hi Bongo"), NEEDS_TRANS("Low Bongo"), NEEDS_TRANS("Mute Hi Conga"),
|
||||
NEEDS_TRANS("Open Hi Conga"), NEEDS_TRANS("Low Conga"), NEEDS_TRANS("High Timbale"), NEEDS_TRANS("Low Timbale"),
|
||||
NEEDS_TRANS("High Agogo"), NEEDS_TRANS("Low Agogo"), NEEDS_TRANS("Cabasa"), NEEDS_TRANS("Maracas"),
|
||||
NEEDS_TRANS("Short Whistle"), NEEDS_TRANS("Long Whistle"), NEEDS_TRANS("Short Guiro"), NEEDS_TRANS("Long Guiro"),
|
||||
NEEDS_TRANS("Claves"), NEEDS_TRANS("Hi Wood Block"), NEEDS_TRANS("Low Wood Block"), NEEDS_TRANS("Mute Cuica"),
|
||||
NEEDS_TRANS("Open Cuica"), NEEDS_TRANS("Mute Triangle"), NEEDS_TRANS("Open Triangle")
|
||||
NEEDS_TRANS ("Acoustic Bass Drum"), NEEDS_TRANS ("Bass Drum 1"), NEEDS_TRANS ("Side Stick"), NEEDS_TRANS ("Acoustic Snare"),
|
||||
NEEDS_TRANS ("Hand Clap"), NEEDS_TRANS ("Electric Snare"), NEEDS_TRANS ("Low Floor Tom"), NEEDS_TRANS ("Closed Hi-Hat"),
|
||||
NEEDS_TRANS ("High Floor Tom"), NEEDS_TRANS ("Pedal Hi-Hat"), NEEDS_TRANS ("Low Tom"), NEEDS_TRANS ("Open Hi-Hat"),
|
||||
NEEDS_TRANS ("Low-Mid Tom"), NEEDS_TRANS ("Hi-Mid Tom"), NEEDS_TRANS ("Crash Cymbal 1"), NEEDS_TRANS ("High Tom"),
|
||||
NEEDS_TRANS ("Ride Cymbal 1"), NEEDS_TRANS ("Chinese Cymbal"), NEEDS_TRANS ("Ride Bell"), NEEDS_TRANS ("Tambourine"),
|
||||
NEEDS_TRANS ("Splash Cymbal"), NEEDS_TRANS ("Cowbell"), NEEDS_TRANS ("Crash Cymbal 2"), NEEDS_TRANS ("Vibraslap"),
|
||||
NEEDS_TRANS ("Ride Cymbal 2"), NEEDS_TRANS ("Hi Bongo"), NEEDS_TRANS ("Low Bongo"), NEEDS_TRANS ("Mute Hi Conga"),
|
||||
NEEDS_TRANS ("Open Hi Conga"), NEEDS_TRANS ("Low Conga"), NEEDS_TRANS ("High Timbale"), NEEDS_TRANS ("Low Timbale"),
|
||||
NEEDS_TRANS ("High Agogo"), NEEDS_TRANS ("Low Agogo"), NEEDS_TRANS ("Cabasa"), NEEDS_TRANS ("Maracas"),
|
||||
NEEDS_TRANS ("Short Whistle"), NEEDS_TRANS ("Long Whistle"), NEEDS_TRANS ("Short Guiro"), NEEDS_TRANS ("Long Guiro"),
|
||||
NEEDS_TRANS ("Claves"), NEEDS_TRANS ("Hi Wood Block"), NEEDS_TRANS ("Low Wood Block"), NEEDS_TRANS ("Mute Cuica"),
|
||||
NEEDS_TRANS ("Open Cuica"), NEEDS_TRANS ("Mute Triangle"), NEEDS_TRANS ("Open Triangle")
|
||||
};
|
||||
|
||||
return (n >= 35 && n <= 81) ? names[n - 35] : nullptr;
|
||||
|
|
@ -1123,38 +1123,38 @@ const char* MidiMessage::getControllerName (const int n)
|
|||
{
|
||||
static const char* names[] =
|
||||
{
|
||||
NEEDS_TRANS("Bank Select"), NEEDS_TRANS("Modulation Wheel (coarse)"), NEEDS_TRANS("Breath controller (coarse)"),
|
||||
NEEDS_TRANS ("Bank Select"), NEEDS_TRANS ("Modulation Wheel (coarse)"), NEEDS_TRANS ("Breath controller (coarse)"),
|
||||
nullptr,
|
||||
NEEDS_TRANS("Foot Pedal (coarse)"), NEEDS_TRANS("Portamento Time (coarse)"), NEEDS_TRANS("Data Entry (coarse)"),
|
||||
NEEDS_TRANS("Volume (coarse)"), NEEDS_TRANS("Balance (coarse)"),
|
||||
NEEDS_TRANS ("Foot Pedal (coarse)"), NEEDS_TRANS ("Portamento Time (coarse)"), NEEDS_TRANS ("Data Entry (coarse)"),
|
||||
NEEDS_TRANS ("Volume (coarse)"), NEEDS_TRANS ("Balance (coarse)"),
|
||||
nullptr,
|
||||
NEEDS_TRANS("Pan position (coarse)"), NEEDS_TRANS("Expression (coarse)"), NEEDS_TRANS("Effect Control 1 (coarse)"),
|
||||
NEEDS_TRANS("Effect Control 2 (coarse)"),
|
||||
NEEDS_TRANS ("Pan position (coarse)"), NEEDS_TRANS ("Expression (coarse)"), NEEDS_TRANS ("Effect Control 1 (coarse)"),
|
||||
NEEDS_TRANS ("Effect Control 2 (coarse)"),
|
||||
nullptr, nullptr,
|
||||
NEEDS_TRANS("General Purpose Slider 1"), NEEDS_TRANS("General Purpose Slider 2"),
|
||||
NEEDS_TRANS("General Purpose Slider 3"), NEEDS_TRANS("General Purpose Slider 4"),
|
||||
NEEDS_TRANS ("General Purpose Slider 1"), NEEDS_TRANS ("General Purpose Slider 2"),
|
||||
NEEDS_TRANS ("General Purpose Slider 3"), NEEDS_TRANS ("General Purpose Slider 4"),
|
||||
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||
NEEDS_TRANS("Bank Select (fine)"), NEEDS_TRANS("Modulation Wheel (fine)"), NEEDS_TRANS("Breath controller (fine)"),
|
||||
NEEDS_TRANS ("Bank Select (fine)"), NEEDS_TRANS ("Modulation Wheel (fine)"), NEEDS_TRANS ("Breath controller (fine)"),
|
||||
nullptr,
|
||||
NEEDS_TRANS("Foot Pedal (fine)"), NEEDS_TRANS("Portamento Time (fine)"), NEEDS_TRANS("Data Entry (fine)"), NEEDS_TRANS("Volume (fine)"),
|
||||
NEEDS_TRANS("Balance (fine)"), nullptr, NEEDS_TRANS("Pan position (fine)"), NEEDS_TRANS("Expression (fine)"),
|
||||
NEEDS_TRANS("Effect Control 1 (fine)"), NEEDS_TRANS("Effect Control 2 (fine)"),
|
||||
NEEDS_TRANS ("Foot Pedal (fine)"), NEEDS_TRANS ("Portamento Time (fine)"), NEEDS_TRANS ("Data Entry (fine)"), NEEDS_TRANS ("Volume (fine)"),
|
||||
NEEDS_TRANS ("Balance (fine)"), nullptr, NEEDS_TRANS ("Pan position (fine)"), NEEDS_TRANS ("Expression (fine)"),
|
||||
NEEDS_TRANS ("Effect Control 1 (fine)"), NEEDS_TRANS ("Effect Control 2 (fine)"),
|
||||
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||
NEEDS_TRANS("Hold Pedal (on/off)"), NEEDS_TRANS("Portamento (on/off)"), NEEDS_TRANS("Sustenuto Pedal (on/off)"), NEEDS_TRANS("Soft Pedal (on/off)"),
|
||||
NEEDS_TRANS("Legato Pedal (on/off)"), NEEDS_TRANS("Hold 2 Pedal (on/off)"), NEEDS_TRANS("Sound Variation"), NEEDS_TRANS("Sound Timbre"),
|
||||
NEEDS_TRANS("Sound Release Time"), NEEDS_TRANS("Sound Attack Time"), NEEDS_TRANS("Sound Brightness"), NEEDS_TRANS("Sound Control 6"),
|
||||
NEEDS_TRANS("Sound Control 7"), NEEDS_TRANS("Sound Control 8"), NEEDS_TRANS("Sound Control 9"), NEEDS_TRANS("Sound Control 10"),
|
||||
NEEDS_TRANS("General Purpose Button 1 (on/off)"), NEEDS_TRANS("General Purpose Button 2 (on/off)"),
|
||||
NEEDS_TRANS("General Purpose Button 3 (on/off)"), NEEDS_TRANS("General Purpose Button 4 (on/off)"),
|
||||
NEEDS_TRANS ("Hold Pedal (on/off)"), NEEDS_TRANS ("Portamento (on/off)"), NEEDS_TRANS ("Sustenuto Pedal (on/off)"), NEEDS_TRANS ("Soft Pedal (on/off)"),
|
||||
NEEDS_TRANS ("Legato Pedal (on/off)"), NEEDS_TRANS ("Hold 2 Pedal (on/off)"), NEEDS_TRANS ("Sound Variation"), NEEDS_TRANS ("Sound Timbre"),
|
||||
NEEDS_TRANS ("Sound Release Time"), NEEDS_TRANS ("Sound Attack Time"), NEEDS_TRANS ("Sound Brightness"), NEEDS_TRANS ("Sound Control 6"),
|
||||
NEEDS_TRANS ("Sound Control 7"), NEEDS_TRANS ("Sound Control 8"), NEEDS_TRANS ("Sound Control 9"), NEEDS_TRANS ("Sound Control 10"),
|
||||
NEEDS_TRANS ("General Purpose Button 1 (on/off)"), NEEDS_TRANS ("General Purpose Button 2 (on/off)"),
|
||||
NEEDS_TRANS ("General Purpose Button 3 (on/off)"), NEEDS_TRANS ("General Purpose Button 4 (on/off)"),
|
||||
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||
NEEDS_TRANS("Reverb Level"), NEEDS_TRANS("Tremolo Level"), NEEDS_TRANS("Chorus Level"), NEEDS_TRANS("Celeste Level"),
|
||||
NEEDS_TRANS("Phaser Level"), NEEDS_TRANS("Data Button increment"), NEEDS_TRANS("Data Button decrement"), NEEDS_TRANS("Non-registered Parameter (fine)"),
|
||||
NEEDS_TRANS("Non-registered Parameter (coarse)"), NEEDS_TRANS("Registered Parameter (fine)"), NEEDS_TRANS("Registered Parameter (coarse)"),
|
||||
NEEDS_TRANS ("Reverb Level"), NEEDS_TRANS ("Tremolo Level"), NEEDS_TRANS ("Chorus Level"), NEEDS_TRANS ("Celeste Level"),
|
||||
NEEDS_TRANS ("Phaser Level"), NEEDS_TRANS ("Data Button increment"), NEEDS_TRANS ("Data Button decrement"), NEEDS_TRANS ("Non-registered Parameter (fine)"),
|
||||
NEEDS_TRANS ("Non-registered Parameter (coarse)"), NEEDS_TRANS ("Registered Parameter (fine)"), NEEDS_TRANS ("Registered Parameter (coarse)"),
|
||||
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||
NEEDS_TRANS("All Sound Off"), NEEDS_TRANS("All Controllers Off"), NEEDS_TRANS("Local Keyboard (on/off)"), NEEDS_TRANS("All Notes Off"),
|
||||
NEEDS_TRANS("Omni Mode Off"), NEEDS_TRANS("Omni Mode On"), NEEDS_TRANS("Mono Operation"), NEEDS_TRANS("Poly Operation")
|
||||
NEEDS_TRANS ("All Sound Off"), NEEDS_TRANS ("All Controllers Off"), NEEDS_TRANS ("Local Keyboard (on/off)"), NEEDS_TRANS ("All Notes Off"),
|
||||
NEEDS_TRANS ("Omni Mode Off"), NEEDS_TRANS ("Omni Mode On"), NEEDS_TRANS ("Mono Operation"), NEEDS_TRANS ("Poly Operation")
|
||||
};
|
||||
|
||||
return isPositiveAndBelow (n, numElementsInArray (names)) ? names[n] : nullptr;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ MidiMessageSequence::MidiMessageSequence (const MidiMessageSequence& other)
|
|||
auto noteOffIndex = other.getIndexOfMatchingKeyUp (i);
|
||||
|
||||
if (noteOffIndex >= 0)
|
||||
list.getUnchecked(i)->noteOffObject = list.getUnchecked (noteOffIndex);
|
||||
list.getUnchecked (i)->noteOffObject = list.getUnchecked (noteOffIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ int MidiMessageSequence::getIndexOfMatchingKeyUp (int index) const noexcept
|
|||
if (auto* noteOff = meh->noteOffObject)
|
||||
{
|
||||
for (int i = index; i < list.size(); ++i)
|
||||
if (list.getUnchecked(i) == noteOff)
|
||||
if (list.getUnchecked (i) == noteOff)
|
||||
return i;
|
||||
|
||||
jassertfalse; // we've somehow got a pointer to a note-off object that isn't in the sequence
|
||||
|
|
@ -124,7 +124,7 @@ int MidiMessageSequence::getNextIndexAtTime (double timeStamp) const noexcept
|
|||
int i;
|
||||
|
||||
for (i = 0; i < numEvents; ++i)
|
||||
if (list.getUnchecked(i)->message.getTimeStamp() >= timeStamp)
|
||||
if (list.getUnchecked (i)->message.getTimeStamp() >= timeStamp)
|
||||
break;
|
||||
|
||||
return i;
|
||||
|
|
@ -157,7 +157,7 @@ MidiMessageSequence::MidiEventHolder* MidiMessageSequence::addEvent (MidiEventHo
|
|||
int i;
|
||||
|
||||
for (i = list.size(); --i >= 0;)
|
||||
if (list.getUnchecked(i)->message.getTimeStamp() <= time)
|
||||
if (list.getUnchecked (i)->message.getTimeStamp() <= time)
|
||||
break;
|
||||
|
||||
list.insert (i + 1, newEvent);
|
||||
|
|
@ -227,7 +227,7 @@ void MidiMessageSequence::updateMatchedPairs() noexcept
|
|||
{
|
||||
for (int i = 0; i < list.size(); ++i)
|
||||
{
|
||||
auto* meh = list.getUnchecked(i);
|
||||
auto* meh = list.getUnchecked (i);
|
||||
auto& m1 = meh->message;
|
||||
|
||||
if (m1.isNoteOn())
|
||||
|
|
@ -239,7 +239,7 @@ void MidiMessageSequence::updateMatchedPairs() noexcept
|
|||
|
||||
for (int j = i + 1; j < len; ++j)
|
||||
{
|
||||
auto* meh2 = list.getUnchecked(j);
|
||||
auto* meh2 = list.getUnchecked (j);
|
||||
auto& m = meh2->message;
|
||||
|
||||
if (m.getNoteNumber() == note && m.getChannel() == chan)
|
||||
|
|
@ -292,15 +292,15 @@ void MidiMessageSequence::extractSysExMessages (MidiMessageSequence& destSequenc
|
|||
void MidiMessageSequence::deleteMidiChannelMessages (const int channelNumberToRemove)
|
||||
{
|
||||
for (int i = list.size(); --i >= 0;)
|
||||
if (list.getUnchecked(i)->message.isForChannel (channelNumberToRemove))
|
||||
list.remove(i);
|
||||
if (list.getUnchecked (i)->message.isForChannel (channelNumberToRemove))
|
||||
list.remove (i);
|
||||
}
|
||||
|
||||
void MidiMessageSequence::deleteSysExMessages()
|
||||
{
|
||||
for (int i = list.size(); --i >= 0;)
|
||||
if (list.getUnchecked(i)->message.isSysEx())
|
||||
list.remove(i);
|
||||
if (list.getUnchecked (i)->message.isSysEx())
|
||||
list.remove (i);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace universal_midi_packets
|
|||
The packet must be well-formed for member functions to work correctly.
|
||||
|
||||
Specifically, the constructor argument must be the beginning of a region of
|
||||
uint32_t that contains at least `getNumWordsForMessageType(*data)` items,
|
||||
uint32_t that contains at least `getNumWordsForMessageType (*data)` items,
|
||||
where `data` is the constructor argument.
|
||||
|
||||
NOTE: Instances of this class do not own the memory that they point to!
|
||||
|
|
|
|||
|
|
@ -153,10 +153,10 @@ std::unique_ptr<XmlElement> ChannelRemappingAudioSource::createXml() const
|
|||
const ScopedLock sl (lock);
|
||||
|
||||
for (int i = 0; i < remappedInputs.size(); ++i)
|
||||
ins << remappedInputs.getUnchecked(i) << ' ';
|
||||
ins << remappedInputs.getUnchecked (i) << ' ';
|
||||
|
||||
for (int i = 0; i < remappedOutputs.size(); ++i)
|
||||
outs << remappedOutputs.getUnchecked(i) << ' ';
|
||||
outs << remappedOutputs.getUnchecked (i) << ' ';
|
||||
|
||||
e->setAttribute ("inputs", ins.trimEnd());
|
||||
e->setAttribute ("outputs", outs.trimEnd());
|
||||
|
|
|
|||
|
|
@ -39,13 +39,13 @@ IIRFilterAudioSource::~IIRFilterAudioSource() {}
|
|||
void IIRFilterAudioSource::setCoefficients (const IIRCoefficients& newCoefficients)
|
||||
{
|
||||
for (int i = iirFilters.size(); --i >= 0;)
|
||||
iirFilters.getUnchecked(i)->setCoefficients (newCoefficients);
|
||||
iirFilters.getUnchecked (i)->setCoefficients (newCoefficients);
|
||||
}
|
||||
|
||||
void IIRFilterAudioSource::makeInactive()
|
||||
{
|
||||
for (int i = iirFilters.size(); --i >= 0;)
|
||||
iirFilters.getUnchecked(i)->makeInactive();
|
||||
iirFilters.getUnchecked (i)->makeInactive();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -54,7 +54,7 @@ void IIRFilterAudioSource::prepareToPlay (int samplesPerBlockExpected, double sa
|
|||
input->prepareToPlay (samplesPerBlockExpected, sampleRate);
|
||||
|
||||
for (int i = iirFilters.size(); --i >= 0;)
|
||||
iirFilters.getUnchecked(i)->reset();
|
||||
iirFilters.getUnchecked (i)->reset();
|
||||
}
|
||||
|
||||
void IIRFilterAudioSource::releaseResources()
|
||||
|
|
@ -72,7 +72,7 @@ void IIRFilterAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& buff
|
|||
iirFilters.add (new IIRFilter (*iirFilters.getUnchecked (0)));
|
||||
|
||||
for (int i = 0; i < numChannels; ++i)
|
||||
iirFilters.getUnchecked(i)
|
||||
iirFilters.getUnchecked (i)
|
||||
->processSamples (bufferToFill.buffer->getWritePointer (i, bufferToFill.startSample),
|
||||
bufferToFill.numSamples);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,13 +90,13 @@ void MixerAudioSource::removeAllInputs()
|
|||
|
||||
for (int i = inputs.size(); --i >= 0;)
|
||||
if (inputsToDelete[i])
|
||||
toDelete.add (inputs.getUnchecked(i));
|
||||
toDelete.add (inputs.getUnchecked (i));
|
||||
|
||||
inputs.clear();
|
||||
}
|
||||
|
||||
for (int i = toDelete.size(); --i >= 0;)
|
||||
toDelete.getUnchecked(i)->releaseResources();
|
||||
toDelete.getUnchecked (i)->releaseResources();
|
||||
}
|
||||
|
||||
void MixerAudioSource::prepareToPlay (int samplesPerBlockExpected, double sampleRate)
|
||||
|
|
@ -109,7 +109,7 @@ void MixerAudioSource::prepareToPlay (int samplesPerBlockExpected, double sample
|
|||
bufferSizeExpected = samplesPerBlockExpected;
|
||||
|
||||
for (int i = inputs.size(); --i >= 0;)
|
||||
inputs.getUnchecked(i)->prepareToPlay (samplesPerBlockExpected, sampleRate);
|
||||
inputs.getUnchecked (i)->prepareToPlay (samplesPerBlockExpected, sampleRate);
|
||||
}
|
||||
|
||||
void MixerAudioSource::releaseResources()
|
||||
|
|
@ -117,7 +117,7 @@ void MixerAudioSource::releaseResources()
|
|||
const ScopedLock sl (lock);
|
||||
|
||||
for (int i = inputs.size(); --i >= 0;)
|
||||
inputs.getUnchecked(i)->releaseResources();
|
||||
inputs.getUnchecked (i)->releaseResources();
|
||||
|
||||
tempBuffer.setSize (2, 0);
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ void MixerAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& info)
|
|||
|
||||
if (inputs.size() > 0)
|
||||
{
|
||||
inputs.getUnchecked(0)->getNextAudioBlock (info);
|
||||
inputs.getUnchecked (0)->getNextAudioBlock (info);
|
||||
|
||||
if (inputs.size() > 1)
|
||||
{
|
||||
|
|
@ -142,7 +142,7 @@ void MixerAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& info)
|
|||
|
||||
for (int i = 1; i < inputs.size(); ++i)
|
||||
{
|
||||
inputs.getUnchecked(i)->getNextAudioBlock (info2);
|
||||
inputs.getUnchecked (i)->getNextAudioBlock (info2);
|
||||
|
||||
for (int chan = 0; chan < info.buffer->getNumChannels(); ++chan)
|
||||
info.buffer->addFrom (chan, info.startSample, tempBuffer, chan, 0, info.numSamples);
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ IIRCoefficients IIRCoefficients::makeLowPass (double sampleRate,
|
|||
IIRCoefficients IIRCoefficients::makeHighPass (double sampleRate,
|
||||
double frequency) noexcept
|
||||
{
|
||||
return makeHighPass (sampleRate, frequency, 1.0 / std::sqrt(2.0));
|
||||
return makeHighPass (sampleRate, frequency, 1.0 / std::sqrt (2.0));
|
||||
}
|
||||
|
||||
IIRCoefficients IIRCoefficients::makeHighPass (double sampleRate,
|
||||
|
|
|
|||
|
|
@ -659,7 +659,7 @@ void AudioDeviceManager::setCurrentAudioDeviceType (const String& type, bool tre
|
|||
{
|
||||
for (int i = 0; i < availableDeviceTypes.size(); ++i)
|
||||
{
|
||||
if (availableDeviceTypes.getUnchecked(i)->getTypeName() == type
|
||||
if (availableDeviceTypes.getUnchecked (i)->getTypeName() == type
|
||||
&& currentDeviceType != type)
|
||||
{
|
||||
if (currentAudioDevice != nullptr)
|
||||
|
|
@ -671,7 +671,7 @@ void AudioDeviceManager::setCurrentAudioDeviceType (const String& type, bool tre
|
|||
|
||||
currentDeviceType = type;
|
||||
|
||||
AudioDeviceSetup s (*lastDeviceTypeConfigs.getUnchecked(i));
|
||||
AudioDeviceSetup s (*lastDeviceTypeConfigs.getUnchecked (i));
|
||||
insertDefaultDeviceNames (s);
|
||||
|
||||
setAudioDeviceSetup (s, treatAsChosenDevice);
|
||||
|
|
@ -1007,23 +1007,23 @@ void AudioDeviceManager::audioDeviceIOCallbackInt (const float* const* inputChan
|
|||
|
||||
tempBuffer.setSize (jmax (1, numOutputChannels), jmax (1, numSamples), false, false, true);
|
||||
|
||||
callbacks.getUnchecked(0)->audioDeviceIOCallbackWithContext (inputChannelData,
|
||||
numInputChannels,
|
||||
outputChannelData,
|
||||
numOutputChannels,
|
||||
numSamples,
|
||||
context);
|
||||
callbacks.getUnchecked (0)->audioDeviceIOCallbackWithContext (inputChannelData,
|
||||
numInputChannels,
|
||||
outputChannelData,
|
||||
numOutputChannels,
|
||||
numSamples,
|
||||
context);
|
||||
|
||||
auto* const* tempChans = tempBuffer.getArrayOfWritePointers();
|
||||
|
||||
for (int i = callbacks.size(); --i > 0;)
|
||||
{
|
||||
callbacks.getUnchecked(i)->audioDeviceIOCallbackWithContext (inputChannelData,
|
||||
numInputChannels,
|
||||
tempChans,
|
||||
numOutputChannels,
|
||||
numSamples,
|
||||
context);
|
||||
callbacks.getUnchecked (i)->audioDeviceIOCallbackWithContext (inputChannelData,
|
||||
numInputChannels,
|
||||
tempChans,
|
||||
numOutputChannels,
|
||||
numSamples,
|
||||
context);
|
||||
|
||||
for (int chan = 0; chan < numOutputChannels; ++chan)
|
||||
{
|
||||
|
|
@ -1070,7 +1070,7 @@ void AudioDeviceManager::audioDeviceAboutToStartInt (AudioIODevice* const device
|
|||
const ScopedLock sl (audioCallbackLock);
|
||||
|
||||
for (int i = callbacks.size(); --i >= 0;)
|
||||
callbacks.getUnchecked(i)->audioDeviceAboutToStart (device);
|
||||
callbacks.getUnchecked (i)->audioDeviceAboutToStart (device);
|
||||
}
|
||||
|
||||
sendChangeMessage();
|
||||
|
|
@ -1085,7 +1085,7 @@ void AudioDeviceManager::audioDeviceStoppedInt()
|
|||
loadMeasurer.reset();
|
||||
|
||||
for (int i = callbacks.size(); --i >= 0;)
|
||||
callbacks.getUnchecked(i)->audioDeviceStopped();
|
||||
callbacks.getUnchecked (i)->audioDeviceStopped();
|
||||
}
|
||||
|
||||
void AudioDeviceManager::audioDeviceErrorInt (const String& message)
|
||||
|
|
@ -1093,7 +1093,7 @@ void AudioDeviceManager::audioDeviceErrorInt (const String& message)
|
|||
const ScopedLock sl (audioCallbackLock);
|
||||
|
||||
for (int i = callbacks.size(); --i >= 0;)
|
||||
callbacks.getUnchecked(i)->audioDeviceError (message);
|
||||
callbacks.getUnchecked (i)->audioDeviceError (message);
|
||||
}
|
||||
|
||||
double AudioDeviceManager::getCpuUsage() const
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ public:
|
|||
error << "The device \"" << deviceID << "\" is not available.";
|
||||
else
|
||||
error << "Could not open " << (forInput ? "input" : "output") << " device \"" << deviceID
|
||||
<< "\": " << snd_strerror(err) << " (" << err << ")";
|
||||
<< "\": " << snd_strerror (err) << " (" << err << ")";
|
||||
|
||||
JUCE_ALSA_LOG ("snd_pcm_open failed; " << error);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1453,7 +1453,7 @@ public:
|
|||
HKEY hk = 0;
|
||||
int index = 0;
|
||||
|
||||
if (RegOpenKey (HKEY_LOCAL_MACHINE, _T("software\\asio"), &hk) == ERROR_SUCCESS)
|
||||
if (RegOpenKey (HKEY_LOCAL_MACHINE, _T ("software\\asio"), &hk) == ERROR_SUCCESS)
|
||||
{
|
||||
TCHAR name[256] = {};
|
||||
|
||||
|
|
@ -1554,7 +1554,7 @@ private:
|
|||
HKEY hk = 0;
|
||||
bool ok = false;
|
||||
|
||||
if (RegOpenKey (HKEY_CLASSES_ROOT, _T("clsid"), &hk) == ERROR_SUCCESS)
|
||||
if (RegOpenKey (HKEY_CLASSES_ROOT, _T ("clsid"), &hk) == ERROR_SUCCESS)
|
||||
{
|
||||
int index = 0;
|
||||
TCHAR name[512] = {};
|
||||
|
|
@ -1567,7 +1567,7 @@ private:
|
|||
|
||||
if (RegOpenKeyEx (hk, name, 0, KEY_READ, &subKey) == ERROR_SUCCESS)
|
||||
{
|
||||
if (RegOpenKeyEx (subKey, _T("InprocServer32"), 0, KEY_READ, &pathKey) == ERROR_SUCCESS)
|
||||
if (RegOpenKeyEx (subKey, _T ("InprocServer32"), 0, KEY_READ, &pathKey) == ERROR_SUCCESS)
|
||||
{
|
||||
TCHAR pathName[1024] = {};
|
||||
DWORD dtype = REG_SZ;
|
||||
|
|
@ -1610,7 +1610,7 @@ private:
|
|||
DWORD dtype = REG_SZ;
|
||||
DWORD dsize = sizeof (buf);
|
||||
|
||||
if (RegQueryValueEx (subKey, _T("clsid"), 0, &dtype, (LPBYTE) buf, &dsize) == ERROR_SUCCESS)
|
||||
if (RegQueryValueEx (subKey, _T ("clsid"), 0, &dtype, (LPBYTE) buf, &dsize) == ERROR_SUCCESS)
|
||||
{
|
||||
if (dsize > 0 && checkClassIsOk (buf))
|
||||
{
|
||||
|
|
@ -1622,7 +1622,7 @@ private:
|
|||
dsize = sizeof (buf);
|
||||
String deviceName;
|
||||
|
||||
if (RegQueryValueEx (subKey, _T("description"), 0, &dtype, (LPBYTE) buf, &dsize) == ERROR_SUCCESS)
|
||||
if (RegQueryValueEx (subKey, _T ("description"), 0, &dtype, (LPBYTE) buf, &dsize) == ERROR_SUCCESS)
|
||||
deviceName = buf;
|
||||
else
|
||||
deviceName = keyName;
|
||||
|
|
|
|||
|
|
@ -191,9 +191,9 @@ public:
|
|||
if (numClientOutputChannels > 0)
|
||||
{
|
||||
numDeviceOutputChannels = 2;
|
||||
outputDevice = GlobalRef (LocalRef<jobject>(env->NewObject (AudioTrack, AudioTrack.constructor,
|
||||
STREAM_MUSIC, sampleRate, CHANNEL_OUT_STEREO, ENCODING_PCM_16BIT,
|
||||
(jint) (minBufferSizeOut * numDeviceOutputChannels * static_cast<int> (sizeof (int16))), MODE_STREAM)));
|
||||
outputDevice = GlobalRef (LocalRef<jobject> (env->NewObject (AudioTrack, AudioTrack.constructor,
|
||||
STREAM_MUSIC, sampleRate, CHANNEL_OUT_STEREO, ENCODING_PCM_16BIT,
|
||||
(jint) (minBufferSizeOut * numDeviceOutputChannels * static_cast<int> (sizeof (int16))), MODE_STREAM)));
|
||||
|
||||
const bool supportsUnderrunCount = (getAndroidSDKVersion() >= 24);
|
||||
getUnderrunCount = supportsUnderrunCount ? env->GetMethodID (AudioTrack, "getUnderrunCount", "()I") : nullptr;
|
||||
|
|
@ -225,11 +225,11 @@ public:
|
|||
else
|
||||
{
|
||||
numDeviceInputChannels = jmin (numClientInputChannels, numDeviceInputChannelsAvailable);
|
||||
inputDevice = GlobalRef (LocalRef<jobject>(env->NewObject (AudioRecord, AudioRecord.constructor,
|
||||
0 /* (default audio source) */, sampleRate,
|
||||
numDeviceInputChannelsAvailable > 1 ? CHANNEL_IN_STEREO : CHANNEL_IN_MONO,
|
||||
ENCODING_PCM_16BIT,
|
||||
(jint) (minBufferSizeIn * numDeviceInputChannels * static_cast<int> (sizeof (int16))))));
|
||||
inputDevice = GlobalRef (LocalRef<jobject> (env->NewObject (AudioRecord, AudioRecord.constructor,
|
||||
0 /* (default audio source) */, sampleRate,
|
||||
numDeviceInputChannelsAvailable > 1 ? CHANNEL_IN_STEREO : CHANNEL_IN_MONO,
|
||||
ENCODING_PCM_16BIT,
|
||||
(jint) (minBufferSizeIn * numDeviceInputChannels * static_cast<int> (sizeof (int16))))));
|
||||
|
||||
int inputDeviceState = env->CallIntMethod (inputDevice, AudioRecord.getState);
|
||||
if (inputDeviceState > 0)
|
||||
|
|
|
|||
|
|
@ -726,12 +726,12 @@ struct iOSAudioIODevice::Pimpl : public AsyncUpdater
|
|||
|
||||
CFURLRef hostUrl;
|
||||
UInt32 dataSize = sizeof (hostUrl);
|
||||
OSStatus err = AudioUnitGetProperty(audioUnit,
|
||||
kAudioUnitProperty_PeerURL,
|
||||
kAudioUnitScope_Global,
|
||||
0,
|
||||
&hostUrl,
|
||||
&dataSize);
|
||||
OSStatus err = AudioUnitGetProperty (audioUnit,
|
||||
kAudioUnitProperty_PeerURL,
|
||||
kAudioUnitScope_Global,
|
||||
0,
|
||||
&hostUrl,
|
||||
&dataSize);
|
||||
if (err == noErr)
|
||||
{
|
||||
if (@available (iOS 10.0, *))
|
||||
|
|
@ -993,7 +993,7 @@ struct iOSAudioIODevice::Pimpl : public AsyncUpdater
|
|||
appDesc.componentFlags = 0;
|
||||
appDesc.componentFlagsMask = 0;
|
||||
OSStatus err = AudioOutputUnitPublish (&appDesc,
|
||||
CFSTR(JucePlugin_IAAName),
|
||||
CFSTR (JucePlugin_IAAName),
|
||||
JucePlugin_VersionCode,
|
||||
audioUnit);
|
||||
|
||||
|
|
|
|||
|
|
@ -1448,7 +1448,7 @@ public:
|
|||
outputWrapper (*this, std::move (outputDevice), false)
|
||||
{
|
||||
if (getAvailableSampleRates().isEmpty())
|
||||
lastError = TRANS("The input and output devices don't share a common sample rate!");
|
||||
lastError = TRANS ("The input and output devices don't share a common sample rate!");
|
||||
}
|
||||
|
||||
~AudioIODeviceCombiner() override
|
||||
|
|
@ -1697,7 +1697,7 @@ public:
|
|||
if (! forwarder.encounteredError() && newCallback != nullptr)
|
||||
newCallback->audioDeviceAboutToStart (this);
|
||||
else if (lastError.isEmpty())
|
||||
lastError = TRANS("Failed to initialise all requested devices.");
|
||||
lastError = TRANS ("Failed to initialise all requested devices.");
|
||||
}
|
||||
|
||||
const ScopedLock sl (callbackLock);
|
||||
|
|
|
|||
|
|
@ -37,46 +37,46 @@ extern "C"
|
|||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectSound
|
||||
DECLARE_INTERFACE_(IDirectSound, IUnknown)
|
||||
DECLARE_INTERFACE_ (IDirectSound, IUnknown)
|
||||
{
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID*) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
STDMETHOD(CreateSoundBuffer) (THIS_ DSBUFFERDESC*, IDirectSoundBuffer**, LPUNKNOWN) PURE;
|
||||
STDMETHOD(GetCaps) (THIS_ void*) PURE;
|
||||
STDMETHOD(DuplicateSoundBuffer) (THIS_ IDirectSoundBuffer*, IDirectSoundBuffer**) PURE;
|
||||
STDMETHOD(SetCooperativeLevel) (THIS_ HWND, DWORD) PURE;
|
||||
STDMETHOD(Compact) (THIS) PURE;
|
||||
STDMETHOD(GetSpeakerConfig) (THIS_ LPDWORD) PURE;
|
||||
STDMETHOD(SetSpeakerConfig) (THIS_ DWORD) PURE;
|
||||
STDMETHOD(Initialize) (THIS_ const GUID*) PURE;
|
||||
STDMETHOD (QueryInterface) (THIS_ REFIID, LPVOID*) PURE;
|
||||
STDMETHOD_ (ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_ (ULONG,Release) (THIS) PURE;
|
||||
STDMETHOD (CreateSoundBuffer) (THIS_ DSBUFFERDESC*, IDirectSoundBuffer**, LPUNKNOWN) PURE;
|
||||
STDMETHOD (GetCaps) (THIS_ void*) PURE;
|
||||
STDMETHOD (DuplicateSoundBuffer) (THIS_ IDirectSoundBuffer*, IDirectSoundBuffer**) PURE;
|
||||
STDMETHOD (SetCooperativeLevel) (THIS_ HWND, DWORD) PURE;
|
||||
STDMETHOD (Compact) (THIS) PURE;
|
||||
STDMETHOD (GetSpeakerConfig) (THIS_ LPDWORD) PURE;
|
||||
STDMETHOD (SetSpeakerConfig) (THIS_ DWORD) PURE;
|
||||
STDMETHOD (Initialize) (THIS_ const GUID*) PURE;
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectSoundBuffer
|
||||
DECLARE_INTERFACE_(IDirectSoundBuffer, IUnknown)
|
||||
DECLARE_INTERFACE_ (IDirectSoundBuffer, IUnknown)
|
||||
{
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID*) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
STDMETHOD(GetCaps) (THIS_ void*) PURE;
|
||||
STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD, LPDWORD) PURE;
|
||||
STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX, DWORD, LPDWORD) PURE;
|
||||
STDMETHOD(GetVolume) (THIS_ LPLONG) PURE;
|
||||
STDMETHOD(GetPan) (THIS_ LPLONG) PURE;
|
||||
STDMETHOD(GetFrequency) (THIS_ LPDWORD) PURE;
|
||||
STDMETHOD(GetStatus) (THIS_ LPDWORD) PURE;
|
||||
STDMETHOD(Initialize) (THIS_ IDirectSound*, DSBUFFERDESC*) PURE;
|
||||
STDMETHOD(Lock) (THIS_ DWORD, DWORD, LPVOID*, LPDWORD, LPVOID*, LPDWORD, DWORD) PURE;
|
||||
STDMETHOD(Play) (THIS_ DWORD, DWORD, DWORD) PURE;
|
||||
STDMETHOD(SetCurrentPosition) (THIS_ DWORD) PURE;
|
||||
STDMETHOD(SetFormat) (THIS_ const WAVEFORMATEX*) PURE;
|
||||
STDMETHOD(SetVolume) (THIS_ LONG) PURE;
|
||||
STDMETHOD(SetPan) (THIS_ LONG) PURE;
|
||||
STDMETHOD(SetFrequency) (THIS_ DWORD) PURE;
|
||||
STDMETHOD(Stop) (THIS) PURE;
|
||||
STDMETHOD(Unlock) (THIS_ LPVOID, DWORD, LPVOID, DWORD) PURE;
|
||||
STDMETHOD(Restore) (THIS) PURE;
|
||||
STDMETHOD (QueryInterface) (THIS_ REFIID, LPVOID*) PURE;
|
||||
STDMETHOD_ (ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_ (ULONG,Release) (THIS) PURE;
|
||||
STDMETHOD (GetCaps) (THIS_ void*) PURE;
|
||||
STDMETHOD (GetCurrentPosition) (THIS_ LPDWORD, LPDWORD) PURE;
|
||||
STDMETHOD (GetFormat) (THIS_ LPWAVEFORMATEX, DWORD, LPDWORD) PURE;
|
||||
STDMETHOD (GetVolume) (THIS_ LPLONG) PURE;
|
||||
STDMETHOD (GetPan) (THIS_ LPLONG) PURE;
|
||||
STDMETHOD (GetFrequency) (THIS_ LPDWORD) PURE;
|
||||
STDMETHOD (GetStatus) (THIS_ LPDWORD) PURE;
|
||||
STDMETHOD (Initialize) (THIS_ IDirectSound*, DSBUFFERDESC*) PURE;
|
||||
STDMETHOD (Lock) (THIS_ DWORD, DWORD, LPVOID*, LPDWORD, LPVOID*, LPDWORD, DWORD) PURE;
|
||||
STDMETHOD (Play) (THIS_ DWORD, DWORD, DWORD) PURE;
|
||||
STDMETHOD (SetCurrentPosition) (THIS_ DWORD) PURE;
|
||||
STDMETHOD (SetFormat) (THIS_ const WAVEFORMATEX*) PURE;
|
||||
STDMETHOD (SetVolume) (THIS_ LONG) PURE;
|
||||
STDMETHOD (SetPan) (THIS_ LONG) PURE;
|
||||
STDMETHOD (SetFrequency) (THIS_ DWORD) PURE;
|
||||
STDMETHOD (Stop) (THIS) PURE;
|
||||
STDMETHOD (Unlock) (THIS_ LPVOID, DWORD, LPVOID, DWORD) PURE;
|
||||
STDMETHOD (Restore) (THIS) PURE;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -93,32 +93,32 @@ extern "C"
|
|||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectSoundCapture
|
||||
DECLARE_INTERFACE_(IDirectSoundCapture, IUnknown)
|
||||
DECLARE_INTERFACE_ (IDirectSoundCapture, IUnknown)
|
||||
{
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID*) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
STDMETHOD(CreateCaptureBuffer) (THIS_ DSCBUFFERDESC*, IDirectSoundCaptureBuffer**, LPUNKNOWN) PURE;
|
||||
STDMETHOD(GetCaps) (THIS_ void*) PURE;
|
||||
STDMETHOD(Initialize) (THIS_ const GUID*) PURE;
|
||||
STDMETHOD (QueryInterface) (THIS_ REFIID, LPVOID*) PURE;
|
||||
STDMETHOD_ (ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_ (ULONG,Release) (THIS) PURE;
|
||||
STDMETHOD (CreateCaptureBuffer) (THIS_ DSCBUFFERDESC*, IDirectSoundCaptureBuffer**, LPUNKNOWN) PURE;
|
||||
STDMETHOD (GetCaps) (THIS_ void*) PURE;
|
||||
STDMETHOD (Initialize) (THIS_ const GUID*) PURE;
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectSoundCaptureBuffer
|
||||
DECLARE_INTERFACE_(IDirectSoundCaptureBuffer, IUnknown)
|
||||
DECLARE_INTERFACE_ (IDirectSoundCaptureBuffer, IUnknown)
|
||||
{
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID*) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
STDMETHOD(GetCaps) (THIS_ void*) PURE;
|
||||
STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD, LPDWORD) PURE;
|
||||
STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX, DWORD, LPDWORD) PURE;
|
||||
STDMETHOD(GetStatus) (THIS_ LPDWORD) PURE;
|
||||
STDMETHOD(Initialize) (THIS_ IDirectSoundCapture*, DSCBUFFERDESC*) PURE;
|
||||
STDMETHOD(Lock) (THIS_ DWORD, DWORD, LPVOID*, LPDWORD, LPVOID*, LPDWORD, DWORD) PURE;
|
||||
STDMETHOD(Start) (THIS_ DWORD) PURE;
|
||||
STDMETHOD(Stop) (THIS) PURE;
|
||||
STDMETHOD(Unlock) (THIS_ LPVOID, DWORD, LPVOID, DWORD) PURE;
|
||||
STDMETHOD (QueryInterface) (THIS_ REFIID, LPVOID*) PURE;
|
||||
STDMETHOD_ (ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_ (ULONG,Release) (THIS) PURE;
|
||||
STDMETHOD (GetCaps) (THIS_ void*) PURE;
|
||||
STDMETHOD (GetCurrentPosition) (THIS_ LPDWORD, LPDWORD) PURE;
|
||||
STDMETHOD (GetFormat) (THIS_ LPWAVEFORMATEX, DWORD, LPDWORD) PURE;
|
||||
STDMETHOD (GetStatus) (THIS_ LPDWORD) PURE;
|
||||
STDMETHOD (Initialize) (THIS_ IDirectSoundCapture*, DSCBUFFERDESC*) PURE;
|
||||
STDMETHOD (Lock) (THIS_ DWORD, DWORD, LPVOID*, LPDWORD, LPVOID*, LPDWORD, DWORD) PURE;
|
||||
STDMETHOD (Start) (THIS_ DWORD) PURE;
|
||||
STDMETHOD (Stop) (THIS) PURE;
|
||||
STDMETHOD (Unlock) (THIS_ LPVOID, DWORD, LPVOID, DWORD) PURE;
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
|
|
@ -136,24 +136,24 @@ namespace DSoundLogging
|
|||
|
||||
switch (hr)
|
||||
{
|
||||
case MAKE_HRESULT(1, 0x878, 10): result = "Device already allocated"; break;
|
||||
case MAKE_HRESULT(1, 0x878, 30): result = "Control unavailable"; break;
|
||||
case E_INVALIDARG: result = "Invalid parameter"; break;
|
||||
case MAKE_HRESULT(1, 0x878, 50): result = "Invalid call"; break;
|
||||
case E_FAIL: result = "Generic error"; break;
|
||||
case MAKE_HRESULT(1, 0x878, 70): result = "Priority level error"; break;
|
||||
case E_OUTOFMEMORY: result = "Out of memory"; break;
|
||||
case MAKE_HRESULT(1, 0x878, 100): result = "Bad format"; break;
|
||||
case E_NOTIMPL: result = "Unsupported function"; break;
|
||||
case MAKE_HRESULT(1, 0x878, 120): result = "No driver"; break;
|
||||
case MAKE_HRESULT(1, 0x878, 130): result = "Already initialised"; break;
|
||||
case CLASS_E_NOAGGREGATION: result = "No aggregation"; break;
|
||||
case MAKE_HRESULT(1, 0x878, 150): result = "Buffer lost"; break;
|
||||
case MAKE_HRESULT(1, 0x878, 160): result = "Another app has priority"; break;
|
||||
case MAKE_HRESULT(1, 0x878, 170): result = "Uninitialised"; break;
|
||||
case E_NOINTERFACE: result = "No interface"; break;
|
||||
case S_OK: result = "No error"; break;
|
||||
default: return "Unknown error: " + String ((int) hr);
|
||||
case MAKE_HRESULT (1, 0x878, 10): result = "Device already allocated"; break;
|
||||
case MAKE_HRESULT (1, 0x878, 30): result = "Control unavailable"; break;
|
||||
case E_INVALIDARG: result = "Invalid parameter"; break;
|
||||
case MAKE_HRESULT (1, 0x878, 50): result = "Invalid call"; break;
|
||||
case E_FAIL: result = "Generic error"; break;
|
||||
case MAKE_HRESULT (1, 0x878, 70): result = "Priority level error"; break;
|
||||
case E_OUTOFMEMORY: result = "Out of memory"; break;
|
||||
case MAKE_HRESULT (1, 0x878, 100): result = "Bad format"; break;
|
||||
case E_NOTIMPL: result = "Unsupported function"; break;
|
||||
case MAKE_HRESULT (1, 0x878, 120): result = "No driver"; break;
|
||||
case MAKE_HRESULT (1, 0x878, 130): result = "Already initialised"; break;
|
||||
case CLASS_E_NOAGGREGATION: result = "No aggregation"; break;
|
||||
case MAKE_HRESULT (1, 0x878, 150): result = "Buffer lost"; break;
|
||||
case MAKE_HRESULT (1, 0x878, 160): result = "Another app has priority"; break;
|
||||
case MAKE_HRESULT (1, 0x878, 170): result = "Uninitialised"; break;
|
||||
case E_NOINTERFACE: result = "No interface"; break;
|
||||
case S_OK: result = "No error"; break;
|
||||
default: return "Unknown error: " + String ((int) hr);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
@ -753,14 +753,14 @@ public:
|
|||
{
|
||||
if (outputDeviceIndex_ >= 0)
|
||||
{
|
||||
outChannels.add (TRANS("Left"));
|
||||
outChannels.add (TRANS("Right"));
|
||||
outChannels.add (TRANS ("Left"));
|
||||
outChannels.add (TRANS ("Right"));
|
||||
}
|
||||
|
||||
if (inputDeviceIndex_ >= 0)
|
||||
{
|
||||
inChannels.add (TRANS("Left"));
|
||||
inChannels.add (TRANS("Right"));
|
||||
inChannels.add (TRANS ("Left"));
|
||||
inChannels.add (TRANS ("Right"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -923,10 +923,10 @@ private:
|
|||
sleep (5);
|
||||
|
||||
for (int i = 0; i < outChans.size(); ++i)
|
||||
outChans.getUnchecked(i)->synchronisePosition();
|
||||
outChans.getUnchecked (i)->synchronisePosition();
|
||||
|
||||
for (int i = 0; i < inChans.size(); ++i)
|
||||
inChans.getUnchecked(i)->synchronisePosition();
|
||||
inChans.getUnchecked (i)->synchronisePosition();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -949,13 +949,13 @@ public:
|
|||
|
||||
for (int i = inChans.size(); --i >= 0;)
|
||||
{
|
||||
inChans.getUnchecked(i)->doneFlag = false;
|
||||
inChans.getUnchecked (i)->doneFlag = false;
|
||||
++numToDo;
|
||||
}
|
||||
|
||||
for (int i = outChans.size(); --i >= 0;)
|
||||
{
|
||||
outChans.getUnchecked(i)->doneFlag = false;
|
||||
outChans.getUnchecked (i)->doneFlag = false;
|
||||
++numToDo;
|
||||
}
|
||||
|
||||
|
|
@ -968,7 +968,7 @@ public:
|
|||
{
|
||||
for (int i = inChans.size(); --i >= 0;)
|
||||
{
|
||||
DSoundInternalInChannel* const in = inChans.getUnchecked(i);
|
||||
DSoundInternalInChannel* const in = inChans.getUnchecked (i);
|
||||
|
||||
if ((! in->doneFlag) && in->service())
|
||||
{
|
||||
|
|
@ -979,7 +979,7 @@ public:
|
|||
|
||||
for (int i = outChans.size(); --i >= 0;)
|
||||
{
|
||||
DSoundInternalOutChannel* const out = outChans.getUnchecked(i);
|
||||
DSoundInternalOutChannel* const out = outChans.getUnchecked (i);
|
||||
|
||||
if ((! out->doneFlag) && out->service())
|
||||
{
|
||||
|
|
@ -1192,10 +1192,10 @@ String DSoundAudioIODevice::openDevice (const BigInteger& inputChannels,
|
|||
if (error.isEmpty())
|
||||
{
|
||||
for (int i = 0; i < outChans.size(); ++i)
|
||||
outChans.getUnchecked(i)->synchronisePosition();
|
||||
outChans.getUnchecked (i)->synchronisePosition();
|
||||
|
||||
for (int i = 0; i < inChans.size(); ++i)
|
||||
inChans.getUnchecked(i)->synchronisePosition();
|
||||
inChans.getUnchecked (i)->synchronisePosition();
|
||||
|
||||
startThread (Priority::highest);
|
||||
sleep (10);
|
||||
|
|
|
|||
|
|
@ -59,12 +59,12 @@ JUCE_DECL_JACK_FUNCTION (int, jack_activate, (jack_client_t* client), (client))
|
|||
JUCE_DECL_JACK_FUNCTION (int, jack_deactivate, (jack_client_t* client), (client))
|
||||
JUCE_DECL_JACK_FUNCTION (jack_nframes_t, jack_get_buffer_size, (jack_client_t* client), (client))
|
||||
JUCE_DECL_JACK_FUNCTION (jack_nframes_t, jack_get_sample_rate, (jack_client_t* client), (client))
|
||||
JUCE_DECL_VOID_JACK_FUNCTION (jack_on_shutdown, (jack_client_t* client, void (*function)(void* arg), void* arg), (client, function, arg))
|
||||
JUCE_DECL_VOID_JACK_FUNCTION (jack_on_shutdown, (jack_client_t* client, void (*function) (void* arg), void* arg), (client, function, arg))
|
||||
JUCE_DECL_VOID_JACK_FUNCTION (jack_on_info_shutdown, (jack_client_t* client, JackInfoShutdownCallback function, void* arg), (client, function, arg))
|
||||
JUCE_DECL_JACK_FUNCTION (void* , jack_port_get_buffer, (jack_port_t* port, jack_nframes_t nframes), (port, nframes))
|
||||
JUCE_DECL_JACK_FUNCTION (jack_nframes_t, jack_port_get_total_latency, (jack_client_t* client, jack_port_t* port), (client, port))
|
||||
JUCE_DECL_JACK_FUNCTION (jack_port_t* , jack_port_register, (jack_client_t* client, const char* port_name, const char* port_type, unsigned long flags, unsigned long buffer_size), (client, port_name, port_type, flags, buffer_size))
|
||||
JUCE_DECL_VOID_JACK_FUNCTION (jack_set_error_function, (void (*func)(const char*)), (func))
|
||||
JUCE_DECL_VOID_JACK_FUNCTION (jack_set_error_function, (void (*func) (const char*)), (func))
|
||||
JUCE_DECL_JACK_FUNCTION (int, jack_set_process_callback, (jack_client_t* client, JackProcessCallback process_callback, void* arg), (client, process_callback, arg))
|
||||
JUCE_DECL_JACK_FUNCTION (const char**, jack_get_ports, (jack_client_t* client, const char* port_name_pattern, const char* type_name_pattern, unsigned long flags), (client, port_name_pattern, type_name_pattern, flags))
|
||||
JUCE_DECL_JACK_FUNCTION (int, jack_connect, (jack_client_t* client, const char* source_port, const char* destination_port), (client, source_port, destination_port))
|
||||
|
|
|
|||
|
|
@ -971,7 +971,7 @@ public:
|
|||
if (auto dm = deviceManager.get())
|
||||
{
|
||||
if (auto javaMidiPort = getEnv()->CallObjectMethod (dm, MidiDeviceManager.openMidiOutputPortWithID, (jint) deviceID))
|
||||
return new MidiOutput::Pimpl (LocalRef<jobject>(javaMidiPort));
|
||||
return new MidiOutput::Pimpl (LocalRef<jobject> (javaMidiPort));
|
||||
|
||||
// Perhaps the port is already open
|
||||
jassertfalse;
|
||||
|
|
|
|||
|
|
@ -707,7 +707,7 @@ private:
|
|||
const ScopedLock sl (activeCollectorLock);
|
||||
|
||||
for (int i = activeCollectors.size(); --i >= 0;)
|
||||
if (activeCollectors.getObjectPointer(i)->getReferenceCount() == 1)
|
||||
if (activeCollectors.getObjectPointer (i)->getReferenceCount() == 1)
|
||||
activeCollectors.remove (i);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1344,7 +1344,7 @@ public:
|
|||
return testStream != nullptr && testStream->openedOk();
|
||||
}
|
||||
|
||||
pthread_t startThread (void*(*entry)(void*), void* userPtr)
|
||||
pthread_t startThread (void*(*entry) (void*), void* userPtr)
|
||||
{
|
||||
pthread_mutex_lock (&threadReadyMutex);
|
||||
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ public:
|
|||
&audioRoutingJni);
|
||||
|
||||
if (status == SL_RESULT_SUCCESS && audioRoutingJni != nullptr)
|
||||
javaProxy = GlobalRef (LocalRef<jobject>(getEnv()->NewLocalRef (audioRoutingJni)));
|
||||
javaProxy = GlobalRef (LocalRef<jobject> (getEnv()->NewLocalRef (audioRoutingJni)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -391,7 +391,7 @@ public:
|
|||
}
|
||||
|
||||
bool isBufferAvailable() const { return (numBlocksOut.get() < owner.numBuffers); }
|
||||
T* getNextBuffer() { nextBlock.set((nextBlock.get() + 1) % owner.numBuffers); return getCurrentBuffer(); }
|
||||
T* getNextBuffer() { nextBlock.set ((nextBlock.get() + 1) % owner.numBuffers); return getCurrentBuffer(); }
|
||||
T* getCurrentBuffer() { return nativeBuffer.get() + (static_cast<size_t> (nextBlock.get()) * getBufferSizeInSamples()); }
|
||||
size_t getBufferSizeInSamples() const { return static_cast<size_t> (owner.bufferSize * numChannels); }
|
||||
|
||||
|
|
@ -458,7 +458,7 @@ public:
|
|||
auto status = e->CreateAudioPlayer (holder.engine, &obj, &source, &sink, 2,
|
||||
queueInterfaces, interfaceRequired);
|
||||
|
||||
if (status != SL_RESULT_SUCCESS || obj == nullptr || (*obj)->Realize(obj, 0) != SL_RESULT_SUCCESS)
|
||||
if (status != SL_RESULT_SUCCESS || obj == nullptr || (*obj)->Realize (obj, 0) != SL_RESULT_SUCCESS)
|
||||
{
|
||||
destroyObject (obj);
|
||||
return {};
|
||||
|
|
@ -611,7 +611,7 @@ public:
|
|||
else
|
||||
{
|
||||
for (int i = 0; i < outputChannels; ++i)
|
||||
zeromem (outputChannelData[i], sizeof(float) * static_cast<size_t> (bufferSize));
|
||||
zeromem (outputChannelData[i], sizeof (float) * static_cast<size_t> (bufferSize));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -913,7 +913,7 @@ public:
|
|||
if (numInputChannels > 0 && numOutputChannels > 0 && RuntimePermissions::isGranted (RuntimePermissions::recordAudio))
|
||||
{
|
||||
// New versions of the Android emulator do not seem to support audio input anymore on OS X
|
||||
activeInputChans = BigInteger(0);
|
||||
activeInputChans = BigInteger (0);
|
||||
numInputChannels = 0;
|
||||
|
||||
session.reset (OpenSLSession::create (numInputChannels, numOutputChannels,
|
||||
|
|
|
|||
|
|
@ -1366,7 +1366,7 @@ public:
|
|||
|
||||
if (sampleRates.size() == 0 && inputDevice != nullptr && outputDevice != nullptr)
|
||||
{
|
||||
lastError = TRANS("The input and output devices don't share a common sample rate!");
|
||||
lastError = TRANS ("The input and output devices don't share a common sample rate!");
|
||||
return lastError;
|
||||
}
|
||||
|
||||
|
|
@ -1377,14 +1377,14 @@ public:
|
|||
|
||||
if (inputDevice != nullptr && ! inputDevice->open (currentSampleRate, inputChannels, bufferSizeSamples))
|
||||
{
|
||||
lastError = TRANS("Couldn't open the input device!");
|
||||
lastError = TRANS ("Couldn't open the input device!");
|
||||
return lastError;
|
||||
}
|
||||
|
||||
if (outputDevice != nullptr && ! outputDevice->open (currentSampleRate, outputChannels, bufferSizeSamples))
|
||||
{
|
||||
close();
|
||||
lastError = TRANS("Couldn't open the output device!");
|
||||
lastError = TRANS ("Couldn't open the output device!");
|
||||
return lastError;
|
||||
}
|
||||
|
||||
|
|
@ -1394,7 +1394,7 @@ public:
|
|||
if (inputDevice != nullptr && outputDevice != nullptr && inputDevice->actualBufferSize != outputDevice->actualBufferSize)
|
||||
{
|
||||
close();
|
||||
lastError = TRANS("Couldn't open the output device (buffer size mismatch)");
|
||||
lastError = TRANS ("Couldn't open the output device (buffer size mismatch)");
|
||||
return lastError;
|
||||
}
|
||||
|
||||
|
|
@ -1418,7 +1418,7 @@ public:
|
|||
if (! inputDevice->start (currentBufferSizeSamples))
|
||||
{
|
||||
close();
|
||||
lastError = TRANS("Couldn't start the input device!");
|
||||
lastError = TRANS ("Couldn't start the input device!");
|
||||
return lastError;
|
||||
}
|
||||
}
|
||||
|
|
@ -1430,7 +1430,7 @@ public:
|
|||
if (! outputDevice->start())
|
||||
{
|
||||
close();
|
||||
lastError = TRANS("Couldn't start the output device!");
|
||||
lastError = TRANS ("Couldn't start the output device!");
|
||||
return lastError;
|
||||
}
|
||||
}
|
||||
|
|
@ -1823,7 +1823,7 @@ private:
|
|||
|
||||
JUCE_COMRESULT OnDeviceAdded (LPCWSTR) { return notify(); }
|
||||
JUCE_COMRESULT OnDeviceRemoved (LPCWSTR) { return notify(); }
|
||||
JUCE_COMRESULT OnDeviceStateChanged(LPCWSTR, DWORD) { return notify(); }
|
||||
JUCE_COMRESULT OnDeviceStateChanged (LPCWSTR, DWORD) { return notify(); }
|
||||
JUCE_COMRESULT OnDefaultDeviceChanged (EDataFlow, ERole, LPCWSTR) { return notify(); }
|
||||
JUCE_COMRESULT OnPropertyValueChanged (LPCWSTR, const PROPERTYKEY) { return notify(); }
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public:
|
|||
using AudioFormat::createWriterFor;
|
||||
|
||||
private:
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AiffAudioFormat)
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AiffAudioFormat)
|
||||
};
|
||||
|
||||
} // namespace juce
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ struct CoreAudioFormatMetatdata
|
|||
for (int i = 0; i < numTimeSigEvents; ++i)
|
||||
{
|
||||
int numerator, denominator;
|
||||
timeSigEvents.getEventPointer(i)->message.getTimeSignatureInfo (numerator, denominator);
|
||||
timeSigEvents.getEventPointer (i)->message.getTimeSignatureInfo (numerator, denominator);
|
||||
|
||||
String timeSigString;
|
||||
timeSigString << numerator << '/' << denominator;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ AudioFormatWriter::AudioFormatWriter (OutputStream* const out,
|
|||
numChannels (numChannels_),
|
||||
bitsPerSample (bitsPerSample_),
|
||||
usesFloatingPointData (false),
|
||||
channelLayout (AudioChannelSet::canonicalChannelSet(static_cast<int> (numChannels_))),
|
||||
channelLayout (AudioChannelSet::canonicalChannelSet (static_cast<int> (numChannels_))),
|
||||
output (out),
|
||||
formatName (formatName_)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace ausdk {
|
|||
|
||||
BufferAllocator& BufferAllocator::instance()
|
||||
{
|
||||
__attribute__((no_destroy)) static BufferAllocator global;
|
||||
__attribute__ ((no_destroy)) static BufferAllocator global;
|
||||
return global;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ static OSStatus CB_GetComponentDescription(
|
|||
|
||||
std::recursive_mutex& ComponentBase::InitializationMutex()
|
||||
{
|
||||
__attribute__((no_destroy)) static std::recursive_mutex global;
|
||||
__attribute__ ((no_destroy)) static std::recursive_mutex global;
|
||||
return global;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ public:
|
|||
/** Pops up a dialog letting the user save the processor's state to a file. */
|
||||
void askUserToSaveState (const String& fileSuffix = String())
|
||||
{
|
||||
stateFileChooser = std::make_unique<FileChooser> (TRANS("Save current state"),
|
||||
stateFileChooser = std::make_unique<FileChooser> (TRANS ("Save current state"),
|
||||
getLastFile(),
|
||||
getFilePatterns (fileSuffix));
|
||||
auto flags = FileBrowserComponent::saveMode
|
||||
|
|
@ -216,7 +216,7 @@ public:
|
|||
/** Pops up a dialog letting the user re-load the processor's state from a file. */
|
||||
void askUserToLoadState (const String& fileSuffix = String())
|
||||
{
|
||||
stateFileChooser = std::make_unique<FileChooser> (TRANS("Load a saved state"),
|
||||
stateFileChooser = std::make_unique<FileChooser> (TRANS ("Load a saved state"),
|
||||
getLastFile(),
|
||||
getFilePatterns (fileSuffix));
|
||||
auto flags = FileBrowserComponent::openMode
|
||||
|
|
@ -292,7 +292,7 @@ public:
|
|||
|
||||
o.content.setOwned (content.release());
|
||||
|
||||
o.dialogTitle = TRANS("Audio/MIDI Settings");
|
||||
o.dialogTitle = TRANS ("Audio/MIDI Settings");
|
||||
o.dialogBackgroundColour = o.content->getLookAndFeel().findColour (ResizableWindow::backgroundColourId);
|
||||
o.escapeKeyTriggersCloseButton = true;
|
||||
o.useNativeTitleBar = true;
|
||||
|
|
@ -885,12 +885,12 @@ private:
|
|||
void buttonClicked (Button*) override
|
||||
{
|
||||
PopupMenu m;
|
||||
m.addItem (1, TRANS("Audio/MIDI Settings..."));
|
||||
m.addItem (1, TRANS ("Audio/MIDI Settings..."));
|
||||
m.addSeparator();
|
||||
m.addItem (2, TRANS("Save current state..."));
|
||||
m.addItem (3, TRANS("Load a saved state..."));
|
||||
m.addItem (2, TRANS ("Save current state..."));
|
||||
m.addItem (3, TRANS ("Load a saved state..."));
|
||||
m.addSeparator();
|
||||
m.addItem (4, TRANS("Reset to default state"));
|
||||
m.addItem (4, TRANS ("Reset to default state"));
|
||||
|
||||
m.showMenuAsync (PopupMenu::Options(),
|
||||
ModalCallbackFunction::forComponent (menuCallback, this));
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@
|
|||
|
||||
#if JUCE_WINDOWS
|
||||
#define UNITY_INTERFACE_API __stdcall
|
||||
#define UNITY_INTERFACE_EXPORT __declspec(dllexport)
|
||||
#define UNITY_INTERFACE_EXPORT __declspec (dllexport)
|
||||
#else
|
||||
#define UNITY_INTERFACE_API
|
||||
#define UNITY_INTERFACE_EXPORT __attribute__ ((visibility("default")))
|
||||
#define UNITY_INTERFACE_EXPORT __attribute__ ((visibility ("default")))
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -2006,7 +2006,7 @@ namespace AAXClasses
|
|||
|
||||
i.pluginInstance->parameters.process (i.inputChannels, i.outputChannels, sideChainBufferIdx,
|
||||
*(i.bufferSize), *(i.bypass) != 0,
|
||||
getMidiNodeIn(i), getMidiNodeOut(i),
|
||||
getMidiNodeIn (i), getMidiNodeOut (i),
|
||||
meterTapBuffers);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ JUCE_BEGIN_IGNORE_WARNINGS_MSVC (6001 6053 4996 5033 4068 4996)
|
|||
#include <Libs/AAXLibrary/source/AAX_CChunkDataParser.cpp>
|
||||
#include <Libs/AAXLibrary/source/AAX_CHostServices.cpp>
|
||||
|
||||
#if defined(_WIN32) && ! defined(WIN32)
|
||||
#if defined (_WIN32) && ! defined (WIN32)
|
||||
#define WIN32
|
||||
#endif
|
||||
#include <Libs/AAXLibrary/source/AAX_CMutex.cpp>
|
||||
|
|
|
|||
|
|
@ -1557,11 +1557,11 @@ public:
|
|||
|
||||
for (int i = 0; i < numPrograms; ++i)
|
||||
{
|
||||
String name (juceFilter->getProgramName(i));
|
||||
String name (juceFilter->getProgramName (i));
|
||||
if (name.isEmpty())
|
||||
name = "Untitled";
|
||||
|
||||
AUPreset& p = presetsArray.getReference(i);
|
||||
AUPreset& p = presetsArray.getReference (i);
|
||||
p.presetNumber = i;
|
||||
p.presetName = name.toCFString();
|
||||
|
||||
|
|
@ -1705,7 +1705,7 @@ public:
|
|||
void resizeHostWindow()
|
||||
{
|
||||
[CATransaction begin];
|
||||
[CATransaction setValue:(id) kCFBooleanTrue forKey:kCATransactionDisableActions];
|
||||
[CATransaction setValue: (id) kCFBooleanTrue forKey:kCATransactionDisableActions];
|
||||
|
||||
auto rect = convertToHostBounds (makeNSRect (lastBounds));
|
||||
auto* view = (NSView*) getWindowHandle();
|
||||
|
|
@ -1731,7 +1731,7 @@ public:
|
|||
{
|
||||
for (int i = activeUIs.size(); --i >= 0;)
|
||||
{
|
||||
id ui = (id) activeUIs.getUnchecked(i);
|
||||
id ui = (id) activeUIs.getUnchecked (i);
|
||||
|
||||
if (JuceUIViewClass::getAU (ui) == this)
|
||||
JuceUIViewClass::deleteEditor (ui);
|
||||
|
|
@ -1761,11 +1761,11 @@ public:
|
|||
|
||||
if (editorComp != nullptr)
|
||||
{
|
||||
if (editorComp->getChildComponent(0) != nullptr
|
||||
if (editorComp->getChildComponent (0) != nullptr
|
||||
&& activePlugins.contains (getAU (self))) // plugin may have been deleted before the UI
|
||||
{
|
||||
AudioProcessor* const filter = getIvar<AudioProcessor*> (self, "filter");
|
||||
filter->editorBeingDeleted ((AudioProcessorEditor*) editorComp->getChildComponent(0));
|
||||
filter->editorBeingDeleted ((AudioProcessorEditor*) editorComp->getChildComponent (0));
|
||||
}
|
||||
|
||||
editorComp = nullptr;
|
||||
|
|
@ -2554,7 +2554,7 @@ private:
|
|||
void clearPresetsArray() const
|
||||
{
|
||||
for (int i = presetsArray.size(); --i >= 0;)
|
||||
CFRelease (presetsArray.getReference(i).presetName);
|
||||
CFRelease (presetsArray.getReference (i).presetName);
|
||||
|
||||
presetsArray.clear();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -758,7 +758,7 @@ private:
|
|||
AUAudioUnit* self = _self;
|
||||
|
||||
self = ObjCMsgSendSuper<AUAudioUnit, AUAudioUnit*, AudioComponentDescription,
|
||||
AudioComponentInstantiationOptions, NSError**> (self, @selector(initWithComponentDescription:options:error:), descr, options, error);
|
||||
AudioComponentInstantiationOptions, NSError**> (self, @selector (initWithComponentDescription:options:error:), descr, options, error);
|
||||
|
||||
setThis (self, juceAU);
|
||||
return self;
|
||||
|
|
@ -1183,16 +1183,16 @@ private:
|
|||
@try
|
||||
{
|
||||
// Create methods in AUParameterTree return unretained objects (!) -> see Apple header AUAudioUnitImplementation.h
|
||||
param.reset([[AUParameterTree createParameterWithIdentifier: juceStringToNS (getParameterIdentifier())
|
||||
name: juceStringToNS (name)
|
||||
address: address
|
||||
min: 0.0f
|
||||
max: getMaximumParameterValue (parameter)
|
||||
unit: unit
|
||||
unitName: nullptr
|
||||
flags: flags
|
||||
valueStrings: valueStrings.get()
|
||||
dependentParameters: nullptr]
|
||||
param.reset ([[AUParameterTree createParameterWithIdentifier: juceStringToNS (getParameterIdentifier())
|
||||
name: juceStringToNS (name)
|
||||
address: address
|
||||
min: 0.0f
|
||||
max: getMaximumParameterValue (parameter)
|
||||
unit: unit
|
||||
unitName: nullptr
|
||||
flags: flags
|
||||
valueStrings: valueStrings.get()
|
||||
dependentParameters: nullptr]
|
||||
retain]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
|||
#endif
|
||||
|
||||
#else
|
||||
JUCE_CREATE_APPLICATION_DEFINE(juce::StandaloneFilterApp)
|
||||
JUCE_CREATE_APPLICATION_DEFINE (juce::StandaloneFilterApp)
|
||||
#endif
|
||||
|
||||
#if ! JUCE_USE_CUSTOM_PLUGIN_STANDALONE_ENTRYPOINT
|
||||
|
|
|
|||
|
|
@ -388,7 +388,7 @@ public:
|
|||
int i;
|
||||
for (i = 0; i < numOut; ++i)
|
||||
{
|
||||
auto* chan = tmpBuffers.tempChannels.getUnchecked(i);
|
||||
auto* chan = tmpBuffers.tempChannels.getUnchecked (i);
|
||||
|
||||
if (chan == nullptr)
|
||||
{
|
||||
|
|
@ -444,7 +444,7 @@ public:
|
|||
|
||||
// copy back any temp channels that may have been used..
|
||||
for (i = 0; i < numOut; ++i)
|
||||
if (auto* chan = tmpBuffers.tempChannels.getUnchecked(i))
|
||||
if (auto* chan = tmpBuffers.tempChannels.getUnchecked (i))
|
||||
if (auto* dest = outputs[i])
|
||||
memcpy (dest, chan, (size_t) numSamples * sizeof (FloatType));
|
||||
}
|
||||
|
|
@ -2131,7 +2131,7 @@ namespace
|
|||
}
|
||||
|
||||
#if ! JUCE_WINDOWS
|
||||
#define JUCE_EXPORTED_FUNCTION extern "C" __attribute__ ((visibility("default")))
|
||||
#define JUCE_EXPORTED_FUNCTION extern "C" __attribute__ ((visibility ("default")))
|
||||
#endif
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes")
|
||||
|
|
@ -2169,8 +2169,8 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes")
|
|||
}
|
||||
|
||||
// don't put initialiseJuce_GUI or shutdownJuce_GUI in these... it will crash!
|
||||
__attribute__((constructor)) void myPluginInit() {}
|
||||
__attribute__((destructor)) void myPluginFini() {}
|
||||
__attribute__ ((constructor)) void myPluginInit() {}
|
||||
__attribute__ ((destructor)) void myPluginFini() {}
|
||||
|
||||
//==============================================================================
|
||||
// Win32 startup code..
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ JUCE_BEGIN_NO_SANITIZE ("vptr")
|
|||
|
||||
//==============================================================================
|
||||
#if JucePlugin_Enable_ARA
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE("-Wpragma-pack")
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wpragma-pack")
|
||||
#include <ARA_API/ARAVST3.h>
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
|
||||
|
|
@ -98,9 +98,9 @@ JUCE_BEGIN_NO_SANITIZE ("vptr")
|
|||
#error "Unsupported ARA version - only ARA version 2 and onward are supported by the current implementation"
|
||||
#endif
|
||||
|
||||
DEF_CLASS_IID(ARA::IPlugInEntryPoint)
|
||||
DEF_CLASS_IID(ARA::IPlugInEntryPoint2)
|
||||
DEF_CLASS_IID(ARA::IMainFactory)
|
||||
DEF_CLASS_IID (ARA::IPlugInEntryPoint)
|
||||
DEF_CLASS_IID (ARA::IPlugInEntryPoint2)
|
||||
DEF_CLASS_IID (ARA::IMainFactory)
|
||||
#endif
|
||||
|
||||
namespace juce
|
||||
|
|
@ -3124,7 +3124,7 @@ public:
|
|||
info.channelCount = 16;
|
||||
#endif
|
||||
|
||||
toString128 (info.name, TRANS("MIDI Input"));
|
||||
toString128 (info.name, TRANS ("MIDI Input"));
|
||||
info.busType = Vst::kMain;
|
||||
return kResultTrue;
|
||||
}
|
||||
|
|
@ -3142,7 +3142,7 @@ public:
|
|||
info.channelCount = 16;
|
||||
#endif
|
||||
|
||||
toString128 (info.name, TRANS("MIDI Output"));
|
||||
toString128 (info.name, TRANS ("MIDI Output"));
|
||||
info.busType = Vst::kMain;
|
||||
return kResultTrue;
|
||||
}
|
||||
|
|
@ -3864,7 +3864,7 @@ bool shutdownModule()
|
|||
#if JUCE_WINDOWS
|
||||
#define JUCE_EXPORTED_FUNCTION
|
||||
#else
|
||||
#define JUCE_EXPORTED_FUNCTION extern "C" __attribute__ ((visibility("default")))
|
||||
#define JUCE_EXPORTED_FUNCTION extern "C" __attribute__ ((visibility ("default")))
|
||||
#endif
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
|
|
|
|||
|
|
@ -472,7 +472,7 @@ void createARAFactoryAsync (AudioPluginInstance& instance, std::function<void (A
|
|||
std::function<void (ARAFactoryWrapper)> callback;
|
||||
};
|
||||
|
||||
Extensions extensions { std::move(cb) };
|
||||
Extensions extensions { std::move (cb) };
|
||||
instance.getExtensions (extensions);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ namespace AudioUnitFormatHelpers
|
|||
{
|
||||
if (auto bundleRef = CFUniquePtr<CFBundleRef> (CFBundleCreate (kCFAllocatorDefault, url.get())))
|
||||
{
|
||||
CFTypeRef bundleName = CFBundleGetValueForInfoDictionaryKey (bundleRef.get(), CFSTR("CFBundleName"));
|
||||
CFTypeRef bundleName = CFBundleGetValueForInfoDictionaryKey (bundleRef.get(), CFSTR ("CFBundleName"));
|
||||
|
||||
if (bundleName != nullptr && CFGetTypeID (bundleName) == CFStringGetTypeID())
|
||||
name = String::fromCFString ((CFStringRef) bundleName);
|
||||
|
|
@ -208,12 +208,12 @@ namespace AudioUnitFormatHelpers
|
|||
if (name.isEmpty())
|
||||
name = file.getFileNameWithoutExtension();
|
||||
|
||||
CFTypeRef versionString = CFBundleGetValueForInfoDictionaryKey (bundleRef.get(), CFSTR("CFBundleVersion"));
|
||||
CFTypeRef versionString = CFBundleGetValueForInfoDictionaryKey (bundleRef.get(), CFSTR ("CFBundleVersion"));
|
||||
|
||||
if (versionString != nullptr && CFGetTypeID (versionString) == CFStringGetTypeID())
|
||||
version = String::fromCFString ((CFStringRef) versionString);
|
||||
|
||||
CFTypeRef manuString = CFBundleGetValueForInfoDictionaryKey (bundleRef.get(), CFSTR("CFBundleGetInfoString"));
|
||||
CFTypeRef manuString = CFBundleGetValueForInfoDictionaryKey (bundleRef.get(), CFSTR ("CFBundleGetInfoString"));
|
||||
|
||||
if (manuString != nullptr && CFGetTypeID (manuString) == CFStringGetTypeID())
|
||||
manufacturer = String::fromCFString ((CFStringRef) manuString);
|
||||
|
|
@ -1603,7 +1603,7 @@ public:
|
|||
{
|
||||
AUPreset current;
|
||||
current.presetNumber = -1;
|
||||
current.presetName = CFSTR("");
|
||||
current.presetName = CFSTR ("");
|
||||
|
||||
UInt32 prstsz = sizeof (AUPreset);
|
||||
|
||||
|
|
@ -1937,7 +1937,7 @@ private:
|
|||
|
||||
float getDefaultValue() const override { return 0.0f; }
|
||||
String getName (int /*maximumStringLength*/) const override { return "Bypass"; }
|
||||
String getText (float value, int) const override { return (value != 0.0f ? TRANS("On") : TRANS("Off")); }
|
||||
String getText (float value, int) const override { return (value != 0.0f ? TRANS ("On") : TRANS ("Off")); }
|
||||
bool isAutomatable() const override { return true; }
|
||||
bool isDiscrete() const override { return true; }
|
||||
bool isBoolean() const override { return true; }
|
||||
|
|
@ -1948,9 +1948,9 @@ private:
|
|||
String getParameterID() const override { return {}; }
|
||||
|
||||
AudioUnitPluginInstance& parent;
|
||||
const StringArray auOnStrings { TRANS("on"), TRANS("yes"), TRANS("true") };
|
||||
const StringArray auOffStrings { TRANS("off"), TRANS("no"), TRANS("false") };
|
||||
const StringArray values { TRANS("Off"), TRANS("On") };
|
||||
const StringArray auOnStrings { TRANS ("on"), TRANS ("yes"), TRANS ("true") };
|
||||
const StringArray auOffStrings { TRANS ("off"), TRANS ("no"), TRANS ("false") };
|
||||
const StringArray values { TRANS ("Off"), TRANS ("On") };
|
||||
|
||||
bool currentValue = false;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public:
|
|||
{
|
||||
for (auto i = getActiveModules().size(); --i >= 0;)
|
||||
{
|
||||
auto* module = getActiveModules().getUnchecked(i);
|
||||
auto* module = getActiveModules().getUnchecked (i);
|
||||
|
||||
if (module->file == file)
|
||||
return module;
|
||||
|
|
@ -300,7 +300,7 @@ public:
|
|||
if (plugin->run != nullptr)
|
||||
{
|
||||
for (int i = 0; i < outputs.size(); ++i)
|
||||
plugin->connect_port (handle, (size_t) outputs.getUnchecked(i),
|
||||
plugin->connect_port (handle, (size_t) outputs.getUnchecked (i),
|
||||
i < buffer.getNumChannels() ? buffer.getWritePointer (i) : nullptr);
|
||||
|
||||
plugin->run (handle, (size_t) numSamples);
|
||||
|
|
@ -313,7 +313,7 @@ public:
|
|||
tempBuffer.clear();
|
||||
|
||||
for (int i = 0; i < outputs.size(); ++i)
|
||||
plugin->connect_port (handle, (size_t) outputs.getUnchecked(i), tempBuffer.getWritePointer (i));
|
||||
plugin->connect_port (handle, (size_t) outputs.getUnchecked (i), tempBuffer.getWritePointer (i));
|
||||
|
||||
plugin->run_adding (handle, (size_t) numSamples);
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue