diff --git a/extras/juce demo/build/win32_vc8/jucedemo.sln b/extras/juce demo/build/win32_vc8/jucedemo.sln index 0cdd7439dc..a08814acc5 100644 --- a/extras/juce demo/build/win32_vc8/jucedemo.sln +++ b/extras/juce demo/build/win32_vc8/jucedemo.sln @@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jucedemo", "jucedemo.vcproj", "{050D65C2-17C4-4EE1-ABCE-BEA9DA83D77A}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JUCE", "..\..\..\..\build\win32\vc8\JUCE.vcproj", "{AE232C11-D91C-4CA1-B24E-8B11A52EFF26}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -19,6 +21,14 @@ Global {050D65C2-17C4-4EE1-ABCE-BEA9DA83D77A}.DLL Release|Win32.Build.0 = Release|Win32 {050D65C2-17C4-4EE1-ABCE-BEA9DA83D77A}.Release|Win32.ActiveCfg = Release|Win32 {050D65C2-17C4-4EE1-ABCE-BEA9DA83D77A}.Release|Win32.Build.0 = Release|Win32 + {AE232C11-D91C-4CA1-B24E-8B11A52EFF26}.Debug|Win32.ActiveCfg = Debug|Win32 + {AE232C11-D91C-4CA1-B24E-8B11A52EFF26}.Debug|Win32.Build.0 = Debug|Win32 + {AE232C11-D91C-4CA1-B24E-8B11A52EFF26}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {AE232C11-D91C-4CA1-B24E-8B11A52EFF26}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {AE232C11-D91C-4CA1-B24E-8B11A52EFF26}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {AE232C11-D91C-4CA1-B24E-8B11A52EFF26}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {AE232C11-D91C-4CA1-B24E-8B11A52EFF26}.Release|Win32.ActiveCfg = Release|Win32 + {AE232C11-D91C-4CA1-B24E-8B11A52EFF26}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/extras/juce demo/src/binarydata/AudioDemo.cpp b/extras/juce demo/src/binarydata/AudioDemo.cpp index ce92b1f7c7..dc6b6c9707 100644 --- a/extras/juce demo/src/binarydata/AudioDemo.cpp +++ b/extras/juce demo/src/binarydata/AudioDemo.cpp @@ -578,10 +578,11 @@ public: 0, 1, 2, 2, true, - false); + false, + true); // ...and show it in a DialogWindow... - audioSettingsComp.setSize (500, 400); + audioSettingsComp.setSize (500, 450); DialogWindow::showModalDialog (T("Audio Settings"), &audioSettingsComp, diff --git a/juce_Config.h b/juce_Config.h index 8ece855976..84f765d595 100644 --- a/juce_Config.h +++ b/juce_Config.h @@ -96,7 +96,7 @@ installed, and its header files will need to be on your include path. */ #if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) - #define JUCE_QUICKTIME 1 +// #define JUCE_QUICKTIME 1 #endif diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index 84c2f1fa17..44dfdc9539 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -30774,17 +30774,26 @@ void AudioProcessor::updateHostDisplay() } } -bool AudioProcessor::isParameterAutomatable (int /*index*/) const +bool AudioProcessor::isParameterAutomatable (int /*parameterIndex*/) const { return true; } +bool AudioProcessor::isMetaParameter (int /*parameterIndex*/) const +{ + return false; +} + void AudioProcessor::suspendProcessing (const bool shouldBeSuspended) { const ScopedLock sl (callbackLock); suspended = shouldBeSuspended; } +void AudioProcessor::reset() +{ +} + void AudioProcessor::editorBeingDeleted (AudioProcessorEditor* const editor) throw() { const ScopedLock sl (callbackLock); @@ -57858,6 +57867,16 @@ int LookAndFeel::getAlertBoxWindowFlags() | ComponentPeer::windowHasDropShadow; } +int LookAndFeel::getAlertWindowButtonHeight() +{ + return 28; +} + +const Font LookAndFeel::getAlertWindowFont() +{ + return Font (12.0f); +} + void LookAndFeel::drawProgressBar (Graphics& g, ProgressBar& progressBar, int width, int height, double progress, const String& textToShow) @@ -64923,10 +64942,12 @@ public: if (outputDeviceDropDown != 0) { outputDeviceDropDown->setBounds (lx, y, w, h); - testButton->setBounds (proportionOfWidth (0.77f), - outputDeviceDropDown->getY(), - proportionOfWidth (0.18f), - h); + + if (testButton != 0) + testButton->setBounds (proportionOfWidth (0.77f), + outputDeviceDropDown->getY(), + proportionOfWidth (0.18f), + h); y += dh; } @@ -65070,7 +65091,7 @@ public: getTopLevelComponent()->toFront (true); } } - else if (button == testButton) + else if (button == testButton && testButton != 0) { setup.manager->playTestSound(); } @@ -65109,8 +65130,11 @@ public: : TRANS ("device:")); outputDeviceLabel->attachToComponent (outputDeviceDropDown, true); - addAndMakeVisible (testButton = new TextButton (TRANS ("Test"))); - testButton->addButtonListener (this); + if (setup.maxNumOutputChannels > 0) + { + addAndMakeVisible (testButton = new TextButton (TRANS ("Test"))); + testButton->addButtonListener (this); + } } addNamesToDeviceBox (*outputDeviceDropDown, false); @@ -65292,7 +65316,7 @@ private: box->setSelectedId (index + 1, true); - if (! isInput) + if (testButton != 0 && ! isInput) testButton->setEnabled (index >= 0); } } @@ -67540,7 +67564,7 @@ int MidiKeyboardComponent::remappedXYToNote (int x, int y) const { if (y < blackNoteLength) { - for (int octaveStart = 12 * (rangeStart / 12); octaveStart < rangeEnd; octaveStart += 12) + for (int octaveStart = 12 * (rangeStart / 12); octaveStart <= rangeEnd; octaveStart += 12) { for (int i = 0; i < 5; ++i) { @@ -67559,7 +67583,7 @@ int MidiKeyboardComponent::remappedXYToNote (int x, int y) const } } - for (int octaveStart = 12 * (rangeStart / 12); octaveStart < rangeEnd; octaveStart += 12) + for (int octaveStart = 12 * (rangeStart / 12); octaveStart <= rangeEnd; octaveStart += 12) { for (int i = 0; i < 7; ++i) { @@ -69773,7 +69797,7 @@ void AlertWindow::addButton (const String& name, b->addShortcut (shortcutKey1); b->addShortcut (shortcutKey2); b->addButtonListener (this); - b->changeWidthToFitText (28); + b->changeWidthToFitText (getLookAndFeel().getAlertWindowButtonHeight()); addAndMakeVisible (b, 0); buttons.add (b); @@ -69950,8 +69974,8 @@ void AlertWindow::paint (Graphics& g) { getLookAndFeel().drawAlertBox (g, *this, textArea, textLayout); - g.setColour (Colours::black); - g.setFont (12.0f); + g.setColour (findColour (textColourId)); + g.setFont (getLookAndFeel().getAlertWindowFont()); int i; for (i = textBoxes.size(); --i >= 0;) @@ -180024,6 +180048,8 @@ public: { // got a few samples overlapping, so use them before seeking.. + const int numToUse = jmin (numSamples, numAvailable); + for (unsigned int i = 0; i < numChannels; ++i) { if (destSamples[i] == 0) @@ -180032,12 +180058,12 @@ public: memcpy (destSamples[i] + writeOffset, reservoir.getSampleData (jmin (i, reservoir.getNumChannels()), (int) (startSampleInFile - reservoirStart)), - sizeof (float) * numSamples); + sizeof (float) * numToUse); } - startSampleInFile += numAvailable; - numSamples -= numAvailable; - writeOffset += numAvailable; + startSampleInFile += numToUse; + numSamples -= numToUse; + writeOffset += numToUse; if (numSamples == 0) break; @@ -230818,8 +230844,8 @@ bool AlertWindow::showNativeDialogBox (const String& title, bool isOkCancel) { return MessageBox (0, bodyText, title, - (isOkCancel) ? MB_OKCANCEL - : MB_OK) == IDOK; + MB_SETFOREGROUND | (isOkCancel ? MB_OKCANCEL + : MB_OK)) == IDOK; } #endif @@ -252963,7 +252989,7 @@ void SystemStats::initialiseStats() throw() { initialised = true; - [NSApplication sharedApplication]; + //[NSApplication sharedApplication]; NSApplicationLoad(); #if JUCE_INTEL diff --git a/juce_amalgamated.h b/juce_amalgamated.h index f84e526562..301526b28a 100644 --- a/juce_amalgamated.h +++ b/juce_amalgamated.h @@ -140,7 +140,7 @@ installed, and its header files will need to be on your include path. */ #if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) - #define JUCE_QUICKTIME 1 +// #define JUCE_QUICKTIME 1 #endif /** Comment out this macro if you don't want to enable OpenGL or if you don't @@ -27386,6 +27386,13 @@ public: */ bool isSuspended() const throw() { return suspended; } + /** A plugin can override this to be told when it should reset any playing voices. + + The default implementation does nothing, but a host may call this to tell the + plugin that it should stop any tails or sounds that have been left running. + */ + virtual void reset(); + /** Returns true if the processor is being run in an offline mode for rendering. If the processor is being run live on realtime signals, this returns false. @@ -27500,6 +27507,15 @@ public: */ virtual bool isParameterAutomatable (int parameterIndex) const; + /** Should return true if this parameter is a "meta" parameter. + + A meta-parameter is a parameter that changes other params. It is used + by some hosts (e.g. AudioUnit hosts). + + By default this returns false. + */ + virtual bool isMetaParameter (int parameterIndex) const; + /** Sends a signal to the host to tell it that the user is about to start changing this parameter. @@ -52312,6 +52328,10 @@ public: virtual int getAlertBoxWindowFlags(); + virtual int getAlertWindowButtonHeight(); + + virtual const Font getAlertWindowFont(); + /** Draws a progress bar. If the progress value is less than 0 or greater than 1.0, this should draw a spinning