mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Made sure that audio device block sizes are multiples of 16.
This commit is contained in:
parent
298749cc62
commit
8c864ceb9e
3 changed files with 11 additions and 3 deletions
|
|
@ -214,7 +214,7 @@ public:
|
|||
|
||||
if (OK (AudioObjectGetPropertyData (deviceID, &pa, 0, 0, &size, ranges)))
|
||||
{
|
||||
bufferSizes.add ((int) ranges[0].mMinimum);
|
||||
bufferSizes.add ((int) (ranges[0].mMinimum + 15) & ~15);
|
||||
|
||||
for (int i = 32; i < 2048; i += 32)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1056,9 +1056,9 @@ private:
|
|||
|
||||
if (granularity >= 0)
|
||||
{
|
||||
granularity = jmax (1, (int) granularity);
|
||||
granularity = jmax (16, (int) granularity);
|
||||
|
||||
for (int i = jmax ((int) minSize, (int) granularity); i < jmin (6400, (int) maxSize); i += granularity)
|
||||
for (int i = jmax ((int) (minSize + 15) & ~15, (int) granularity); i < jmin (6400, (int) maxSize); i += granularity)
|
||||
bufferSizes.addIfNotAlreadyThere (granularity * (i / granularity));
|
||||
}
|
||||
else if (granularity < 0)
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ public:
|
|||
[item setTag: tag];
|
||||
|
||||
NSMenu* sub = createMenu (child, name, menuId, tag);
|
||||
appendRecentFilesIfNeeded (name, sub);
|
||||
|
||||
[parent setSubmenu: sub forItem: item];
|
||||
[sub setAutoenablesItems: false];
|
||||
|
|
@ -112,6 +113,8 @@ public:
|
|||
for (PopupMenu::MenuItemIterator iter (menuToCopy); iter.next();)
|
||||
addMenuItem (iter, menu, menuId, tag);
|
||||
|
||||
appendRecentFilesIfNeeded (name, menu);
|
||||
|
||||
[menu setAutoenablesItems: false];
|
||||
[menu update];
|
||||
[parentItem setTag: tag];
|
||||
|
|
@ -269,6 +272,10 @@ public:
|
|||
NSObject* callback;
|
||||
|
||||
private:
|
||||
static void appendRecentFilesIfNeeded (const String& menuName, NSMenu* menu)
|
||||
{
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
NSMenu* createMenu (const PopupMenu menu,
|
||||
const String& menuName,
|
||||
|
|
@ -288,6 +295,7 @@ private:
|
|||
for (PopupMenu::MenuItemIterator iter (menu); iter.next();)
|
||||
addMenuItem (iter, m, topLevelMenuId, topLevelIndex);
|
||||
|
||||
appendRecentFilesIfNeeded (menuName, m);
|
||||
[m update];
|
||||
return m;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue