@@ -200,9 +200,15 @@ public: | |||
} | |||
else if (inID == kAudioUnitProperty_CocoaUI) | |||
{ | |||
outDataSize = sizeof (AudioUnitCocoaViewInfo); | |||
outWritable = true; | |||
return noErr; | |||
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 | |||
// (On 10.4, there's a random obj-c dispatching crash when trying to load a cocoa UI) | |||
if (PlatformUtilities::getOSXMinorVersionNumber() > 4) | |||
#endif | |||
{ | |||
outDataSize = sizeof (AudioUnitCocoaViewInfo); | |||
outWritable = true; | |||
return noErr; | |||
} | |||
} | |||
} | |||
@@ -234,18 +240,24 @@ public: | |||
} | |||
else if (inID == kAudioUnitProperty_CocoaUI) | |||
{ | |||
const ScopedAutoReleasePool pool; | |||
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 | |||
// (On 10.4, there's a random obj-c dispatching crash when trying to load a cocoa UI) | |||
if (PlatformUtilities::getOSXMinorVersionNumber() > 4) | |||
#endif | |||
{ | |||
const ScopedAutoReleasePool pool; | |||
AudioUnitCocoaViewInfo* info = (AudioUnitCocoaViewInfo*) outData; | |||
AudioUnitCocoaViewInfo* info = (AudioUnitCocoaViewInfo*) outData; | |||
const File bundleFile (File::getSpecialLocation (File::currentApplicationFile)); | |||
NSString* bundlePath = [NSString stringWithUTF8String: (const char*) bundleFile.getFullPathName().toUTF8()]; | |||
NSBundle* b = [NSBundle bundleWithPath: bundlePath]; | |||
const File bundleFile (File::getSpecialLocation (File::currentApplicationFile)); | |||
NSString* bundlePath = [NSString stringWithUTF8String: (const char*) bundleFile.getFullPathName().toUTF8()]; | |||
NSBundle* b = [NSBundle bundleWithPath: bundlePath]; | |||
info->mCocoaAUViewClass[0] = (CFStringRef) [[[JuceUICreationClass class] className] retain]; | |||
info->mCocoaAUViewBundleLocation = (CFURLRef) [[NSURL fileURLWithPath: [b bundlePath]] retain]; | |||
info->mCocoaAUViewClass[0] = (CFStringRef) [[[JuceUICreationClass class] className] retain]; | |||
info->mCocoaAUViewBundleLocation = (CFURLRef) [[NSURL fileURLWithPath: [b bundlePath]] retain]; | |||
return noErr; | |||
return noErr; | |||
} | |||
} | |||
} | |||
@@ -136,13 +136,20 @@ | |||
#endif | |||
//============================================================================= | |||
/** This flag lets you enable support for CD-burning. You might want to disable | |||
/** This flag lets you enable the AudioCDBurner class. You might want to disable | |||
it to build without the MS SDK under windows. | |||
*/ | |||
#if (! defined (JUCE_USE_CDBURNER)) && ! (JUCE_WINDOWS && ! JUCE_MSVC) | |||
#define JUCE_USE_CDBURNER 1 | |||
#endif | |||
/** This flag lets you enable support for the AudioCDReader class. You might want to disable | |||
it to build without the MS SDK under windows. | |||
*/ | |||
#ifndef JUCE_USE_CDREADER | |||
#define JUCE_USE_CDREADER 1 | |||
#endif | |||
//============================================================================= | |||
/** Enabling this provides support for cameras, using the CameraDevice class | |||
*/ | |||
@@ -280,13 +280,20 @@ | |||
#define JUCE_USE_OGGVORBIS 1 | |||
#endif | |||
/** This flag lets you enable support for CD-burning. You might want to disable | |||
/** This flag lets you enable the AudioCDBurner class. You might want to disable | |||
it to build without the MS SDK under windows. | |||
*/ | |||
#if (! defined (JUCE_USE_CDBURNER)) && ! (JUCE_WINDOWS && ! JUCE_MSVC) | |||
#define JUCE_USE_CDBURNER 1 | |||
#endif | |||
/** This flag lets you enable support for the AudioCDReader class. You might want to disable | |||
it to build without the MS SDK under windows. | |||
*/ | |||
#ifndef JUCE_USE_CDREADER | |||
#define JUCE_USE_CDREADER 1 | |||
#endif | |||
/** Enabling this provides support for cameras, using the CameraDevice class | |||
*/ | |||
#if JUCE_QUICKTIME && ! defined (JUCE_USE_CAMERA) | |||
@@ -18947,7 +18954,7 @@ END_JUCE_NAMESPACE | |||
BEGIN_JUCE_NAMESPACE | |||
#if JUCE_MAC | |||
#if JUCE_MAC && JUCE_USE_CDREADER | |||
// Mac version doesn't need any native code because it's all done with files.. | |||
// Windows + Linux versions are in the platform-dependent code sections. | |||
@@ -87856,7 +87863,7 @@ void CustomTypeface::addGlyphsFromOtherTypeface (Typeface& typefaceToCopy, juce_ | |||
{ | |||
for (int i = 0; i < numCharacters; ++i) | |||
{ | |||
const juce_wchar c = characterStartIndex + i; | |||
const juce_wchar c = (juce_wchar) (characterStartIndex + i); | |||
Array <int> glyphIndexes; | |||
Array <float> offsets; | |||
@@ -234805,10 +234812,6 @@ END_JUCE_NAMESPACE | |||
BEGIN_JUCE_NAMESPACE | |||
#if JUCE_USE_CDBURNER | |||
#endif | |||
#define JUCE_INCLUDED_FILE 1 | |||
// Now include the actual code files.. | |||
@@ -242983,7 +242986,9 @@ void OpenGLPixelFormat::getAvailablePixelFormats (Component* component, | |||
/********* Start of inlined file: juce_win32_AudioCDReader.cpp *********/ | |||
// (This file gets included by juce_win32_NativeCode.cpp, rather than being | |||
// compiled on its own). | |||
#if JUCE_INCLUDED_FILE && JUCE_USE_CDBURNER | |||
#if JUCE_INCLUDED_FILE | |||
#if JUCE_USE_CDREADER | |||
//*************************************************************************** | |||
// %%% TARGET STATUS VALUES %%% | |||
@@ -244986,6 +244991,10 @@ void AudioCDReader::ejectDisk() | |||
((CDDeviceWrapper*) handle)->cdH->openDrawer (true); | |||
} | |||
#endif | |||
#if JUCE_USE_CDBURNER | |||
static IDiscRecorder* enumCDBurners (StringArray* list, int indexToOpen, IDiscMaster** master) | |||
{ | |||
CoInitialize (0); | |||
@@ -245030,25 +245039,6 @@ static IDiscRecorder* enumCDBurners (StringArray* list, int indexToOpen, IDiscMa | |||
drEnum->Release(); | |||
} | |||
/*if (redbookFormat != 0) | |||
{ | |||
IEnumDiscMasterFormats* mfEnum; | |||
if (SUCCEEDED (dm->EnumDiscMasterFormats (&mfEnum))) | |||
{ | |||
IID formatIID; | |||
DWORD dummy; | |||
while (mfEnum->Next (1, &formatIID, &dummy) == S_OK) | |||
{ | |||
} | |||
mfEnum->Release(); | |||
} | |||
redbookFormat | |||
}*/ | |||
if (master == 0) | |||
dm->Close(); | |||
} | |||
@@ -245305,6 +245295,7 @@ bool AudioCDBurner::addAudioTrack (AudioSource* source, int numSamples) | |||
return ok && hr == S_OK; | |||
} | |||
#endif | |||
#endif | |||
/********* End of inlined file: juce_win32_AudioCDReader.cpp *********/ | |||
@@ -262004,6 +261995,15 @@ void PlatformUtilities::addItemToDock (const File& file) | |||
} | |||
} | |||
int PlatformUtilities::getOSXMinorVersionNumber() throw() | |||
{ | |||
SInt32 versionMinor = 0; | |||
OSErr err = Gestalt (gestaltSystemVersionMinor, &versionMinor); | |||
(void) err; | |||
jassert (err == noErr); | |||
return (int) versionMinor; | |||
} | |||
#if ! JUCE_ONLY_BUILD_CORE_LIBRARY | |||
bool AlertWindow::showNativeDialogBox (const String& title, | |||
@@ -263249,6 +263249,8 @@ private: | |||
void drawGradient() const throw() | |||
{ | |||
CGContextSetAlpha (context, 1.0f); | |||
CGContextSetInterpolationQuality (context, kCGInterpolationDefault); // (This is required for 10.4, where there's a crash if | |||
// you draw a gradient with high quality interp enabled). | |||
CGShadingRef shading = createGradient (state->gradient); | |||
CGContextDrawShading (context, shading); | |||
CGShadingRelease (shading); | |||
@@ -267675,6 +267677,8 @@ private: | |||
void drawGradient() const throw() | |||
{ | |||
CGContextSetAlpha (context, 1.0f); | |||
CGContextSetInterpolationQuality (context, kCGInterpolationDefault); // (This is required for 10.4, where there's a crash if | |||
// you draw a gradient with high quality interp enabled). | |||
CGShadingRef shading = createGradient (state->gradient); | |||
CGContextDrawShading (context, shading); | |||
CGShadingRelease (shading); | |||
@@ -314,13 +314,20 @@ | |||
#define JUCE_USE_OGGVORBIS 1 | |||
#endif | |||
/** This flag lets you enable support for CD-burning. You might want to disable | |||
/** This flag lets you enable the AudioCDBurner class. You might want to disable | |||
it to build without the MS SDK under windows. | |||
*/ | |||
#if (! defined (JUCE_USE_CDBURNER)) && ! (JUCE_WINDOWS && ! JUCE_MSVC) | |||
#define JUCE_USE_CDBURNER 1 | |||
#endif | |||
/** This flag lets you enable support for the AudioCDReader class. You might want to disable | |||
it to build without the MS SDK under windows. | |||
*/ | |||
#ifndef JUCE_USE_CDREADER | |||
#define JUCE_USE_CDREADER 1 | |||
#endif | |||
/** Enabling this provides support for cameras, using the CameraDevice class | |||
*/ | |||
#if JUCE_QUICKTIME && ! defined (JUCE_USE_CAMERA) | |||
@@ -7225,6 +7232,11 @@ public: | |||
/** MAC ONLY - Adds an item to the dock */ | |||
static void addItemToDock (const File& file); | |||
/** MAC ONLY - Returns the current OS version number. | |||
E.g. if it's running on 10.4, this will be 4, 10.5 will return 5, etc. | |||
*/ | |||
static int getOSXMinorVersionNumber() throw(); | |||
#endif | |||
#if JUCE_WINDOWS || DOXYGEN | |||
@@ -37208,6 +37220,8 @@ public: | |||
#ifndef __JUCE_AUDIOCDBURNER_JUCEHEADER__ | |||
#define __JUCE_AUDIOCDBURNER_JUCEHEADER__ | |||
#if JUCE_USE_CDBURNER | |||
/** | |||
*/ | |||
class AudioCDBurner | |||
@@ -37278,6 +37292,7 @@ private: | |||
void* internal; | |||
}; | |||
#endif | |||
#endif // __JUCE_AUDIOCDBURNER_JUCEHEADER__ | |||
/********* End of inlined file: juce_AudioCDBurner.h *********/ | |||
@@ -37288,6 +37303,8 @@ private: | |||
#ifndef __JUCE_AUDIOCDREADER_JUCEHEADER__ | |||
#define __JUCE_AUDIOCDREADER_JUCEHEADER__ | |||
#if JUCE_USE_CDREADER | |||
#if JUCE_MAC | |||
#endif | |||
@@ -37434,6 +37451,7 @@ private: | |||
const AudioCDReader& operator= (const AudioCDReader&); | |||
}; | |||
#endif | |||
#endif // __JUCE_AUDIOCDREADER_JUCEHEADER__ | |||
/********* End of inlined file: juce_AudioCDReader.h *********/ | |||
@@ -26,6 +26,8 @@ | |||
#ifndef __JUCE_AUDIOCDBURNER_JUCEHEADER__ | |||
#define __JUCE_AUDIOCDBURNER_JUCEHEADER__ | |||
#if JUCE_USE_CDBURNER | |||
#include "juce_AudioFormatReader.h" | |||
#include "../audio_sources/juce_AudioSource.h" | |||
@@ -104,4 +106,5 @@ private: | |||
}; | |||
#endif | |||
#endif // __JUCE_AUDIOCDBURNER_JUCEHEADER__ |
@@ -27,7 +27,7 @@ | |||
BEGIN_JUCE_NAMESPACE | |||
#if JUCE_MAC | |||
#if JUCE_MAC && JUCE_USE_CDREADER | |||
//============================================================================== | |||
// Mac version doesn't need any native code because it's all done with files.. | |||
@@ -26,6 +26,8 @@ | |||
#ifndef __JUCE_AUDIOCDREADER_JUCEHEADER__ | |||
#define __JUCE_AUDIOCDREADER_JUCEHEADER__ | |||
#if JUCE_USE_CDREADER | |||
#include "juce_AudioFormatReader.h" | |||
#include "../../text/juce_StringArray.h" | |||
#if JUCE_MAC | |||
@@ -177,4 +179,5 @@ private: | |||
const AudioCDReader& operator= (const AudioCDReader&); | |||
}; | |||
#endif | |||
#endif // __JUCE_AUDIOCDREADER_JUCEHEADER__ |
@@ -73,6 +73,11 @@ public: | |||
/** MAC ONLY - Adds an item to the dock */ | |||
static void addItemToDock (const File& file); | |||
/** MAC ONLY - Returns the current OS version number. | |||
E.g. if it's running on 10.4, this will be 4, 10.5 will return 5, etc. | |||
*/ | |||
static int getOSXMinorVersionNumber() throw(); | |||
#endif | |||
@@ -240,7 +240,7 @@ void CustomTypeface::addGlyphsFromOtherTypeface (Typeface& typefaceToCopy, juce_ | |||
{ | |||
for (int i = 0; i < numCharacters; ++i) | |||
{ | |||
const juce_wchar c = characterStartIndex + i; | |||
const juce_wchar c = (juce_wchar) (characterStartIndex + i); | |||
Array <int> glyphIndexes; | |||
Array <float> offsets; | |||
@@ -71,9 +71,7 @@ BEGIN_JUCE_NAMESPACE | |||
#include "../gui/components/special/juce_SystemTrayIconComponent.h" | |||
#include "../gui/components/filebrowser/juce_FileChooser.h" | |||
#include "../gui/components/lookandfeel/juce_LookAndFeel.h" | |||
#if JUCE_USE_CDBURNER | |||
#include "../audio/audio_file_formats/juce_AudioCDBurner.h" | |||
#endif | |||
#include "../audio/audio_file_formats/juce_AudioCDReader.h" | |||
#include "../audio/audio_sources/juce_AudioSource.h" | |||
#include "../audio/dsp/juce_AudioDataConverters.h" | |||
@@ -516,6 +516,8 @@ private: | |||
void drawGradient() const throw() | |||
{ | |||
CGContextSetAlpha (context, 1.0f); | |||
CGContextSetInterpolationQuality (context, kCGInterpolationDefault); // (This is required for 10.4, where there's a crash if | |||
// you draw a gradient with high quality interp enabled). | |||
CGShadingRef shading = createGradient (state->gradient); | |||
CGContextDrawShading (context, shading); | |||
CGShadingRelease (shading); | |||
@@ -59,6 +59,15 @@ void PlatformUtilities::addItemToDock (const File& file) | |||
} | |||
} | |||
int PlatformUtilities::getOSXMinorVersionNumber() throw() | |||
{ | |||
SInt32 versionMinor = 0; | |||
OSErr err = Gestalt (gestaltSystemVersionMinor, &versionMinor); | |||
(void) err; | |||
jassert (err == noErr); | |||
return (int) versionMinor; | |||
} | |||
//============================================================================== | |||
#if ! JUCE_ONLY_BUILD_CORE_LIBRARY | |||
@@ -25,8 +25,9 @@ | |||
// (This file gets included by juce_win32_NativeCode.cpp, rather than being | |||
// compiled on its own). | |||
#if JUCE_INCLUDED_FILE && JUCE_USE_CDBURNER | |||
#if JUCE_INCLUDED_FILE | |||
#if JUCE_USE_CDREADER | |||
//*************************************************************************** | |||
// %%% TARGET STATUS VALUES %%% | |||
@@ -2069,6 +2070,9 @@ void AudioCDReader::ejectDisk() | |||
((CDDeviceWrapper*) handle)->cdH->openDrawer (true); | |||
} | |||
#endif | |||
#if JUCE_USE_CDBURNER | |||
//============================================================================== | |||
static IDiscRecorder* enumCDBurners (StringArray* list, int indexToOpen, IDiscMaster** master) | |||
@@ -2115,25 +2119,6 @@ static IDiscRecorder* enumCDBurners (StringArray* list, int indexToOpen, IDiscMa | |||
drEnum->Release(); | |||
} | |||
/*if (redbookFormat != 0) | |||
{ | |||
IEnumDiscMasterFormats* mfEnum; | |||
if (SUCCEEDED (dm->EnumDiscMasterFormats (&mfEnum))) | |||
{ | |||
IID formatIID; | |||
DWORD dummy; | |||
while (mfEnum->Next (1, &formatIID, &dummy) == S_OK) | |||
{ | |||
} | |||
mfEnum->Release(); | |||
} | |||
redbookFormat | |||
}*/ | |||
if (master == 0) | |||
dm->Close(); | |||
} | |||
@@ -2391,3 +2376,4 @@ bool AudioCDBurner::addAudioTrack (AudioSource* source, int numSamples) | |||
} | |||
#endif | |||
#endif |