mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-26 02:14:22 +00:00
Fix for multithreaded Mac OpenGL components; better responding to shutdown messages on Windows; a couple of small VST tweaks; fixed a typo in the AudioDeviceManager and made it close and reopen the audio device while the midi output is being changed; changed AlertWindow to give more control over the desktop window style; fixed a small bug in Graphics; changed SparseSet to avoid an overflow error; stopped BufferedInputStream locking up when its source stream fails; added a case-sensitivity option to StringPairArray and LocalisedStrings.
This commit is contained in:
parent
68dba8605d
commit
bf501e1fda
16 changed files with 332 additions and 67 deletions
|
|
@ -379,7 +379,7 @@ const String AudioDeviceManager::setAudioDeviceSetup (const AudioDeviceSetup& ne
|
|||
const String newOutputDeviceName (numOutputChansNeeded == 0 ? String::empty : newSetup.outputDeviceName);
|
||||
|
||||
if (currentSetup.inputDeviceName != newInputDeviceName
|
||||
|| currentSetup.inputDeviceName != newOutputDeviceName
|
||||
|| currentSetup.outputDeviceName != newOutputDeviceName
|
||||
|| currentAudioDevice == 0)
|
||||
{
|
||||
deleteCurrentDevice();
|
||||
|
|
@ -832,12 +832,18 @@ void AudioDeviceManager::setDefaultMidiOutput (const String& deviceName)
|
|||
{
|
||||
if (defaultMidiOutputName != deviceName)
|
||||
{
|
||||
if (currentCallback != 0 && currentAudioDevice != 0)
|
||||
currentCallback->audioDeviceStopped();
|
||||
|
||||
deleteAndZero (defaultMidiOutput);
|
||||
defaultMidiOutputName = deviceName;
|
||||
|
||||
if (deviceName.isNotEmpty())
|
||||
defaultMidiOutput = MidiOutput::openDevice (MidiOutput::getDevices().indexOf (deviceName));
|
||||
|
||||
if (currentCallback != 0 && currentAudioDevice != 0)
|
||||
currentCallback->audioDeviceAboutToStart (currentAudioDevice);
|
||||
|
||||
updateXml();
|
||||
sendChangeMessage (this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -591,6 +591,11 @@ void AlertWindow::lookAndFeelChanged()
|
|||
setDropShadowEnabled ((flags & ComponentPeer::windowHasDropShadow) != 0);
|
||||
}
|
||||
|
||||
int AlertWindow::getDesktopWindowStyleFlags() const
|
||||
{
|
||||
return getLookAndFeel().getAlertBoxWindowFlags();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
struct AlertWindowInfo
|
||||
{
|
||||
|
|
|
|||
|
|
@ -339,6 +339,8 @@ protected:
|
|||
void lookAndFeelChanged();
|
||||
/** @internal */
|
||||
void userTriedToCloseWindow();
|
||||
/** @internal */
|
||||
int getDesktopWindowStyleFlags() const;
|
||||
|
||||
private:
|
||||
String text;
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ void Graphics::strokePath (const Path& path,
|
|||
const PathStrokeType& strokeType,
|
||||
const AffineTransform& transform) const throw()
|
||||
{
|
||||
if (! state->colour.isTransparent())
|
||||
if ((! state->colour.isTransparent()) || state->brush != 0)
|
||||
{
|
||||
Path stroke;
|
||||
strokeType.createStrokedPath (stroke, path, transform);
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ protected:
|
|||
numAllocated (0),
|
||||
granularity (granularity_)
|
||||
{
|
||||
jassert (granularity > 0);
|
||||
}
|
||||
|
||||
/** Destructor. */
|
||||
|
|
|
|||
|
|
@ -225,23 +225,26 @@ public:
|
|||
{
|
||||
jassert (numValuesToRemove >= 0);
|
||||
|
||||
if (numValuesToRemove != 0
|
||||
if (numValuesToRemove >= 0
|
||||
&& firstValue < values.getLast())
|
||||
{
|
||||
const bool onAtStart = contains (firstValue - 1);
|
||||
Type lastValue = firstValue + numValuesToRemove;
|
||||
|
||||
if (lastValue < firstValue) // possible if the signed arithmetic wraps around
|
||||
lastValue = values.getLast();
|
||||
|
||||
const Type lastValue = firstValue + jmin (numValuesToRemove, values.getLast() - firstValue);
|
||||
const bool onAtEnd = contains (lastValue);
|
||||
|
||||
for (int i = values.size(); --i >= 0;)
|
||||
{
|
||||
if (values.getUnchecked(i) >= firstValue
|
||||
&& values.getUnchecked(i) <= lastValue)
|
||||
if (values.getUnchecked(i) <= lastValue)
|
||||
{
|
||||
values.remove (i);
|
||||
while (values.getUnchecked(i) >= firstValue)
|
||||
{
|
||||
values.remove (i);
|
||||
|
||||
if (--i < 0)
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -153,8 +153,12 @@ int BufferedInputStream::read (void* destBuffer, int maxBytesToRead)
|
|||
destBuffer = (void*) (((char*) destBuffer) + bytesAvailable);
|
||||
}
|
||||
|
||||
const int64 oldLastReadPos = lastReadPos;
|
||||
ensureBuffered();
|
||||
|
||||
if (oldLastReadPos == lastReadPos)
|
||||
break; // if ensureBuffered() failed to read any more data, bail out
|
||||
|
||||
if (isExhausted())
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,6 +124,11 @@ void LocalisedStrings::loadFromText (const String& fileContents) throw()
|
|||
}
|
||||
}
|
||||
|
||||
void LocalisedStrings::setIgnoresCase (const bool shouldIgnoreCase) throw()
|
||||
{
|
||||
translations.setIgnoresCase (shouldIgnoreCase);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
static CriticalSection currentMappingsLock;
|
||||
static LocalisedStrings* currentMappings = 0;
|
||||
|
|
|
|||
|
|
@ -181,6 +181,13 @@ public:
|
|||
*/
|
||||
const StringArray getCountryCodes() const throw() { return countryCodes; }
|
||||
|
||||
|
||||
//==============================================================================
|
||||
/** Indicates whether to use a case-insensitive search when looking up a string.
|
||||
This defaults to true.
|
||||
*/
|
||||
void setIgnoresCase (const bool shouldIgnoreCase) throw();
|
||||
|
||||
//==============================================================================
|
||||
juce_UseDebuggingNewOperator
|
||||
|
||||
|
|
|
|||
|
|
@ -130,6 +130,11 @@ void StringPairArray::remove (const int index) throw()
|
|||
values.remove (index);
|
||||
}
|
||||
|
||||
void StringPairArray::setIgnoresCase (const bool shouldIgnoreCase) throw()
|
||||
{
|
||||
ignoreCase = shouldIgnoreCase;
|
||||
}
|
||||
|
||||
void StringPairArray::minimiseStorageOverheads() throw()
|
||||
{
|
||||
keys.minimiseStorageOverheads();
|
||||
|
|
|
|||
|
|
@ -138,6 +138,11 @@ public:
|
|||
*/
|
||||
void remove (const int index) throw();
|
||||
|
||||
//==============================================================================
|
||||
/** Indicates whether to use a case-insensitive search when looking up a key string.
|
||||
*/
|
||||
void setIgnoresCase (const bool shouldIgnoreCase) throw();
|
||||
|
||||
//==============================================================================
|
||||
/** Reduces the amount of storage being used by the array.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue