mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-11 23:54:18 +00:00
Small fix to ALSA audio; small fix for Linux window border sizes; fix to stop win32 incorrectly making windows always-on-top; added a constructor for MidiBuffer.
This commit is contained in:
parent
a7a5e8079f
commit
829f0c8dde
7 changed files with 74 additions and 26 deletions
|
|
@ -395,8 +395,8 @@ public:
|
|||
close();
|
||||
}
|
||||
|
||||
void open (const BitArray& inputChannels,
|
||||
const BitArray& outputChannels,
|
||||
void open (BitArray inputChannels,
|
||||
BitArray outputChannels,
|
||||
const double sampleRate_,
|
||||
const int bufferSize_)
|
||||
{
|
||||
|
|
@ -447,6 +447,8 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
currentOutputChans.setRange (0, minChansIn, true);
|
||||
|
||||
if (! outputDevice->setParameters ((unsigned int) sampleRate,
|
||||
jlimit ((int) minChansOut, (int) maxChansOut, currentOutputChans.getHighestBit() + 1),
|
||||
bufferSize))
|
||||
|
|
@ -468,6 +470,8 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
currentInputChans.setRange (0, minChansIn, true);
|
||||
|
||||
if (! inputDevice->setParameters ((unsigned int) sampleRate,
|
||||
jlimit ((int) minChansIn, (int) maxChansIn, currentInputChans.getHighestBit() + 1),
|
||||
bufferSize))
|
||||
|
|
|
|||
|
|
@ -817,19 +817,23 @@ public:
|
|||
// Make sure the Window manager does what we want
|
||||
XSizeHints* hints = XAllocSizeHints();
|
||||
hints->flags = USSize | USPosition;
|
||||
hints->width = ww + windowBorder.getLeftAndRight();
|
||||
hints->height = wh + windowBorder.getTopAndBottom();
|
||||
hints->x = wx - windowBorder.getLeft();
|
||||
hints->y = wy - windowBorder.getTop();
|
||||
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);
|
||||
}
|
||||
|
||||
XMoveResizeWindow (display, windowH,
|
||||
wx - windowBorder.getLeft(),
|
||||
wy - windowBorder.getTop(),
|
||||
ww + windowBorder.getLeftAndRight(),
|
||||
wh + windowBorder.getTopAndBottom());
|
||||
XMoveResizeWindow (display, windowH, wx, wy, ww, wh);
|
||||
|
||||
if (! deletionChecker.hasBeenDeleted())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -760,8 +760,14 @@ public:
|
|||
{
|
||||
setMinimised (false);
|
||||
|
||||
SetWindowPos (hwnd, otherPeer->hwnd, 0, 0, 0, 0,
|
||||
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING);
|
||||
// must be careful not to try to put a topmost window behind a normal one, or win32
|
||||
// promotes the normal one to be topmost!
|
||||
if (getComponent()->isAlwaysOnTop() == otherPeer->getComponent()->isAlwaysOnTop())
|
||||
SetWindowPos (hwnd, otherPeer->hwnd, 0, 0, 0, 0,
|
||||
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING);
|
||||
else if (otherPeer->getComponent()->isAlwaysOnTop())
|
||||
SetWindowPos (hwnd, HWND_TOP, 0, 0, 0, 0,
|
||||
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25024,6 +25024,13 @@ MidiBuffer::MidiBuffer() throw()
|
|||
{
|
||||
}
|
||||
|
||||
MidiBuffer::MidiBuffer (const MidiMessage& message) throw()
|
||||
: ArrayAllocationBase <uint8> (32),
|
||||
bytesUsed (0)
|
||||
{
|
||||
addEvent (message, 0);
|
||||
}
|
||||
|
||||
MidiBuffer::MidiBuffer (const MidiBuffer& other) throw()
|
||||
: ArrayAllocationBase <uint8> (32),
|
||||
bytesUsed (other.bytesUsed)
|
||||
|
|
@ -243801,8 +243808,14 @@ public:
|
|||
{
|
||||
setMinimised (false);
|
||||
|
||||
SetWindowPos (hwnd, otherPeer->hwnd, 0, 0, 0, 0,
|
||||
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING);
|
||||
// must be careful not to try to put a topmost window behind a normal one, or win32
|
||||
// promotes the normal one to be topmost!
|
||||
if (getComponent()->isAlwaysOnTop() == otherPeer->getComponent()->isAlwaysOnTop())
|
||||
SetWindowPos (hwnd, otherPeer->hwnd, 0, 0, 0, 0,
|
||||
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING);
|
||||
else if (otherPeer->getComponent()->isAlwaysOnTop())
|
||||
SetWindowPos (hwnd, HWND_TOP, 0, 0, 0, 0,
|
||||
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -258057,8 +258070,8 @@ public:
|
|||
close();
|
||||
}
|
||||
|
||||
void open (const BitArray& inputChannels,
|
||||
const BitArray& outputChannels,
|
||||
void open (BitArray inputChannels,
|
||||
BitArray outputChannels,
|
||||
const double sampleRate_,
|
||||
const int bufferSize_)
|
||||
{
|
||||
|
|
@ -258109,6 +258122,8 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
currentOutputChans.setRange (0, minChansIn, true);
|
||||
|
||||
if (! outputDevice->setParameters ((unsigned int) sampleRate,
|
||||
jlimit ((int) minChansOut, (int) maxChansOut, currentOutputChans.getHighestBit() + 1),
|
||||
bufferSize))
|
||||
|
|
@ -258130,6 +258145,8 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
currentInputChans.setRange (0, minChansIn, true);
|
||||
|
||||
if (! inputDevice->setParameters ((unsigned int) sampleRate,
|
||||
jlimit ((int) minChansIn, (int) maxChansIn, currentInputChans.getHighestBit() + 1),
|
||||
bufferSize))
|
||||
|
|
@ -262059,19 +262076,23 @@ public:
|
|||
// Make sure the Window manager does what we want
|
||||
XSizeHints* hints = XAllocSizeHints();
|
||||
hints->flags = USSize | USPosition;
|
||||
hints->width = ww + windowBorder.getLeftAndRight();
|
||||
hints->height = wh + windowBorder.getTopAndBottom();
|
||||
hints->x = wx - windowBorder.getLeft();
|
||||
hints->y = wy - windowBorder.getTop();
|
||||
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);
|
||||
}
|
||||
|
||||
XMoveResizeWindow (display, windowH,
|
||||
wx - windowBorder.getLeft(),
|
||||
wy - windowBorder.getTop(),
|
||||
ww + windowBorder.getLeftAndRight(),
|
||||
wh + windowBorder.getTopAndBottom());
|
||||
XMoveResizeWindow (display, windowH, wx, wy, ww, wh);
|
||||
|
||||
if (! deletionChecker.hasBeenDeleted())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -25955,6 +25955,9 @@ public:
|
|||
/** Creates an empty MidiBuffer. */
|
||||
MidiBuffer() throw();
|
||||
|
||||
/** Creates a MidiBuffer containing a single midi message. */
|
||||
MidiBuffer (const MidiMessage& message) throw();
|
||||
|
||||
/** Creates a copy of another MidiBuffer. */
|
||||
MidiBuffer (const MidiBuffer& other) throw();
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,13 @@ MidiBuffer::MidiBuffer() throw()
|
|||
{
|
||||
}
|
||||
|
||||
MidiBuffer::MidiBuffer (const MidiMessage& message) throw()
|
||||
: ArrayAllocationBase <uint8> (32),
|
||||
bytesUsed (0)
|
||||
{
|
||||
addEvent (message, 0);
|
||||
}
|
||||
|
||||
MidiBuffer::MidiBuffer (const MidiBuffer& other) throw()
|
||||
: ArrayAllocationBase <uint8> (32),
|
||||
bytesUsed (other.bytesUsed)
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@ public:
|
|||
//==============================================================================
|
||||
/** Creates an empty MidiBuffer. */
|
||||
MidiBuffer() throw();
|
||||
|
||||
/** Creates a MidiBuffer containing a single midi message. */
|
||||
MidiBuffer (const MidiMessage& message) throw();
|
||||
|
||||
/** Creates a copy of another MidiBuffer. */
|
||||
MidiBuffer (const MidiBuffer& other) throw();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue