1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-29 02:40:05 +00:00

Fix for some broken Apple AudioUnit editors. Fix for amalgamated mac builds. Changed some mac debugging settings which didn't work. Updated the Jucer-generated audio plugins to match the current codebase.

This commit is contained in:
Julian Storer 2010-10-14 14:17:10 +01:00
parent e9bff5db5b
commit 91e2759000
22 changed files with 144 additions and 54 deletions

View file

@ -1895,7 +1895,7 @@
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "jucedebug"; }; name = Debug; };
71190EFA58D0942581B5F1AD = { isa = XCBuildConfiguration; buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@ -1910,7 +1910,7 @@
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "juce"; }; name = Release; };
3A1CB6B5ECF4A79CDE35CC66 = { isa = XCConfigurationList; buildConfigurations = (
8E935B9E7F2982A06CD7EF99,

View file

@ -1895,7 +1895,7 @@
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "jucedebug"; }; name = Debug; };
71190EFA58D0942581B5F1AD = { isa = XCBuildConfiguration; buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@ -1910,7 +1910,7 @@
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "juce"; }; name = Release; };
3A1CB6B5ECF4A79CDE35CC66 = { isa = XCConfigurationList; buildConfigurations = (
8E935B9E7F2982A06CD7EF99,

View file

@ -387,6 +387,13 @@
//==============================================================================
#if JUCE_BUILD_NATIVE
// Non-public headers that are needed by more than one platform must be included
// before the platform-specific sections..
BEGIN_JUCE_NAMESPACE
#include "../src/native/common/juce_MidiDataConcatenator.h"
END_JUCE_NAMESPACE
#if JUCE_WINDOWS
#include "../src/native/juce_win32_NativeCode.cpp"
#endif

View file

@ -283,7 +283,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "Jucer"; }; name = Debug; };
4C681DED23FC5056A83C964C = { isa = XCBuildConfiguration; buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@ -297,7 +297,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "Jucer"; }; name = Release; };
045AC698C60073CCF5CC6116 = { isa = XCConfigurationList; buildConfigurations = (
69D26A715A354ED1735D8438,

View file

@ -525,6 +525,11 @@ static const unsigned char temp_891b85da[] =
"}\r\n"
"\r\n"
"//==============================================================================\r\n"
"bool FILTERCLASSNAME::hasEditor() const\r\n"
"{\r\n"
" return true; // (change this to false if you choose to not supply an editor)\r\n"
"}\r\n"
"\r\n"
"AudioProcessorEditor* FILTERCLASSNAME::createEditor()\r\n"
"{\r\n"
" return new EDITORCLASSNAME (this);\r\n"
@ -589,6 +594,7 @@ static const unsigned char temp_356ba65f[] =
"\r\n"
" //==============================================================================\r\n"
" AudioProcessorEditor* createEditor();\r\n"
" bool hasEditor() const;\r\n"
"\r\n"
" //==============================================================================\r\n"
" const String getName() const;\r\n"

View file

@ -20,10 +20,10 @@ namespace BinaryData
const int jucer_AudioPluginEditorTemplate_hSize = 794;
extern const char* jucer_AudioPluginFilterTemplate_cpp;
const int jucer_AudioPluginFilterTemplate_cppSize = 4349;
const int jucer_AudioPluginFilterTemplate_cppSize = 4480;
extern const char* jucer_AudioPluginFilterTemplate_h;
const int jucer_AudioPluginFilterTemplate_hSize = 2353;
const int jucer_AudioPluginFilterTemplate_hSize = 2382;
extern const char* jucer_MainConsoleAppTemplate_cpp;
const int jucer_MainConsoleAppTemplate_cppSize = 749;

View file

@ -145,6 +145,11 @@ void FILTERCLASSNAME::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiM
}
//==============================================================================
bool FILTERCLASSNAME::hasEditor() const
{
return true; // (change this to false if you choose to not supply an editor)
}
AudioProcessorEditor* FILTERCLASSNAME::createEditor()
{
return new EDITORCLASSNAME (this);

View file

@ -32,6 +32,7 @@ public:
//==============================================================================
AudioProcessorEditor* createEditor();
bool hasEditor() const;
//==============================================================================
const String getName() const;

View file

@ -102,7 +102,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "amalgamator"; }; name = Debug; };
322333C2238617224CAE5D89 = { isa = XCBuildConfiguration; buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@ -116,7 +116,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "amalgamator"; }; name = Release; };
FA25EC7DB69A3A88993F2853 = { isa = XCConfigurationList; buildConfigurations = (
4EAD81574ACF05AC27D04B76,

View file

@ -141,7 +141,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "Plugin Host"; }; name = Debug; };
74C9869781487FF560C4590D = { isa = XCBuildConfiguration; buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@ -155,7 +155,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "Plugin Host"; }; name = Release; };
3DBB3F42145D936BBD5425D7 = { isa = XCConfigurationList; buildConfigurations = (
8133D32BA8816D704BF648FA,

View file

@ -285,7 +285,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "JuceDemoPlugin"; }; name = Debug; };
D9F9CC7EC1952477F7915D84 = { isa = XCBuildConfiguration; buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@ -299,7 +299,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "JuceDemoPlugin"; }; name = Release; };
91EB753864A948DE4421285E = { isa = XCConfigurationList; buildConfigurations = (
F6631902F8DE12E2C2C34B71,

View file

@ -102,7 +102,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "BinaryBuilder"; }; name = Debug; };
B911917EBAEE875AC65A0C2B = { isa = XCBuildConfiguration; buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@ -116,7 +116,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "BinaryBuilder"; }; name = Release; };
71143A294DF2ABC013DAD8F4 = { isa = XCConfigurationList; buildConfigurations = (
C69BDE02D12775D4A17BFA17,

View file

@ -120,7 +120,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "HelloWorld"; }; name = Debug; };
0F295119837F2D1BC9387794 = { isa = XCBuildConfiguration; buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@ -134,7 +134,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "HelloWorld"; }; name = Release; };
C71BF9C42683418116C8426E = { isa = XCConfigurationList; buildConfigurations = (
1C939EADBAB81B95A46A6581,

View file

@ -105,7 +105,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "HelloWorld"; }; name = Debug; };
0F295119837F2D1BC9387794 = { isa = XCBuildConfiguration; buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@ -119,7 +119,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "HelloWorld"; }; name = Release; };
C71BF9C42683418116C8426E = { isa = XCConfigurationList; buildConfigurations = (
1C939EADBAB81B95A46A6581,

View file

@ -219,7 +219,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "JuceDemo"; }; name = Debug; };
623F392572A48BDD48CE1CC4 = { isa = XCBuildConfiguration; buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@ -233,7 +233,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "JuceDemo"; }; name = Release; };
2B22E1D006C8AF43954EE79D = { isa = XCConfigurationList; buildConfigurations = (
7FA986B99AFC795723E00AB0,

View file

@ -204,7 +204,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "JuceDemo"; }; name = Debug; };
623F392572A48BDD48CE1CC4 = { isa = XCBuildConfiguration; buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@ -218,7 +218,7 @@
GCC_MODEL_TUNING = G5;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
ZERO_LINK = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEBUG_INFORMATION_FORMAT = "dwarf";
PRODUCT_NAME = "JuceDemo"; }; name = Release; };
2B22E1D006C8AF43954EE79D = { isa = XCConfigurationList; buildConfigurations = (
7FA986B99AFC795723E00AB0,

View file

@ -620,7 +620,6 @@
*/
#import <QTOLibrary.dll>
#import <QTOControl.dll>
#endif
#if JUCE_MSVC
@ -32010,7 +32009,8 @@ OSStatus AudioUnitPluginInstance::getTransportState (Boolean* outIsPlaying,
return noErr;
}
class AudioUnitPluginWindowCocoa : public AudioProcessorEditor
class AudioUnitPluginWindowCocoa : public AudioProcessorEditor,
public Timer
{
public:
AudioUnitPluginWindowCocoa (AudioUnitPluginInstance& plugin_, const bool createGenericViewIfNeeded)
@ -32048,6 +32048,18 @@ public:
wrapper.setSize (getWidth(), getHeight());
}
void timerCallback()
{
wrapper.resizeToFitView();
startTimer (jmin (713, getTimerInterval() + 51));
}
void childBoundsChanged (Component* child)
{
setSize (wrapper.getWidth(), wrapper.getHeight());
startTimer (70);
}
private:
AudioUnitPluginInstance& plugin;
NSViewComponent wrapper;
@ -32088,10 +32100,9 @@ private:
}
for (int i = (dataSize - sizeof (CFURLRef)) / sizeof (CFStringRef); --i >= 0;)
{
CFRelease (info->mCocoaAUViewClass[i]);
CFRelease (info->mCocoaAUViewBundleLocation);
}
CFRelease (info->mCocoaAUViewBundleLocation);
}
}
@ -32101,8 +32112,10 @@ private:
wrapper.setView (pluginView);
if (pluginView != 0)
setSize ([pluginView frame].size.width,
[pluginView frame].size.height);
{
timerCallback();
startTimer (70);
}
return pluginView != 0;
}
@ -237563,20 +237576,10 @@ END_JUCE_NAMESPACE
//==============================================================================
#if JUCE_BUILD_NATIVE
#if JUCE_WINDOWS
/*** Start of inlined file: juce_win32_NativeCode.cpp ***/
/*
This file wraps together all the win32-specific code, so that
we can include all the native headers just once, and compile all our
platform-specific stuff in one big lump, keeping it out of the way of
the rest of the codebase.
*/
#if JUCE_WINDOWS
BEGIN_JUCE_NAMESPACE
// Non-public headers that are needed by more than one platform must be included
// before the platform-specific sections..
BEGIN_JUCE_NAMESPACE
/*** Start of inlined file: juce_MidiDataConcatenator.h ***/
#ifndef __JUCE_MIDIDATACONCATENATOR_JUCEHEADER__
@ -237698,6 +237701,23 @@ private:
#endif // __JUCE_MIDIDATACONCATENATOR_JUCEHEADER__
/*** End of inlined file: juce_MidiDataConcatenator.h ***/
END_JUCE_NAMESPACE
#if JUCE_WINDOWS
/*** Start of inlined file: juce_win32_NativeCode.cpp ***/
/*
This file wraps together all the win32-specific code, so that
we can include all the native headers just once, and compile all our
platform-specific stuff in one big lump, keeping it out of the way of
the rest of the codebase.
*/
#if JUCE_WINDOWS
BEGIN_JUCE_NAMESPACE
#define JUCE_INCLUDED_FILE 1
// Now include the actual code files..
@ -273916,7 +273936,10 @@ public:
if (currentPeer != peer)
{
[view removeFromSuperview];
if ([view superview] != nil)
[view removeFromSuperview]; // Must be careful not to call this unless it's required - e.g. some Apple AU views
// override the call and use it as a sign that they're being deleted, which breaks everything..
currentPeer = peer;
if (peer != 0)
@ -273934,6 +273957,12 @@ public:
componentPeerChanged();
}
const Rectangle<int> getViewBounds() const
{
NSRect r = [view frame];
return Rectangle<int> (0, 0, (int) r.size.width, (int) r.size.height);
}
juce_UseDebuggingNewOperator
private:
@ -273965,6 +273994,12 @@ void* NSViewComponent::getView() const
return info == 0 ? 0 : info->view;
}
void NSViewComponent::resizeToFitView()
{
if (info != 0)
setBounds (info->getViewBounds());
}
void NSViewComponent::paint (Graphics&)
{
}

View file

@ -64,7 +64,7 @@
*/
#define JUCE_MAJOR_VERSION 1
#define JUCE_MINOR_VERSION 52
#define JUCE_BUILDNUMBER 76
#define JUCE_BUILDNUMBER 77
/** Current Juce version number.
@ -57941,6 +57941,9 @@ public:
*/
void* getView() const;
/** Resizes this component to fit the view that it contains. */
void resizeToFitView();
/** @internal */
void paint (Graphics& g);

View file

@ -886,7 +886,8 @@ OSStatus AudioUnitPluginInstance::getTransportState (Boolean* outIsPlaying,
//==============================================================================
class AudioUnitPluginWindowCocoa : public AudioProcessorEditor
class AudioUnitPluginWindowCocoa : public AudioProcessorEditor,
public Timer
{
public:
AudioUnitPluginWindowCocoa (AudioUnitPluginInstance& plugin_, const bool createGenericViewIfNeeded)
@ -924,6 +925,18 @@ public:
wrapper.setSize (getWidth(), getHeight());
}
void timerCallback()
{
wrapper.resizeToFitView();
startTimer (jmin (713, getTimerInterval() + 51));
}
void childBoundsChanged (Component* child)
{
setSize (wrapper.getWidth(), wrapper.getHeight());
startTimer (70);
}
private:
AudioUnitPluginInstance& plugin;
NSViewComponent wrapper;
@ -964,10 +977,9 @@ private:
}
for (int i = (dataSize - sizeof (CFURLRef)) / sizeof (CFStringRef); --i >= 0;)
{
CFRelease (info->mCocoaAUViewClass[i]);
CFRelease (info->mCocoaAUViewBundleLocation);
}
CFRelease (info->mCocoaAUViewBundleLocation);
}
}
@ -977,8 +989,10 @@ private:
wrapper.setView (pluginView);
if (pluginView != 0)
setSize ([pluginView frame].size.width,
[pluginView frame].size.height);
{
timerCallback();
startTimer (70);
}
return pluginView != 0;
}

