| @@ -424,7 +424,7 @@ public: | |||
| if (outputChannels.getHighestBit() >= 0) | |||
| { | |||
| for (int i = 0; i <= outputChannels.getHighestBit(); ++i) | |||
| for (int i = 0; i <= jmax (outputChannels.getHighestBit(), minChansOut); ++i) | |||
| { | |||
| outputChannelData [i] = (float*) juce_calloc (sizeof (float) * bufferSize); | |||
| @@ -447,7 +447,7 @@ public: | |||
| return; | |||
| } | |||
| currentOutputChans.setRange (0, minChansIn, true); | |||
| currentOutputChans.setRange (0, minChansOut, true); | |||
| if (! outputDevice->setParameters ((unsigned int) sampleRate, | |||
| jlimit ((int) minChansOut, (int) maxChansOut, currentOutputChans.getHighestBit() + 1), | |||
| @@ -812,28 +812,27 @@ public: | |||
| ww = jmax (1, w); | |||
| wh = jmax (1, h); | |||
| if (! mapped) | |||
| // Make sure the Window manager does what we want | |||
| XSizeHints* hints = XAllocSizeHints(); | |||
| hints->flags = USSize | USPosition; | |||
| hints->width = ww; | |||
| hints->height = wh; | |||
| hints->x = wx; | |||
| hints->y = wy; | |||
| if ((getStyleFlags() & (windowHasTitleBar | windowIsResizable)) == windowHasTitleBar) | |||
| { | |||
| // Make sure the Window manager does what we want | |||
| XSizeHints* hints = XAllocSizeHints(); | |||
| hints->flags = USSize | USPosition; | |||
| hints->width = ww; | |||
| hints->height = wh; | |||
| hints->x = wx; | |||
| hints->y = wy; | |||
| if ((getStyleFlags() & (windowHasTitleBar | windowIsResizable)) == windowHasTitleBar) | |||
| { | |||
| hints->min_width = hints->max_width = hints->width; | |||
| hints->min_height = hints->max_height = hints->height; | |||
| hints->flags |= PMinSize | PMaxSize; | |||
| } | |||
| XSetWMNormalHints (display, windowH, hints); | |||
| XFree (hints); | |||
| hints->min_width = hints->max_width = hints->width; | |||
| hints->min_height = hints->max_height = hints->height; | |||
| hints->flags |= PMinSize | PMaxSize; | |||
| } | |||
| XMoveResizeWindow (display, windowH, wx, wy, ww, wh); | |||
| XSetWMNormalHints (display, windowH, hints); | |||
| XFree (hints); | |||
| XMoveResizeWindow (display, windowH, | |||
| wx - windowBorder.getLeft(), | |||
| wy - windowBorder.getTop(), ww, wh); | |||
| if (! deletionChecker.hasBeenDeleted()) | |||
| { | |||
| @@ -1960,16 +1959,23 @@ private: | |||
| if (hints != None) | |||
| { | |||
| long netHints [2]; | |||
| netHints[0] = XInternAtom (display, "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE", True); | |||
| int netHints [2]; | |||
| int numHints = 0; | |||
| netHints[numHints] = XInternAtom (display, "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE", True); | |||
| if (netHints [numHints] != 0) | |||
| ++numHints; | |||
| if ((styleFlags & windowIsTemporary) != 0) | |||
| netHints[1] = XInternAtom (display, "_NET_WM_WINDOW_TYPE_MENU", True); | |||
| netHints [numHints] = XInternAtom (display, "_NET_WM_WINDOW_TYPE_MENU", True); | |||
| else | |||
| netHints[1] = XInternAtom (display, "_NET_WM_WINDOW_TYPE_NORMAL", True); | |||
| netHints [numHints] = XInternAtom (display, "_NET_WM_WINDOW_TYPE_NORMAL", True); | |||
| if (netHints [numHints] != 0) | |||
| ++numHints; | |||
| XChangeProperty (display, wndH, hints, XA_ATOM, 32, PropModeReplace, | |||
| (unsigned char*) &netHints, 2); | |||
| (unsigned char*) &netHints, numHints); | |||
| } | |||
| } | |||
| @@ -2024,7 +2030,7 @@ private: | |||
| if (hints != None) | |||
| { | |||
| long netHints [6]; | |||
| int netHints [6]; | |||
| int num = 0; | |||
| netHints [num++] = XInternAtom (display, "_NET_WM_ACTION_RESIZE", (styleFlags & windowIsResizable) ? True : False); | |||
| @@ -2578,8 +2584,8 @@ private: | |||
| Atom XA_OtherMime, dragAndDropCurrentMimeType; | |||
| Window dragAndDropSourceWindow; | |||
| unsigned long allowedActions [5]; | |||
| unsigned long allowedMimeTypeAtoms [3]; | |||
| unsigned int allowedActions [5]; | |||
| unsigned int allowedMimeTypeAtoms [3]; | |||
| Array <Atom> srcMimeTypeAtomList; | |||
| }; | |||
| @@ -1793,7 +1793,7 @@ public: | |||
| AudioIODevice* createDevice (const String& outputDeviceName, | |||
| const String& inputDeviceName) | |||
| { | |||
| jassert (inputDeviceName == outputDeviceName); | |||
| jassert (inputDeviceName == outputDeviceName || outputDeviceName.isEmpty() || inputDeviceName.isEmpty()); | |||
| (void) inputDeviceName; | |||
| jassert (hasScanned); // need to call scanForDevices() before doing this | |||
| @@ -104,7 +104,7 @@ static bool parseFile (const File& rootFolder, | |||
| StringArray lines; | |||
| lines.addLines (content); | |||
| while (lines[0].trim().isEmpty()) | |||
| while (lines.size() > 0 && lines[0].trim().isEmpty()) | |||
| lines.remove (0); | |||
| for (int i = 0; i < lines.size(); ++i) | |||
| @@ -252,13 +252,13 @@ public: | |||
| : source (source_) | |||
| { | |||
| source->AddRef(); | |||
| DBG ("num IDispatch wrapper objs: " + String (++numDOWID)); | |||
| log ("num IDispatch wrapper objs: " + String (++numDOWID)); | |||
| } | |||
| ~DynamicObjectWrappingIDispatch() | |||
| { | |||
| source->Release(); | |||
| DBG ("num IDispatch wrapper objs: " + String (--numDOWID)); | |||
| log ("num IDispatch wrapper objs: " + String (--numDOWID)); | |||
| } | |||
| const var getProperty (const var::identifier& propertyName) const | |||
| @@ -20438,8 +20438,8 @@ public: | |||
| { | |||
| for (int i = numThisTime; --i >= 0;) | |||
| { | |||
| *left++ = (int) swapIfBigEndian ((unsigned short) *src++) << 16; | |||
| ++src; | |||
| *left++ = ((int) swapIfBigEndian ((unsigned short) *src++) | |||
| + (int) swapIfBigEndian ((unsigned short) *src++)) << 15; | |||
| } | |||
| } | |||
| else | |||
| @@ -20477,7 +20477,7 @@ public: | |||
| { | |||
| for (int i = numThisTime; --i >= 0;) | |||
| { | |||
| *left++ = littleEndian24Bit (src) << 8; | |||
| *left++ = (littleEndian24Bit (src) + littleEndian24Bit (src + 3)) << 7; | |||
| src += 6; | |||
| } | |||
| } | |||
| @@ -20521,8 +20521,8 @@ public: | |||
| { | |||
| for (int i = numThisTime; --i >= 0;) | |||
| { | |||
| *l++ = swapIfBigEndian (*src++); | |||
| ++src; | |||
| *l++ = (swapIfBigEndian (*src++) >> 1) | |||
| + (swapIfBigEndian (*src++) >> 1); | |||
| } | |||
| } | |||
| else | |||
| @@ -32839,7 +32839,7 @@ static VstIntPtr VSTCALLBACK audioMaster (AEffect* effect, VstInt32 opcode, VstI | |||
| const String VSTPluginInstance::getVersion() const throw() | |||
| { | |||
| int v = dispatch (effGetVendorVersion, 0, 0, 0, 0); | |||
| unsigned int v = dispatch (effGetVendorVersion, 0, 0, 0, 0); | |||
| String s; | |||
| @@ -32849,7 +32849,7 @@ const String VSTPluginInstance::getVersion() const throw() | |||
| if (v != 0) | |||
| { | |||
| int versionBits[4]; | |||
| int n = 0; | |||
| unsigned int n = 0; | |||
| while (v != 0) | |||
| { | |||
| @@ -60538,6 +60538,9 @@ bool Viewport::useMouseWheelMoveIfNeeded (const MouseEvent& e, float wheelIncrem | |||
| if (hasHorzBar && (wheelIncrementX != 0 || e.mods.isShiftDown() || ! hasVertBar)) | |||
| { | |||
| if (wheelIncrementX == 0 && ! hasVertBar) | |||
| wheelIncrementX = wheelIncrementY; | |||
| horizontalScrollBar->mouseWheelMove (e.getEventRelativeTo (horizontalScrollBar), | |||
| wheelIncrementX, wheelIncrementY); | |||
| return true; | |||
| @@ -253468,7 +253471,7 @@ public: | |||
| AudioIODevice* createDevice (const String& outputDeviceName, | |||
| const String& inputDeviceName) | |||
| { | |||
| jassert (inputDeviceName == outputDeviceName); | |||
| jassert (inputDeviceName == outputDeviceName || outputDeviceName.isEmpty() || inputDeviceName.isEmpty()); | |||
| (void) inputDeviceName; | |||
| jassert (hasScanned); // need to call scanForDevices() before doing this | |||
| @@ -258116,7 +258119,7 @@ public: | |||
| if (outputChannels.getHighestBit() >= 0) | |||
| { | |||
| for (int i = 0; i <= outputChannels.getHighestBit(); ++i) | |||
| for (int i = 0; i <= jmax (outputChannels.getHighestBit(), minChansOut); ++i) | |||
| { | |||
| outputChannelData [i] = (float*) juce_calloc (sizeof (float) * bufferSize); | |||
| @@ -258139,7 +258142,7 @@ public: | |||
| return; | |||
| } | |||
| currentOutputChans.setRange (0, minChansIn, true); | |||
| currentOutputChans.setRange (0, minChansOut, true); | |||
| if (! outputDevice->setParameters ((unsigned int) sampleRate, | |||
| jlimit ((int) minChansOut, (int) maxChansOut, currentOutputChans.getHighestBit() + 1), | |||
| @@ -262088,28 +262091,27 @@ public: | |||
| ww = jmax (1, w); | |||
| wh = jmax (1, h); | |||
| if (! mapped) | |||
| { | |||
| // Make sure the Window manager does what we want | |||
| XSizeHints* hints = XAllocSizeHints(); | |||
| hints->flags = USSize | USPosition; | |||
| hints->width = ww; | |||
| hints->height = wh; | |||
| hints->x = wx; | |||
| hints->y = wy; | |||
| // Make sure the Window manager does what we want | |||
| XSizeHints* hints = XAllocSizeHints(); | |||
| hints->flags = USSize | USPosition; | |||
| hints->width = ww; | |||
| hints->height = wh; | |||
| hints->x = wx; | |||
| hints->y = wy; | |||
| if ((getStyleFlags() & (windowHasTitleBar | windowIsResizable)) == windowHasTitleBar) | |||
| { | |||
| hints->min_width = hints->max_width = hints->width; | |||
| hints->min_height = hints->max_height = hints->height; | |||
| hints->flags |= PMinSize | PMaxSize; | |||
| } | |||
| XSetWMNormalHints (display, windowH, hints); | |||
| XFree (hints); | |||
| if ((getStyleFlags() & (windowHasTitleBar | windowIsResizable)) == windowHasTitleBar) | |||
| { | |||
| hints->min_width = hints->max_width = hints->width; | |||
| hints->min_height = hints->max_height = hints->height; | |||
| hints->flags |= PMinSize | PMaxSize; | |||
| } | |||
| XMoveResizeWindow (display, windowH, wx, wy, ww, wh); | |||
| XSetWMNormalHints (display, windowH, hints); | |||
| XFree (hints); | |||
| XMoveResizeWindow (display, windowH, | |||
| wx - windowBorder.getLeft(), | |||
| wy - windowBorder.getTop(), ww, wh); | |||
| if (! deletionChecker.hasBeenDeleted()) | |||
| { | |||
| @@ -263232,16 +263234,23 @@ private: | |||
| if (hints != None) | |||
| { | |||
| long netHints [2]; | |||
| netHints[0] = XInternAtom (display, "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE", True); | |||
| int netHints [2]; | |||
| int numHints = 0; | |||
| netHints[numHints] = XInternAtom (display, "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE", True); | |||
| if (netHints [numHints] != 0) | |||
| ++numHints; | |||
| if ((styleFlags & windowIsTemporary) != 0) | |||
| netHints[1] = XInternAtom (display, "_NET_WM_WINDOW_TYPE_MENU", True); | |||
| netHints [numHints] = XInternAtom (display, "_NET_WM_WINDOW_TYPE_MENU", True); | |||
| else | |||
| netHints[1] = XInternAtom (display, "_NET_WM_WINDOW_TYPE_NORMAL", True); | |||
| netHints [numHints] = XInternAtom (display, "_NET_WM_WINDOW_TYPE_NORMAL", True); | |||
| if (netHints [numHints] != 0) | |||
| ++numHints; | |||
| XChangeProperty (display, wndH, hints, XA_ATOM, 32, PropModeReplace, | |||
| (unsigned char*) &netHints, 2); | |||
| (unsigned char*) &netHints, numHints); | |||
| } | |||
| } | |||
| @@ -263296,7 +263305,7 @@ private: | |||
| if (hints != None) | |||
| { | |||
| long netHints [6]; | |||
| int netHints [6]; | |||
| int num = 0; | |||
| netHints [num++] = XInternAtom (display, "_NET_WM_ACTION_RESIZE", (styleFlags & windowIsResizable) ? True : False); | |||
| @@ -263849,8 +263858,8 @@ private: | |||
| Atom XA_OtherMime, dragAndDropCurrentMimeType; | |||
| Window dragAndDropSourceWindow; | |||
| unsigned long allowedActions [5]; | |||
| unsigned long allowedMimeTypeAtoms [3]; | |||
| unsigned int allowedActions [5]; | |||
| unsigned int allowedMimeTypeAtoms [3]; | |||
| Array <Atom> srcMimeTypeAtomList; | |||
| }; | |||
| @@ -327,8 +327,8 @@ public: | |||
| { | |||
| for (int i = numThisTime; --i >= 0;) | |||
| { | |||
| *left++ = (int) swapIfBigEndian ((unsigned short) *src++) << 16; | |||
| ++src; | |||
| *left++ = ((int) swapIfBigEndian ((unsigned short) *src++) | |||
| + (int) swapIfBigEndian ((unsigned short) *src++)) << 15; | |||
| } | |||
| } | |||
| else | |||
| @@ -366,7 +366,7 @@ public: | |||
| { | |||
| for (int i = numThisTime; --i >= 0;) | |||
| { | |||
| *left++ = littleEndian24Bit (src) << 8; | |||
| *left++ = (littleEndian24Bit (src) + littleEndian24Bit (src + 3)) << 7; | |||
| src += 6; | |||
| } | |||
| } | |||
| @@ -410,8 +410,8 @@ public: | |||
| { | |||
| for (int i = numThisTime; --i >= 0;) | |||
| { | |||
| *l++ = swapIfBigEndian (*src++); | |||
| ++src; | |||
| *l++ = (swapIfBigEndian (*src++) >> 1) | |||
| + (swapIfBigEndian (*src++) >> 1); | |||
| } | |||
| } | |||
| else | |||
| @@ -2443,7 +2443,7 @@ static VstIntPtr VSTCALLBACK audioMaster (AEffect* effect, VstInt32 opcode, VstI | |||
| //============================================================================== | |||
| const String VSTPluginInstance::getVersion() const throw() | |||
| { | |||
| int v = dispatch (effGetVendorVersion, 0, 0, 0, 0); | |||
| unsigned int v = dispatch (effGetVendorVersion, 0, 0, 0, 0); | |||
| String s; | |||
| @@ -291,6 +291,9 @@ bool Viewport::useMouseWheelMoveIfNeeded (const MouseEvent& e, float wheelIncrem | |||
| if (hasHorzBar && (wheelIncrementX != 0 || e.mods.isShiftDown() || ! hasVertBar)) | |||
| { | |||
| if (wheelIncrementX == 0 && ! hasVertBar) | |||
| wheelIncrementX = wheelIncrementY; | |||
| horizontalScrollBar->mouseWheelMove (e.getEventRelativeTo (horizontalScrollBar), | |||
| wheelIncrementX, wheelIncrementY); | |||
| return true; | |||