From 0c8d177ac93f9644f6cecab4aab3333f6a92796b Mon Sep 17 00:00:00 2001 From: Julian Storer Date: Tue, 22 Sep 2009 14:56:36 +0100 Subject: [PATCH] Updated some help information, and changed the audio plugin plist bundle type to work better in all hosts. --- .../audio plugins/How to use this framework.txt | 17 +++++++++++++++++ extras/audio plugins/demo/build/mac/Info.plist | 2 +- src/audio/devices/juce_AudioDeviceManager.h | 10 +++++++++- src/audio/midi/juce_MidiMessage.h | 14 ++++++++++++-- 4 files changed, 39 insertions(+), 4 deletions(-) diff --git a/extras/audio plugins/How to use this framework.txt b/extras/audio plugins/How to use this framework.txt index d82c917440..74516acf7d 100644 --- a/extras/audio plugins/How to use this framework.txt +++ b/extras/audio plugins/How to use this framework.txt @@ -4,6 +4,16 @@ (c) 2008 by Raw Material Software, visit www.rawmaterialsoftware.com for more info. +----------------------------------------------------------------------------------------------------- + +This file contains as much detail as I could possibly think of about the sometimes fiddly process of setting +up your build environment to build plugins... + +If you follow all these steps and still hit a build error, don't despair! There's a thread at the juce +forum where we'll post any extra hints, tips, or problems that people have stumbled upon: +http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?p=23546 + + ----------------------------------------------------------------------------------------------------- The purpose of this framework is to make is simple to write an audio plugin in a generic @@ -68,6 +78,7 @@ much neater to keep it somewhere separate and to alter the projects to point to files instead of the demo ones. That way when new versions of this library come out, it'll make it easier to update to the latest code. + ----------------------------------------------------------------------------------------------------- Prerequisites for building a VST @@ -209,6 +220,12 @@ any compilation problems if, for example, you don't have the appropriate SDK for - Some of the RTAS SDK files in the demo project might be highlighted red to indicate that they're missing - if you're not bulding an RTAS, then you can just delete them from the project. If you are building an RTAS and have the SDK, you might need to update their paths to match your SDK location. +- For an AU, there are a bunch of Apple cpp files that need to be included directly in your project - these + used to be found in /Developer/Examples/CoreAudio/ but in the 10.6 SDK, Apple have moved them to a slightly + more sensible location at /Developer/Extras/CoreAudio. The Juce demo is hardwired to refer to their new + 10.6 location, so if you haven't yet installed the 10.6 SDK, the easiest way to make it all happy is just + to duplicate your /Developer/Examples/CoreAudio folder as /Developer/Extras/CoreAudio. That way old and new + juce plugin projects will all compile without changing any project paths. - For an AU, make sure that the JucePlugin_Build_AU is enabled in your JucePluginCharacteristics.h - In XCode, create a new project based on the "Audio Unit Effect" template - XCode will create a bunch of template source files for you - you can remove all of these from the project diff --git a/extras/audio plugins/demo/build/mac/Info.plist b/extras/audio plugins/demo/build/mac/Info.plist index 67d9c7d962..ddf0f56a23 100644 --- a/extras/audio plugins/demo/build/mac/Info.plist +++ b/extras/audio plugins/demo/build/mac/Info.plist @@ -17,7 +17,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType - TDMw + BNDL CFBundleShortVersionString 1.1 CFBundleSignature diff --git a/src/audio/devices/juce_AudioDeviceManager.h b/src/audio/devices/juce_AudioDeviceManager.h index f2c7b967ed..062aaa0960 100644 --- a/src/audio/devices/juce_AudioDeviceManager.h +++ b/src/audio/devices/juce_AudioDeviceManager.h @@ -99,6 +99,8 @@ public: bool operator== (const AudioDeviceSetup& other) const; /** The name of the audio device used for output. + The name has to be one of the ones listed by the AudioDeviceManager's currently + selected device type. This may be the same as the input device. */ String outputDeviceName; @@ -224,6 +226,12 @@ public: */ const String getCurrentAudioDeviceType() const throw() { return currentDeviceType; } + /** Returns the currently active audio device type object. + Don't keep a copy of this pointer - it's owned by the device manager and could + change at any time. + */ + AudioIODeviceType* getCurrentDeviceTypeObject() const; + /** Changes the class of audio device being used. This switches between, e.g. ASIO and DirectSound. On the Mac you probably won't ever call @@ -234,6 +242,7 @@ public: void setCurrentAudioDeviceType (const String& type, const bool treatAsChosenDevice); + /** Closes the currently-open device. You can call restartLastAudioDevice() later to reopen it in the same state @@ -480,7 +489,6 @@ private: void scanDevicesIfNeeded(); void deleteCurrentDevice(); double chooseBestSampleRate (double preferred) const; - AudioIODeviceType* getCurrentDeviceTypeObject() const; void insertDefaultDeviceNames (AudioDeviceSetup& setup) const; AudioIODeviceType* findType (const String& inputName, const String& outputName); diff --git a/src/audio/midi/juce_MidiMessage.h b/src/audio/midi/juce_MidiMessage.h index 07a31c5437..8053834a90 100644 --- a/src/audio/midi/juce_MidiMessage.h +++ b/src/audio/midi/juce_MidiMessage.h @@ -129,7 +129,17 @@ public: //============================================================================== /** Returns the timestamp associated with this message. - The units for the timestamp will be application-specific. + The exact meaning of this time and its units will vary, as messages are used in + a variety of different contexts. + + If you're getting the message from a midi file, this could be a time in seconds, or + a number of ticks - see MidiFile::convertTimestampTicksToSeconds(). + + If the message is being used in a MidiBuffer, it might indicate the number of + audio samples from the start of the buffer. + + If the message was created by a MidiInput, see MidiInputCallback::handleIncomingMidiMessage() + for details of the way that it initialises this value. @see setTimeStamp, addToTimeStamp */ @@ -137,7 +147,7 @@ public: /** Changes the message's associated timestamp. - The units for the timestamp will be application-specific. + The units for the timestamp will be application-specific - see the notes for getTimeStamp(). @see addToTimeStamp, getTimeStamp */