View file

@ -33,7 +33,7 @@
*/
#define JUCE_MAJOR_VERSION 1
#define JUCE_MINOR_VERSION 52
#define JUCE_BUILDNUMBER 76
#define JUCE_BUILDNUMBER 77
/** Current Juce version number.

View file

@ -71,6 +71,10 @@ public:
*/
void* getView() const;
/** Resizes this component to fit the view that it contains. */
void resizeToFitView();
//==============================================================================
/** @internal */
void paint (Graphics& g);

View file

@ -91,7 +91,10 @@ public:
if (currentPeer != peer)
{
[view removeFromSuperview];
if ([view superview] != nil)
[view removeFromSuperview]; // Must be careful not to call this unless it's required - e.g. some Apple AU views
// override the call and use it as a sign that they're being deleted, which breaks everything..
currentPeer = peer;
if (peer != 0)
@ -109,6 +112,12 @@ public:
componentPeerChanged();
}
const Rectangle<int> getViewBounds() const
{
NSRect r = [view frame];
return Rectangle<int> (0, 0, (int) r.size.width, (int) r.size.height);
}
juce_UseDebuggingNewOperator
private:
@ -141,6 +150,12 @@ void* NSViewComponent::getView() const
return info == 0 ? 0 : info->view;
}
void NSViewComponent::resizeToFitView()
{
if (info != 0)
setBounds (info->getViewBounds());
}
void NSViewComponent::paint (Graphics&)
{
}