From d21baa74d83ba0328317088063261f40f3e4fa07 Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 23 May 2008 07:54:25 +0000 Subject: [PATCH] --- build/macosx/juce.xcconfig | 22 +++++----------- .../juce_mac_AudioCDBurner.mm | 26 +++++++++++-------- .../audio/synthesisers/juce_Synthesiser.cpp | 3 +++ 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/build/macosx/juce.xcconfig b/build/macosx/juce.xcconfig index f2e188ba4b..8956b4872e 100644 --- a/build/macosx/juce.xcconfig +++ b/build/macosx/juce.xcconfig @@ -1,22 +1,14 @@ + ARCHS = i386 ppc -// For 10.2 (and later) compatibility, use these values: -//GCC_VERSION_ppc = 3.3 -//MACOSX_DEPLOYMENT_TARGET = 10.4 -//MACOSX_DEPLOYMENT_TARGET_ppc = 10.2 -//OTHER_LD_FLAGS_ppc = $(DEVELOPER_SDK_DIR)/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3/libstdc++.a -//SDKROOT_ppc = $(DEVELOPER_SDK_DIR)/MacOSX10.2.8.sdk +// These settings let you build for compatibility with 10.3 onwards. -// For 10.3 (and later) compatibility, use these instead: MACOSX_DEPLOYMENT_TARGET_ppc = 10.3 MACOSX_DEPLOYMENT_TARGET = 10.4 -SDKROOT_ppc = $(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk -SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk -// For 10.4 (and later) compatibility, use these instead: -// MACOSX_DEPLOYMENT_TARGET = 10.4 -// SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk +// In XCode 3, this is the best SDK to use.. +SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk -// For 10.5 (and later) compatibility, use these instead: -// MACOSX_DEPLOYMENT_TARGET = 10.5 -// SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk +// (if you're building in XCode 2.5, you might need to use this line +// instead of the 10.5 line above..) +//SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk diff --git a/build/macosx/platform_specific_code/juce_mac_AudioCDBurner.mm b/build/macosx/platform_specific_code/juce_mac_AudioCDBurner.mm index a32ad752ba..9b68d2412f 100644 --- a/build/macosx/platform_specific_code/juce_mac_AudioCDBurner.mm +++ b/build/macosx/platform_specific_code/juce_mac_AudioCDBurner.mm @@ -152,10 +152,12 @@ END_JUCE_NAMESPACE [device acquireMediaReservation]; NSMutableDictionary* d = [[burn properties] mutableCopy]; + [d autorelease]; [d setObject: [NSNumber numberWithBool: peformFakeBurnForTesting] forKey: DRBurnTestingKey]; [d setObject: [NSNumber numberWithBool: false] forKey: DRBurnVerifyDiscKey]; + [d setObject: (shouldEject ? DRBurnCompletionActionEject : DRBurnCompletionActionMount) + forKey: DRBurnCompletionActionKey]; [burn setProperties: d]; - [d release]; [burn writeLayout: tracks]; @@ -164,6 +166,8 @@ END_JUCE_NAMESPACE juce::Thread::sleep (300); float progress = [[[burn status] objectForKey: DRStatusPercentCompleteKey] floatValue]; +NSLog ([[burn status] description]); + if (listener != 0 && listener->audioCDBurnProgress (progress)) { [burn abort]; @@ -178,11 +182,9 @@ END_JUCE_NAMESPACE } else if ([[[burn status] objectForKey: DRStatusStateKey] isEqualTo: DRStatusStateDone]) { - if (shouldEject) - [device openTray]; - break; } + NSString* err = (NSString*) [[[burn status] objectForKey: DRErrorStatusKey] objectForKey: DRErrorStatusErrorStringKey]; @@ -211,19 +213,21 @@ END_JUCE_NAMESPACE - (void) setupTrackProperties: (DRTrack*) track { NSMutableDictionary* p = [[track properties] mutableCopy]; - [p setObject: [DRMSF msfWithFrames: lengthInFrames] forKey: DRTrackLengthKey]; - [p setObject: [NSNumber numberWithUnsignedShort: 2048] forKey: DRBlockSizeKey]; - [p setObject: [NSNumber numberWithInt: 16] forKey: DRDataFormKey]; - [p setObject: [NSNumber numberWithInt: 8] forKey: DRBlockTypeKey]; - [p setObject: [NSNumber numberWithInt: 4] forKey: DRTrackModeKey]; - [p setObject: [NSNumber numberWithInt: 0] forKey: DRSessionFormatKey]; + [p setObject:[DRMSF msfWithFrames: lengthInFrames] forKey: DRTrackLengthKey]; + [p setObject:[NSNumber numberWithUnsignedShort:2352] forKey: DRBlockSizeKey]; + [p setObject:[NSNumber numberWithInt:0] forKey: DRDataFormKey]; + [p setObject:[NSNumber numberWithInt:0] forKey: DRBlockTypeKey]; + [p setObject:[NSNumber numberWithInt:0] forKey: DRTrackModeKey]; + [p setObject:[NSNumber numberWithInt:0] forKey: DRSessionFormatKey]; + + [track setProperties: p]; [p release]; } - (AudioTrackProducer*) initWithAudioSource: (juce::AudioSource*) source_ numSamples: (int) lengthInSamples { - AudioTrackProducer* s = [self init: lengthInSamples / (44100 / 75)]; + AudioTrackProducer* s = [self init: (lengthInSamples + 587) / 588]; if (s != nil) s->source = source_; diff --git a/src/juce_appframework/audio/synthesisers/juce_Synthesiser.cpp b/src/juce_appframework/audio/synthesisers/juce_Synthesiser.cpp index aa813b9af1..23ca968d55 100644 --- a/src/juce_appframework/audio/synthesisers/juce_Synthesiser.cpp +++ b/src/juce_appframework/audio/synthesisers/juce_Synthesiser.cpp @@ -253,6 +253,9 @@ void Synthesiser::startVoice (SynthesiserVoice* const voice, { if (voice != 0 && sound != 0) { + if (voice->currentlyPlayingSound != 0) + voice->stopNote (false); + voice->startNote (midiNoteNumber, velocity, sound,