Browse Source

Update to latest juce; Optimize graph

tags/2018-04-16
falkTX 8 years ago
parent
commit
87a22117d4
5 changed files with 641 additions and 405 deletions
  1. +10
    -4
      libs/juce/source/modules/juce_audio_devices/native/juce_linux_ALSA.cpp
  2. +3
    -3
      libs/juce/source/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp
  3. +617
    -393
      libs/juce/source/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp
  4. +4
    -4
      libs/juce/source/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp
  5. +7
    -1
      libs/juce/source/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp

+ 10
- 4
libs/juce/source/modules/juce_audio_devices/native/juce_linux_ALSA.cpp View File

@@ -486,14 +486,17 @@ public:
sampleRate = newSampleRate;
bufferSize = newBufferSize;
inputChannelBuffer.setSize (jmax ((int) minChansIn, inputChannels.getHighestBit()) + 1, bufferSize);
int maxInputsRequested = inputChannels.getHighestBit() + 1;
maxInputsRequested = jmax ((int) minChansIn, jmin ((int) maxChansIn, maxInputsRequested));
inputChannelBuffer.setSize (maxInputsRequested, bufferSize);
inputChannelBuffer.clear();
inputChannelDataForCallback.clear();
currentInputChans.clear();
if (inputChannels.getHighestBit() >= 0)
{
for (int i = 0; i <= jmax (inputChannels.getHighestBit(), (int) minChansIn); ++i)
for (int i = 0; i < maxInputsRequested; ++i)
{
if (inputChannels[i])
{
@@ -505,14 +508,17 @@ public:
ensureMinimumNumBitsSet (outputChannels, (int) minChansOut);
outputChannelBuffer.setSize (jmax ((int) minChansOut, outputChannels.getHighestBit()) + 1, bufferSize);
int maxOutputsRequested = outputChannels.getHighestBit() + 1;
maxOutputsRequested = jmax ((int) minChansOut, jmin ((int) maxChansOut, maxOutputsRequested));
outputChannelBuffer.setSize (maxOutputsRequested, bufferSize);
outputChannelBuffer.clear();
outputChannelDataForCallback.clear();
currentOutputChans.clear();
if (outputChannels.getHighestBit() >= 0)
{
for (int i = 0; i <= jmax (outputChannels.getHighestBit(), (int) minChansOut); ++i)
for (int i = 0; i < maxOutputsRequested; ++i)
{
if (outputChannels[i])
{


+ 3
- 3
libs/juce/source/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp View File

@@ -341,10 +341,10 @@ namespace AiffFileHelpers
out.writeByte ((char) labelLength + 1);
out.write (label.toUTF8(), labelLength);
out.writeByte (0);
}
if ((out.getDataSize() & 1) != 0)
out.writeByte (0);
if ((out.getDataSize() & 1) != 0)
out.writeByte (0);
}
}
}
}


+ 617
- 393
libs/juce/source/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp
File diff suppressed because it is too large
View File


+ 4
- 4
libs/juce/source/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp View File

@@ -131,11 +131,11 @@ static void addZenityArgs (StringArray& args, String& separator,
if (filters.isNotEmpty() && filters != "*" && filters != "*.*")
{
args.add ("--file-filter");
args.add (filters.replaceCharacter (';', ' '));
StringArray tokens;
tokens.addTokens (filters, ";,|", "\"");
args.add ("--file-filter");
args.add ("All files | *");
for (int i = 0; i < tokens.size(); ++i)
args.add ("--file-filter='" + tokens[i] + "'");
}
if (file.isDirectory())


+ 7
- 1
libs/juce/source/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp View File

@@ -218,6 +218,8 @@ void FileChooser::showPlatformDialog (Array<File>& results, const String& title_
info.customComponent->enterModalState();
}
const StringRef separatorTokens (";,|");
const size_t filterSpaceNumChars = 2048;
HeapBlock<WCHAR> filters;
filters.calloc (filterSpaceNumChars);
@@ -225,6 +227,10 @@ void FileChooser::showPlatformDialog (Array<File>& results, const String& title_
filter.copyToUTF16 (filters + (bytesWritten / sizeof (WCHAR)),
((filterSpaceNumChars - 1) * sizeof (WCHAR) - bytesWritten));
for (int i = 0; i < filterSpaceNumChars; ++i)
if (separatorTokens.text.indexOf ((juce_wchar) filters[i]) >= 0)
filters[i] = 0;
OPENFILENAMEW of = { 0 };
String localPath (info.initialPath);
@@ -249,7 +255,7 @@ void FileChooser::showPlatformDialog (Array<File>& results, const String& title_
if (isSaveDialogue)
{
StringArray tokens;
tokens.addTokens (filter, ";,", "\"'");
tokens.addTokens (filter, separatorTokens, "\"'");
tokens.trim();
tokens.removeEmptyStrings();


Loading…
Cancel
Save