Package apple.audiotoolbox.c
Class AudioToolbox
- java.lang.Object
-
- apple.audiotoolbox.c.AudioToolbox
-
public final class AudioToolbox extends java.lang.Object
-
-
Nested Class Summary
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static intAudioCodecAppendInputBufferList(AudioComponentInstance inCodec, AudioBufferList inBufferList, org.moe.natj.general.ptr.IntPtr ioNumberPackets, AudioStreamPacketDescription inPacketDescription, org.moe.natj.general.ptr.IntPtr outBytesConsumed)static intAudioCodecAppendInputData(AudioComponentInstance inCodec, org.moe.natj.general.ptr.ConstVoidPtr inInputData, org.moe.natj.general.ptr.IntPtr ioInputDataByteSize, org.moe.natj.general.ptr.IntPtr ioNumberPackets, AudioStreamPacketDescription inPacketDescription)[@function] AudioCodecAppendInputData Append as much of the given data in inInputData to the codec's input buffer as possible and return in ioInputDataByteSize the amount of data used.static intAudioCodecGetProperty(AudioComponentInstance inCodec, int inPropertyID, org.moe.natj.general.ptr.IntPtr ioPropertyDataSize, org.moe.natj.general.ptr.VoidPtr outPropertyData)[@function] AudioCodecGetProperty Retrieve the indicated property data.static intAudioCodecGetPropertyInfo(AudioComponentInstance inCodec, int inPropertyID, org.moe.natj.general.ptr.IntPtr outSize, org.moe.natj.general.ptr.BytePtr outWritable)[@function] AudioCodecGetPropertyInfo Retrieve information about the given property.static intAudioCodecInitialize(AudioComponentInstance inCodec, AudioStreamBasicDescription inInputFormat, AudioStreamBasicDescription inOutputFormat, org.moe.natj.general.ptr.ConstVoidPtr inMagicCookie, int inMagicCookieByteSize)[@function] AudioCodecInitialize This call will allocate any buffers needed and otherwise set the codec up to perform the indicated translation.static intAudioCodecProduceOutputBufferList(AudioComponentInstance inCodec, AudioBufferList ioBufferList, org.moe.natj.general.ptr.IntPtr ioNumberPackets, AudioStreamPacketDescription outPacketDescription, org.moe.natj.general.ptr.IntPtr outStatus)static intAudioCodecProduceOutputPackets(AudioComponentInstance inCodec, org.moe.natj.general.ptr.VoidPtr outOutputData, org.moe.natj.general.ptr.IntPtr ioOutputDataByteSize, org.moe.natj.general.ptr.IntPtr ioNumberPackets, AudioStreamPacketDescription outPacketDescription, org.moe.natj.general.ptr.IntPtr outStatus)[@function] AudioCodecProduceOutputPackets Produce as many output packets as requested and the amount of input data allows for.static intAudioCodecReset(AudioComponentInstance inCodec)[@function] AudioCodecReset Flushes all the data in the codec and clears the input buffer.static intAudioCodecSetProperty(AudioComponentInstance inCodec, int inPropertyID, int inPropertyDataSize, org.moe.natj.general.ptr.ConstVoidPtr inPropertyData)[@function] AudioCodecSetProperty Set the indicated property data.static intAudioCodecUninitialize(AudioComponentInstance inCodec)[@function] AudioCodecUninitialize This call will move the codec from the initialized state back to the uninitialized state.static UIImageAudioComponentCopyIcon(AudioComponent comp)[@function] AudioComponentCopyIcon Fetches an icon representing the component.static intAudioComponentCopyName(AudioComponent inComponent, org.moe.natj.general.ptr.Ptr<CFStringRef> outName)[@function] AudioComponentCopyName Retrieves the name of an audio component.static intAudioComponentCount(AudioComponentDescription inDesc)[@function] AudioComponentCount Counts audio components.static AudioComponentAudioComponentFindNext(AudioComponent inComponent, AudioComponentDescription inDesc)[@function] AudioComponentFindNext Finds an audio component.static intAudioComponentGetDescription(AudioComponent inComponent, AudioComponentDescription outDesc)[@function] AudioComponentGetDescription Retrieve an audio component's description.static UIImageAudioComponentGetIcon(AudioComponent comp, float desiredPointSize)static doubleAudioComponentGetLastActiveTime(AudioComponent comp)[@function] AudioComponentGetLastActiveTime Fetches the time at which the application publishing the component was last active.static intAudioComponentGetVersion(AudioComponent inComponent, org.moe.natj.general.ptr.IntPtr outVersion)[@function] AudioComponentGetVersion Retrieve an audio component's version.static byteAudioComponentInstanceCanDo(AudioComponentInstance inInstance, short inSelectorID)[@function] AudioComponentInstanceCanDo Determines if an audio component instance implements a particular component API call as signified by the specified selector identifier token.static intAudioComponentInstanceDispose(AudioComponentInstance inInstance)[@function] AudioComponentInstanceDispose Disposes of an audio component instance.static AudioComponentAudioComponentInstanceGetComponent(AudioComponentInstance inInstance)[@function] AudioComponentInstanceGetComponent Retrieve the audio component from its instance Allows the application at any time to retrieve the audio component that is the factory object of a given instance (i.e., the audio component that was used to create the instance in the first place).static intAudioComponentInstanceNew(AudioComponent inComponent, org.moe.natj.general.ptr.Ptr<AudioComponentInstance> outInstance)[@function] AudioComponentInstanceNew Creates an audio component instance.static voidAudioComponentInstantiate(AudioComponent inComponent, int inOptions, AudioToolbox.Block_AudioComponentInstantiate inCompletionHandler)[@function] AudioComponentInstantiate Creates an audio component instance, asynchronously.static AudioComponentAudioComponentRegister(AudioComponentDescription inDesc, CFStringRef inName, int inVersion, AudioToolbox.Function_AudioComponentRegister inFactory)[@function] AudioComponentRegister Dynamically registers an AudioComponent within the current process AudioComponents are registered either when found in appropriate bundles in the filesystem, or via this call.static intAudioConverterConvertBuffer(AudioConverterRef inAudioConverter, int inInputDataSize, org.moe.natj.general.ptr.ConstVoidPtr inInputData, org.moe.natj.general.ptr.IntPtr ioOutputDataSize, org.moe.natj.general.ptr.VoidPtr outOutputData)----------------------------------------------------------------------------- [@function] AudioConverterConvertBuffer Converts data from an input buffer to an output buffer.static intAudioConverterConvertComplexBuffer(AudioConverterRef inAudioConverter, int inNumberPCMFrames, AudioBufferList inInputData, AudioBufferList outOutputData)----------------------------------------------------------------------------- [@function] AudioConverterConvertComplexBuffer Converts PCM data from an input buffer list to an output buffer list.static intAudioConverterDispose(AudioConverterRef inAudioConverter)----------------------------------------------------------------------------- [@function] AudioConverterDispose Destroy an AudioConverter.static intAudioConverterFillComplexBuffer(AudioConverterRef inAudioConverter, AudioToolbox.Function_AudioConverterFillComplexBuffer inInputDataProc, org.moe.natj.general.ptr.VoidPtr inInputDataProcUserData, org.moe.natj.general.ptr.IntPtr ioOutputDataPacketSize, AudioBufferList outOutputData, AudioStreamPacketDescription outPacketDescription)----------------------------------------------------------------------------- [@function] AudioConverterFillComplexBuffer Converts data supplied by an input callback function, supporting non-interleaved and packetized formats.static intAudioConverterGetProperty(AudioConverterRef inAudioConverter, int inPropertyID, org.moe.natj.general.ptr.IntPtr ioPropertyDataSize, org.moe.natj.general.ptr.VoidPtr outPropertyData)----------------------------------------------------------------------------- [@function] AudioConverterGetProperty Returns an AudioConverter property value.static intAudioConverterGetPropertyInfo(AudioConverterRef inAudioConverter, int inPropertyID, org.moe.natj.general.ptr.IntPtr outSize, org.moe.natj.general.ptr.BytePtr outWritable)----------------------------------------------------------------------------- [@function] AudioConverterGetPropertyInfo Returns information about an AudioConverter property.static intAudioConverterNew(AudioStreamBasicDescription inSourceFormat, AudioStreamBasicDescription inDestinationFormat, org.moe.natj.general.ptr.Ptr<AudioConverterRef> outAudioConverter)----------------------------------------------------------------------------- [@function] AudioConverterNew Create a new AudioConverter.static intAudioConverterNewSpecific(AudioStreamBasicDescription inSourceFormat, AudioStreamBasicDescription inDestinationFormat, int inNumberClassDescriptions, AudioClassDescription inClassDescriptions, org.moe.natj.general.ptr.Ptr<AudioConverterRef> outAudioConverter)----------------------------------------------------------------------------- [@function] AudioConverterNewSpecific Create a new AudioConverter using specific codecs.static intAudioConverterReset(AudioConverterRef inAudioConverter)----------------------------------------------------------------------------- [@function] AudioConverterReset Reset an AudioConverterstatic intAudioConverterSetProperty(AudioConverterRef inAudioConverter, int inPropertyID, int inPropertyDataSize, org.moe.natj.general.ptr.ConstVoidPtr inPropertyData)----------------------------------------------------------------------------- [@function] AudioConverterSetProperty Sets an AudioConverter property value.static intAudioFileClose(AudioFileID inAudioFile)[@function] AudioFileClose Close an existing audio file.static intAudioFileCountUserData(AudioFileID inAudioFile, int inUserDataID, org.moe.natj.general.ptr.IntPtr outNumberItems)[@function] AudioFileCountUserData Get the number of user data items with a certain ID in the file "User Data" refers to chunks in AIFF, CAF and WAVE files, or resources in Sound Designer II files, and possibly other things in other files.static intAudioFileCreateWithURL(CFURLRef inFileRef, int inFileType, AudioStreamBasicDescription inFormat, int inFlags, org.moe.natj.general.ptr.Ptr<AudioFileID> outAudioFile)[@function] AudioFileCreateWithURL creates a new audio file (or initialises an existing file) creates a new (or initialises an existing) audio file specified by the URL.static intAudioFileGetGlobalInfo(int inPropertyID, int inSpecifierSize, org.moe.natj.general.ptr.VoidPtr inSpecifier, org.moe.natj.general.ptr.IntPtr ioDataSize, org.moe.natj.general.ptr.VoidPtr outPropertyData)[@function] AudioFileGetGlobalInfo Copies the value for a global property into a buffer.static intAudioFileGetGlobalInfoSize(int inPropertyID, int inSpecifierSize, org.moe.natj.general.ptr.VoidPtr inSpecifier, org.moe.natj.general.ptr.IntPtr outDataSize)[@function] AudioFileGetGlobalInfoSize Get the size of a global property.static intAudioFileGetProperty(AudioFileID inAudioFile, int inPropertyID, org.moe.natj.general.ptr.IntPtr ioDataSize, org.moe.natj.general.ptr.VoidPtr outPropertyData)[@function] AudioFileGetProperty Copies the value for a property of an AudioFile into a buffer.static intAudioFileGetPropertyInfo(AudioFileID inAudioFile, int inPropertyID, org.moe.natj.general.ptr.IntPtr outDataSize, org.moe.natj.general.ptr.IntPtr isWritable)[@function] AudioFileGetPropertyInfo Get information about the size of a property of an AudioFile and whether it can be set.static intAudioFileGetUserData(AudioFileID inAudioFile, int inUserDataID, int inIndex, org.moe.natj.general.ptr.IntPtr ioUserDataSize, org.moe.natj.general.ptr.VoidPtr outUserData)[@function] AudioFileGetUserData Get the data of a chunk in a file.static intAudioFileGetUserDataSize(AudioFileID inAudioFile, int inUserDataID, int inIndex, org.moe.natj.general.ptr.IntPtr outUserDataSize)[@function] AudioFileGetUserDataSize Get the size of user data in a filestatic intAudioFileInitializeWithCallbacks(org.moe.natj.general.ptr.VoidPtr inClientData, AudioToolbox.Function_AudioFileInitializeWithCallbacks_1 inReadFunc, AudioToolbox.Function_AudioFileInitializeWithCallbacks_2 inWriteFunc, AudioToolbox.Function_AudioFileInitializeWithCallbacks_3 inGetSizeFunc, AudioToolbox.Function_AudioFileInitializeWithCallbacks_4 inSetSizeFunc, int inFileType, AudioStreamBasicDescription inFormat, int inFlags, org.moe.natj.general.ptr.Ptr<AudioFileID> outAudioFile)[@function] AudioFileInitializeWithCallbacks Wipe clean an existing file.static intAudioFileOpenURL(CFURLRef inFileRef, byte inPermissions, int inFileTypeHint, org.moe.natj.general.ptr.Ptr<AudioFileID> outAudioFile)[@function] AudioFileOpenURL Open an existing audio file.static intAudioFileOpenWithCallbacks(org.moe.natj.general.ptr.VoidPtr inClientData, AudioToolbox.Function_AudioFileOpenWithCallbacks_1 inReadFunc, AudioToolbox.Function_AudioFileOpenWithCallbacks_2 inWriteFunc, AudioToolbox.Function_AudioFileOpenWithCallbacks_3 inGetSizeFunc, AudioToolbox.Function_AudioFileOpenWithCallbacks_4 inSetSizeFunc, int inFileTypeHint, org.moe.natj.general.ptr.Ptr<AudioFileID> outAudioFile)[@function] AudioFileOpenWithCallbacks Open an existing file.static intAudioFileOptimize(AudioFileID inAudioFile)[@function] AudioFileOptimize Move the audio data to the end of the file and other internal optimizations of the file structure.static intAudioFileReadBytes(AudioFileID inAudioFile, byte inUseCache, long inStartingByte, org.moe.natj.general.ptr.IntPtr ioNumBytes, org.moe.natj.general.ptr.VoidPtr outBuffer)[@function] AudioFileReadBytes Read bytes of audio data from the audio file.static intAudioFileReadPacketData(AudioFileID inAudioFile, byte inUseCache, org.moe.natj.general.ptr.IntPtr ioNumBytes, org.moe.natj.general.ptr.Ptr<AudioStreamPacketDescription> outPacketDescriptions, long inStartingPacket, org.moe.natj.general.ptr.IntPtr ioNumPackets, org.moe.natj.general.ptr.VoidPtr outBuffer)[@function] AudioFileReadPacketData Read packets of audio data from the audio file.static intAudioFileReadPackets(AudioFileID inAudioFile, byte inUseCache, org.moe.natj.general.ptr.IntPtr outNumBytes, org.moe.natj.general.ptr.Ptr<AudioStreamPacketDescription> outPacketDescriptions, long inStartingPacket, org.moe.natj.general.ptr.IntPtr ioNumPackets, org.moe.natj.general.ptr.VoidPtr outBuffer)Deprecated.static intAudioFileRemoveUserData(AudioFileID inAudioFile, int inUserDataID, int inIndex)[@function] AudioFileRemoveUserData Remove a user chunk in a file.static intAudioFileSetProperty(AudioFileID inAudioFile, int inPropertyID, int inDataSize, org.moe.natj.general.ptr.ConstVoidPtr inPropertyData)[@function] AudioFileSetProperty Sets the value for a property of an AudioFile .static intAudioFileSetUserData(AudioFileID inAudioFile, int inUserDataID, int inIndex, int inUserDataSize, org.moe.natj.general.ptr.ConstVoidPtr inUserData)[@function] AudioFileSetUserData Set the data of a chunk in a file.static intAudioFileStreamClose(AudioFileStreamID inAudioFileStream)[@function] AudioFileStreamClose Close and deallocate the file stream object.static intAudioFileStreamGetProperty(AudioFileStreamID inAudioFileStream, int inPropertyID, org.moe.natj.general.ptr.IntPtr ioPropertyDataSize, org.moe.natj.general.ptr.VoidPtr outPropertyData)[@function] AudioFileStreamGetProperty Retrieve the indicated property data.static intAudioFileStreamGetPropertyInfo(AudioFileStreamID inAudioFileStream, int inPropertyID, org.moe.natj.general.ptr.IntPtr outPropertyDataSize, org.moe.natj.general.ptr.BytePtr outWritable)[@function] AudioFileStreamGetPropertyInfo Retrieve the info about the given property.static intAudioFileStreamOpen(org.moe.natj.general.ptr.VoidPtr inClientData, AudioToolbox.Function_AudioFileStreamOpen_1 inPropertyListenerProc, AudioToolbox.Function_AudioFileStreamOpen_2 inPacketsProc, int inFileTypeHint, org.moe.natj.general.ptr.Ptr<AudioFileStreamID> outAudioFileStream)[@function] AudioFileStreamOpen Create a new audio file stream parser.static intAudioFileStreamParseBytes(AudioFileStreamID inAudioFileStream, int inDataByteSize, org.moe.natj.general.ptr.ConstVoidPtr inData, int inFlags)[@function] AudioFileStreamParseBytes This call is the means for streams to supply data to the parser.static intAudioFileStreamSeek(AudioFileStreamID inAudioFileStream, long inPacketOffset, org.moe.natj.general.ptr.LongPtr outDataByteOffset, org.moe.natj.general.ptr.IntPtr ioFlags)[@function] AudioFileStreamSeek This call is used to seek in the data stream.static intAudioFileStreamSetProperty(AudioFileStreamID inAudioFileStream, int inPropertyID, int inPropertyDataSize, org.moe.natj.general.ptr.ConstVoidPtr inPropertyData)[@function] AudioFileStreamSetProperty Set the value of the property.static intAudioFileWriteBytes(AudioFileID inAudioFile, byte inUseCache, long inStartingByte, org.moe.natj.general.ptr.IntPtr ioNumBytes, org.moe.natj.general.ptr.ConstVoidPtr inBuffer)[@function] AudioFileWriteBytes Write bytes of audio data to the audio file.static intAudioFileWritePackets(AudioFileID inAudioFile, byte inUseCache, int inNumBytes, org.moe.natj.general.ptr.ConstPtr<AudioStreamPacketDescription> inPacketDescriptions, long inStartingPacket, org.moe.natj.general.ptr.IntPtr ioNumPackets, org.moe.natj.general.ptr.ConstVoidPtr inBuffer)[@function] AudioFileWritePackets Write packets of audio data to the audio file.static intAudioFormatGetProperty(int inPropertyID, int inSpecifierSize, org.moe.natj.general.ptr.ConstVoidPtr inSpecifier, org.moe.natj.general.ptr.IntPtr ioPropertyDataSize, org.moe.natj.general.ptr.VoidPtr outPropertyData)[@function] AudioFormatGetProperty Retrieve the indicated property datastatic intAudioFormatGetPropertyInfo(int inPropertyID, int inSpecifierSize, org.moe.natj.general.ptr.ConstVoidPtr inSpecifier, org.moe.natj.general.ptr.IntPtr outPropertyDataSize)[@function] AudioFormatGetPropertyInfo Retrieve information about the given propertystatic UIImageAudioOutputUnitGetHostIcon(AudioComponentInstance au, float desiredPointSize)static intAudioOutputUnitPublish(AudioComponentDescription inDesc, CFStringRef inName, int inVersion, AudioComponentInstance inOutputUnit)[@function] AudioOutputUnitPublish Register an audio output unit as available to be used as an audio unit by other applications.static intAudioOutputUnitStart(AudioComponentInstance ci)----------------------------------------------------------------------------- Start/stop methods for output units -----------------------------------------------------------------------------static intAudioOutputUnitStop(AudioComponentInstance ci)static intAudioQueueAddPropertyListener(AudioQueueRef inAQ, int inID, AudioToolbox.Function_AudioQueueAddPropertyListener inProc, org.moe.natj.general.ptr.VoidPtr inUserData)[@function] AudioQueueAddPropertyListener Adds a listener callback for a property.static intAudioQueueAllocateBuffer(AudioQueueRef inAQ, int inBufferByteSize, org.moe.natj.general.ptr.Ptr<org.moe.natj.general.ptr.Ptr<AudioQueueBuffer>> outBuffer)[@function] AudioQueueAllocateBuffer Asks an audio queue to allocate a buffer.static intAudioQueueAllocateBufferWithPacketDescriptions(AudioQueueRef inAQ, int inBufferByteSize, int inNumberPacketDescriptions, org.moe.natj.general.ptr.Ptr<org.moe.natj.general.ptr.Ptr<AudioQueueBuffer>> outBuffer)[@function] AudioQueueAllocateBufferWithPacketDescriptions Asks an audio queue to allocate a buffer with space for packet descriptions.static intAudioQueueCreateTimeline(AudioQueueRef inAQ, org.moe.natj.general.ptr.Ptr<AudioQueueTimelineRef> outTimeline)[@function] AudioQueueCreateTimeline Creates a timeline object.static intAudioQueueDeviceGetCurrentTime(AudioQueueRef inAQ, AudioTimeStamp outTimeStamp)[@function] AudioQueueDeviceGetCurrentTime Obtains the current time of the audio device associated with an audio queue.static intAudioQueueDeviceGetNearestStartTime(AudioQueueRef inAQ, AudioTimeStamp ioRequestedStartTime, int inFlags)[@function] AudioQueueDeviceGetNearestStartTime Obtains an audio device's start time that is closest to a requested start time.static intAudioQueueDeviceTranslateTime(AudioQueueRef inAQ, AudioTimeStamp inTime, AudioTimeStamp outTime)[@function] AudioQueueDeviceTranslateTime Converts the time in the time base of the associated audio device from one representation to another.static intAudioQueueDispose(AudioQueueRef inAQ, byte inImmediate)[@function] AudioQueueDispose Disposes an existing audio queue.static intAudioQueueDisposeTimeline(AudioQueueRef inAQ, AudioQueueTimelineRef inTimeline)[@function] AudioQueueDisposeTimeline Disposes of a timeline object.static intAudioQueueEnqueueBuffer(AudioQueueRef inAQ, AudioQueueBuffer inBuffer, int inNumPacketDescs, AudioStreamPacketDescription inPacketDescs)[@function] AudioQueueEnqueueBuffer Assigns a buffer to an audio queue for recording or playback.static intAudioQueueEnqueueBufferWithParameters(AudioQueueRef inAQ, AudioQueueBuffer inBuffer, int inNumPacketDescs, AudioStreamPacketDescription inPacketDescs, int inTrimFramesAtStart, int inTrimFramesAtEnd, int inNumParamValues, AudioQueueParameterEvent inParamValues, AudioTimeStamp inStartTime, AudioTimeStamp outActualStartTime)[@function] AudioQueueEnqueueBufferWithParameters Assigns a buffer to an audio queue for playback, providing parameters and start time information.static intAudioQueueFlush(AudioQueueRef inAQ)[@function] AudioQueueFlush Resets the audio queue's decoder state.static intAudioQueueFreeBuffer(AudioQueueRef inAQ, AudioQueueBuffer inBuffer)[@function] AudioQueueFreeBuffer Disposes of an audio queue buffer.static intAudioQueueGetCurrentTime(AudioQueueRef inAQ, AudioQueueTimelineRef inTimeline, AudioTimeStamp outTimeStamp, org.moe.natj.general.ptr.BytePtr outTimelineDiscontinuity)[@function] AudioQueueGetCurrentTime Obtains the current audio queue time.static intAudioQueueGetParameter(AudioQueueRef inAQ, int inParamID, org.moe.natj.general.ptr.FloatPtr outValue)[@function] AudioQueueGetParameter Obtains an audio queue parameter value.static intAudioQueueGetProperty(AudioQueueRef inAQ, int inID, org.moe.natj.general.ptr.VoidPtr outData, org.moe.natj.general.ptr.IntPtr ioDataSize)[@function] AudioQueueGetProperty Obtains an audio queue property value.static intAudioQueueGetPropertySize(AudioQueueRef inAQ, int inID, org.moe.natj.general.ptr.IntPtr outDataSize)[@function] AudioQueueGetPropertySize Obtains the size of an audio queue property.static intAudioQueueNewInput(AudioStreamBasicDescription inFormat, AudioToolbox.Function_AudioQueueNewInput inCallbackProc, org.moe.natj.general.ptr.VoidPtr inUserData, CFRunLoopRef inCallbackRunLoop, CFStringRef inCallbackRunLoopMode, int inFlags, org.moe.natj.general.ptr.Ptr<AudioQueueRef> outAQ)[@function] AudioQueueNewInput Creates a new audio queue for recording audio data.static intAudioQueueNewInputWithDispatchQueue(org.moe.natj.general.ptr.Ptr<AudioQueueRef> outAQ, AudioStreamBasicDescription inFormat, int inFlags, NSObject inCallbackDispatchQueue, AudioToolbox.Block_AudioQueueNewInputWithDispatchQueue inCallbackBlock)[@function] AudioQueueNewInputWithDispatchQueue Creates a new audio queue for recording audio data.static intAudioQueueNewOutput(AudioStreamBasicDescription inFormat, AudioToolbox.Function_AudioQueueNewOutput inCallbackProc, org.moe.natj.general.ptr.VoidPtr inUserData, CFRunLoopRef inCallbackRunLoop, CFStringRef inCallbackRunLoopMode, int inFlags, org.moe.natj.general.ptr.Ptr<AudioQueueRef> outAQ)[@function] AudioQueueNewOutput Creates a new audio queue for playing audio data.static intAudioQueueNewOutputWithDispatchQueue(org.moe.natj.general.ptr.Ptr<AudioQueueRef> outAQ, AudioStreamBasicDescription inFormat, int inFlags, NSObject inCallbackDispatchQueue, AudioToolbox.Block_AudioQueueNewOutputWithDispatchQueue inCallbackBlock)[@function] AudioQueueNewOutputWithDispatchQueue Creates a new audio queue for playing audio data.static intAudioQueueOfflineRender(AudioQueueRef inAQ, AudioTimeStamp inTimestamp, AudioQueueBuffer ioBuffer, int inNumberFrames)[@function] AudioQueueOfflineRender Obtain a buffer of audio output from a queue in offline rendering mode.static intAudioQueuePause(AudioQueueRef inAQ)[@function] AudioQueuePause Pauses audio playback or recording.static intAudioQueuePrime(AudioQueueRef inAQ, int inNumberOfFramesToPrepare, org.moe.natj.general.ptr.IntPtr outNumberOfFramesPrepared)[@function] AudioQueuePrime Begins decoding buffers in preparation for playback.static intAudioQueueProcessingTapDispose(AudioQueueProcessingTapRef inAQTap)[@function] AudioQueueProcessingTapDispose Dispose a processing tap object As with AudioQueueProcessingTapNew(), this call can only be made on an audio queue that is stopped (paused is not sufficient)static intAudioQueueProcessingTapGetQueueTime(AudioQueueProcessingTapRef inAQTap, org.moe.natj.general.ptr.DoublePtr outQueueSampleTime, org.moe.natj.general.ptr.IntPtr outQueueFrameCount)[@function] AudioQueueProcessingTapGetQueueTime Used by a processing tap to retrieve the queue's current time.static intAudioQueueProcessingTapGetSourceAudio(AudioQueueProcessingTapRef inAQTap, int inNumberFrames, AudioTimeStamp ioTimeStamp, org.moe.natj.general.ptr.IntPtr outFlags, org.moe.natj.general.ptr.IntPtr outNumberFrames, AudioBufferList ioData)[@function] AudioQueueProcessingTapGetSourceAudio Used by a processing tap to retrieve source audio.static intAudioQueueProcessingTapNew(AudioQueueRef inAQ, AudioToolbox.Function_AudioQueueProcessingTapNew inCallback, org.moe.natj.general.ptr.VoidPtr inClientData, int inFlags, org.moe.natj.general.ptr.IntPtr outMaxFrames, AudioStreamBasicDescription outProcessingFormat, org.moe.natj.general.ptr.Ptr<AudioQueueProcessingTapRef> outAQTap)[@function] AudioQueueProcessingTapNew Create a new processing tap This function creates a processing tap on a given audio queue.static intAudioQueueRemovePropertyListener(AudioQueueRef inAQ, int inID, AudioToolbox.Function_AudioQueueRemovePropertyListener inProc, org.moe.natj.general.ptr.VoidPtr inUserData)[@function] AudioQueueRemovePropertyListener Removes a listener callback for a property.static intAudioQueueReset(AudioQueueRef inAQ)[@function] AudioQueueReset Resets an audio queue.static intAudioQueueSetOfflineRenderFormat(AudioQueueRef inAQ, AudioStreamBasicDescription inFormat, AudioChannelLayout inLayout)[@function] AudioQueueSetOfflineRenderFormat Specify an audio format to which the queue will perform subsequent offline rendering, or disable offline rendering.static intAudioQueueSetParameter(AudioQueueRef inAQ, int inParamID, float inValue)[@function] AudioQueueSetParameter Sets an audio queue parameter value.static intAudioQueueSetProperty(AudioQueueRef inAQ, int inID, org.moe.natj.general.ptr.ConstVoidPtr inData, int inDataSize)[@function] AudioQueueSetProperty Sets an audio queue property value.static intAudioQueueStart(AudioQueueRef inAQ, AudioTimeStamp inStartTime)[@function] AudioQueueStart Begins playing or recording audio.static intAudioQueueStop(AudioQueueRef inAQ, byte inImmediate)[@function] AudioQueueStop Stops playing or recording audio.static intAudioServicesAddSystemSoundCompletion(int inSystemSoundID, CFRunLoopRef inRunLoop, CFStringRef inRunLoopMode, AudioToolbox.Function_AudioServicesAddSystemSoundCompletion inCompletionRoutine, org.moe.natj.general.ptr.VoidPtr inClientData)This function will be deprecated in a future release.static intAudioServicesCreateSystemSoundID(CFURLRef inFileURL, org.moe.natj.general.ptr.IntPtr outSystemSoundID)[@function] AudioServicesCreateSystemSoundID Allows the application to designate an audio file for playback by the System Sound server.static intAudioServicesDisposeSystemSoundID(int inSystemSoundID)[@function] AudioServicesDisposeSystemSoundID Allows the System Sound server to dispose any resources needed for the provided SystemSoundID.static intAudioServicesGetProperty(int inPropertyID, int inSpecifierSize, org.moe.natj.general.ptr.ConstVoidPtr inSpecifier, org.moe.natj.general.ptr.IntPtr ioPropertyDataSize, org.moe.natj.general.ptr.VoidPtr outPropertyData)[@function] AudioServicesGetProperty Retrieve the indicated property datastatic intAudioServicesGetPropertyInfo(int inPropertyID, int inSpecifierSize, org.moe.natj.general.ptr.ConstVoidPtr inSpecifier, org.moe.natj.general.ptr.IntPtr outPropertyDataSize, org.moe.natj.general.ptr.BytePtr outWritable)[@function] AudioServicesGetPropertyInfo Get information about the size of an AudioServices property and whether it can be set.static voidAudioServicesPlayAlertSound(int inSystemSoundID)This function will be deprecated in a future release.static voidAudioServicesPlayAlertSoundWithCompletion(int inSystemSoundID, AudioToolbox.Block_AudioServicesPlayAlertSoundWithCompletion inCompletionBlock)[@function] AudioServicesPlayAlertSoundWithCompletion Play an alert sound Play the sound designated by the provided SystemSoundID with alert sound behavior.static voidAudioServicesPlaySystemSound(int inSystemSoundID)This function will be deprecated in a future release.static voidAudioServicesPlaySystemSoundWithCompletion(int inSystemSoundID, AudioToolbox.Block_AudioServicesPlaySystemSoundWithCompletion inCompletionBlock)[@function] AudioServicesPlaySystemSoundWithCompletion Play a system sound Play the sound designated by the provided SystemSoundID.static voidAudioServicesRemoveSystemSoundCompletion(int inSystemSoundID)This function will be deprecated in a future release.static intAudioServicesSetProperty(int inPropertyID, int inSpecifierSize, org.moe.natj.general.ptr.ConstVoidPtr inSpecifier, int inPropertyDataSize, org.moe.natj.general.ptr.ConstVoidPtr inPropertyData)[@function] AudioServicesSetProperty Set the indicated property datastatic intAudioSessionAddPropertyListener(int inID, AudioToolbox.Function_AudioSessionAddPropertyListener inProc, org.moe.natj.general.ptr.VoidPtr inClientData)Deprecated.static intAudioSessionGetProperty(int inID, org.moe.natj.general.ptr.IntPtr ioDataSize, org.moe.natj.general.ptr.VoidPtr outData)Deprecated.static intAudioSessionGetPropertySize(int inID, org.moe.natj.general.ptr.IntPtr outDataSize)Deprecated.static intAudioSessionInitialize(CFRunLoopRef inRunLoop, CFStringRef inRunLoopMode, AudioToolbox.Function_AudioSessionInitialize inInterruptionListener, org.moe.natj.general.ptr.VoidPtr inClientData)Deprecated.static intAudioSessionRemovePropertyListener(int inID)Deprecated.static intAudioSessionRemovePropertyListenerWithUserData(int inID, AudioToolbox.Function_AudioSessionRemovePropertyListenerWithUserData inProc, org.moe.natj.general.ptr.VoidPtr inClientData)Deprecated.static intAudioSessionSetActive(byte active)Deprecated.static intAudioSessionSetActiveWithFlags(byte active, int inFlags)Deprecated.static intAudioSessionSetProperty(int inID, int inDataSize, org.moe.natj.general.ptr.ConstVoidPtr inData)Deprecated.static intAudioUnitAddPropertyListener(AudioComponentInstance inUnit, int inID, AudioToolbox.Function_AudioUnitAddPropertyListener inProc, org.moe.natj.general.ptr.VoidPtr inProcUserData)[@function] AudioUnitAddPropertyListener registration call to receive notifications for when a property changes When an audio unit property value changes, a notification callback can be called by the audio unit to inform interested parties that this event has occurred.static intAudioUnitAddRenderNotify(AudioComponentInstance inUnit, AudioToolbox.Function_AudioUnitAddRenderNotify inProc, org.moe.natj.general.ptr.VoidPtr inProcUserData)[@function] AudioUnitAddRenderNotify a notification callback to call when an audio unit is asked to render allows an application to register a callback with an audio unit for whenever the audio unit is asked to render.static CFArrayRefAudioUnitExtensionCopyComponentList(CFStringRef extensionIdentifier)[@function] AudioUnitExtensionCopyComponentList Returns the component registrations for a given audio unit extension.static intAudioUnitExtensionSetComponentList(CFStringRef extensionIdentifier, CFArrayRef audioComponentInfo)[@function] AudioUnitExtensionSetComponentList Allows the implementor of an audio unit extension to dynamically modify the list of component registrations for the extension.static intAudioUnitGetParameter(AudioComponentInstance inUnit, int inID, int inScope, int inElement, org.moe.natj.general.ptr.FloatPtr outValue)[@function] AudioUnitGetParameter Get the value of a parameter Get the value of a parameter as specified by its ID, scope and element.static intAudioUnitGetProperty(AudioComponentInstance inUnit, int inID, int inScope, int inElement, org.moe.natj.general.ptr.VoidPtr outData, org.moe.natj.general.ptr.IntPtr ioDataSize)[@function] AudioUnitGetProperty retrieves the value of a specified property The API can is used to retrieve the value of the property.static intAudioUnitGetPropertyInfo(AudioComponentInstance inUnit, int inID, int inScope, int inElement, org.moe.natj.general.ptr.IntPtr outDataSize, org.moe.natj.general.ptr.BytePtr outWritable)[@function] AudioUnitGetPropertyInfo retrieves information about a specified property The API can be used to retrieve both the size of the property, and whether it is writable or not.static intAudioUnitInitialize(AudioComponentInstance inUnit)[@function] AudioUnitInitialize initialize an audio unit Upon success, the audio unit has been successfully initialized.static intAudioUnitProcess(AudioComponentInstance inUnit, org.moe.natj.general.ptr.IntPtr ioActionFlags, AudioTimeStamp inTimeStamp, int inNumberFrames, AudioBufferList ioData)static intAudioUnitProcessMultiple(AudioComponentInstance inUnit, org.moe.natj.general.ptr.IntPtr ioActionFlags, AudioTimeStamp inTimeStamp, int inNumberFrames, int inNumberInputBufferLists, org.moe.natj.general.ptr.Ptr<org.moe.natj.general.ptr.ConstPtr<AudioBufferList>> inInputBufferLists, int inNumberOutputBufferLists, org.moe.natj.general.ptr.Ptr<org.moe.natj.general.ptr.Ptr<AudioBufferList>> ioOutputBufferLists)static intAudioUnitRemovePropertyListenerWithUserData(AudioComponentInstance inUnit, int inID, AudioToolbox.Function_AudioUnitRemovePropertyListenerWithUserData inProc, org.moe.natj.general.ptr.VoidPtr inProcUserData)[@function] AudioUnitRemovePropertyListenerWithUserData remove a previously registered property listener Removes a previously registered property listener as specified by the inProc and inProcUser data as paired to the property identifierstatic intAudioUnitRemoveRenderNotify(AudioComponentInstance inUnit, AudioToolbox.Function_AudioUnitRemoveRenderNotify inProc, org.moe.natj.general.ptr.VoidPtr inProcUserData)[@function] AudioUnitRemoveRenderNotify remove a previously registered render notification procstatic intAudioUnitRender(AudioComponentInstance inUnit, org.moe.natj.general.ptr.IntPtr ioActionFlags, AudioTimeStamp inTimeStamp, int inOutputBusNumber, int inNumberFrames, AudioBufferList ioData)[@function] AudioUnitRender the render operation where ioData will contain the results of the audio unit's render operations an audio unit will render the amount of audio data described by inNumberOfFrames and the results of that render will be contained within ioData.static intAudioUnitReset(AudioComponentInstance inUnit, int inScope, int inElement)[@function] AudioUnitReset reset an audio unit's render state This call will clear any render state of an audio unit.static intAudioUnitScheduleParameters(AudioComponentInstance inUnit, org.moe.natj.general.ptr.VoidPtr inParameterEvent, int inNumParamEvents)[@function] AudioUnitScheduleParameters Schedule changes to the value of a parameter This API is used to schedule intra-buffer changes to the value of a parameter (immediate) or to ramp a parameter from a start value to an end value for a specified number of samples (ramp) The API allows for the scheduling of multiple parameter events with the one call.static intAudioUnitSetParameter(AudioComponentInstance inUnit, int inID, int inScope, int inElement, float inValue, int inBufferOffsetInFrames)[@function] AudioUnitSetParameter Set the value of a parameter Set the value of a parameter as specified by its ID, scope and element.static intAudioUnitSetProperty(AudioComponentInstance inUnit, int inID, int inScope, int inElement, org.moe.natj.general.ptr.ConstVoidPtr inData, int inDataSize)[@function] AudioUnitSetProperty sets the value of a specified property The API can is used to set the value of the property.static intAudioUnitUninitialize(AudioComponentInstance inUnit)[@function] AudioUnitUninitialize uninitialize an audio unit Once an audio unit has been initialized, to change its state in response to some kind of environmental change, the audio unit should be uninitialized.static OS_os_workgroupAudioWorkIntervalCreate(java.lang.String name, int clock, os_workgroup_attr_opaque_s attr)[@fn] AudioWorkIntervalCreate Create an OS workgroup interval for use with audio realtime threads.static intAUGraphAddNode(AUGraph inGraph, AudioComponentDescription inDescription, org.moe.natj.general.ptr.IntPtr outNode)[@function] AUGraphAddNode Add a node to an AUGraph Creates a node in the graph that is an AudioUnit, using the supplied AudioComponentDescription to find and open that unit.static intAUGraphAddRenderNotify(AUGraph inGraph, AudioToolbox.Function_AUGraphAddRenderNotify inCallback, org.moe.natj.general.ptr.VoidPtr inRefCon)[@function] AUGraphAddRenderNotify Add a notification callback Add a callback that the graph will call every time the graph renders.static intAUGraphClearConnections(AUGraph inGraph)[@function] AUGraphClearConnections clear all of the interactions in a graph This will clear all connections and callback interactions of the nodes of a graphstatic intAUGraphClose(AUGraph inGraph)[@function] AUGraphClose Close a graph All AudioUnits are closed - leaving only its nodal representationstatic intAUGraphConnectNodeInput(AUGraph inGraph, int inSourceNode, int inSourceOutputNumber, int inDestNode, int inDestInputNumber)[@function] AUGraphConnectNodeInput connect a node's output to a node's inputstatic intAUGraphCountNodeInteractions(AUGraph inGraph, int inNode, org.moe.natj.general.ptr.IntPtr outNumInteractions)[@function] AUGraphCountNodeInteractions Retrieve the number of interactions of a graph's node The number of node interactions currently being managed by the graph for the specified node.static intAUGraphDisconnectNodeInput(AUGraph inGraph, int inDestNode, int inDestInputNumber)[@function] AUGraphDisconnectNodeInput disconnect a node's input This can be used to disconnect either a connection or callback interaction to the specified node inputstatic intAUGraphGetCPULoad(AUGraph inGraph, org.moe.natj.general.ptr.FloatPtr outAverageCPULoad)[@function] AUGraphGetCPULoad The CPU load of the graph Returns a short-term running average of the current CPU load of the graph.static intAUGraphGetIndNode(AUGraph inGraph, int inIndex, org.moe.natj.general.ptr.IntPtr outNode)[@function] AUGraphGetIndNode Returns the node at a given index By using AUGraphGetNodeCount in conjunction with this call, you can iterate through the nodes of an AUGraph.static intAUGraphGetInteractionInfo(AUGraph inGraph, int inInteractionIndex, org.moe.natj.general.ptr.VoidPtr outInteraction)[@function] AUGraphGetInteractionInfo Retrieve information about a particular interaction in a graph Returns information about a particular interaction.static intAUGraphGetMaxCPULoad(AUGraph inGraph, org.moe.natj.general.ptr.FloatPtr outMaxLoad)[@function] AUGraphGetMaxCPULoad The Maximum CPU load of the graph Returns the max CPU load of the graph since this call was last made or the graph was last started.static intAUGraphGetNodeCount(AUGraph inGraph, org.moe.natj.general.ptr.IntPtr outNumberOfNodes)[@function] AUGraphGetNodeCount The number of nodes in an AUGraphstatic intAUGraphGetNodeInteractions(AUGraph inGraph, int inNode, org.moe.natj.general.ptr.IntPtr ioNumInteractions, org.moe.natj.general.ptr.VoidPtr outInteractions)[@function] AUGraphGetNodeInteractions Retrieve information about the interactions in a graph for a given nodestatic intAUGraphGetNumberOfInteractions(AUGraph inGraph, org.moe.natj.general.ptr.IntPtr outNumInteractions)[@function] AUGraphGetNumberOfInteractions Retrieve the number of interactions of a graph The number of node interactions currently being managed by the graphstatic intAUGraphInitialize(AUGraph inGraph)[@function] AUGraphInitialize Initialise a graph AudioUnitInitialize() is called on each opened node/AudioUnit (get ready to render) and SubGraph that are involved in a interaction.static intAUGraphIsInitialized(AUGraph inGraph, org.moe.natj.general.ptr.BytePtr outIsInitialized)[@function] AUGraphIsInitialized Is the graph initialisedstatic intAUGraphIsOpen(AUGraph inGraph, org.moe.natj.general.ptr.BytePtr outIsOpen)[@function] AUGraphIsOpen Is the graph openstatic intAUGraphIsRunning(AUGraph inGraph, org.moe.natj.general.ptr.BytePtr outIsRunning)[@function] AUGraphIsRunning Is the graph running (has it been started)static intAUGraphNodeInfo(AUGraph inGraph, int inNode, AudioComponentDescription outDescription, org.moe.natj.general.ptr.Ptr<AudioComponentInstance> outAudioUnit)[@function] AUGraphNodeInfo Returns information about a particular AUNode You can pass in NULL for any of the out parameters if you're not interested in that value.static intAUGraphOpen(AUGraph inGraph)[@function] AUGraphOpen Open a graph AudioUnits are open but not initialized (no resource allocation occurs here)static intAUGraphRemoveNode(AUGraph inGraph, int inNode)[@function] AUGraphRemoveNode Remove a node from an AUGraph Nodes can be removed from any thread context.static intAUGraphRemoveRenderNotify(AUGraph inGraph, AudioToolbox.Function_AUGraphRemoveRenderNotify inCallback, org.moe.natj.general.ptr.VoidPtr inRefCon)[@function] AUGraphRemoveRenderNotify Remove a notification callback Remove a previously added callback.static intAUGraphSetNodeInputCallback(AUGraph inGraph, int inDestNode, int inDestInputNumber, AURenderCallbackStruct inInputCallback)[@function] AUGraphSetNodeInputCallback Set a callback for the specified node's specified input.static intAUGraphStart(AUGraph inGraph)[@function] AUGraphStart Start a graph Start() is called on the "head" node(s) of the AUGraph (now rendering starts) The graph must be initialised before it can be started.static intAUGraphStop(AUGraph inGraph)[@function] AUGraphStop Stop a graph Stop() is called on the "head" node(s) of the AUGraph (rendering is stopped)static intAUGraphUninitialize(AUGraph inGraph)[@function] AUGraphUninitialize Uninitialise a graph The member of the graph are uninitialisedstatic intAUGraphUpdate(AUGraph inGraph, org.moe.natj.general.ptr.BytePtr outIsUpdated)[@function] AUGraphUpdate Updates the state of a running AUGraph Call this after performing a series of "edits" on the AUGraph with calls such as AUGraphConnectNodeInput() to finalize those edits.static voidCAShow(org.moe.natj.general.ptr.VoidPtr inObject)Print the internal state of an object to os_log.static voidCAShowFile(org.moe.natj.general.ptr.VoidPtr inObject, FILE inFile)Print the internal state of an object to the supplied FILE*.static intCopyInstrumentInfoFromSoundBank(CFURLRef inURL, org.moe.natj.general.ptr.Ptr<CFArrayRef> outInstrumentInfo)[@function] CopyInstrumentInfoFromSoundBank This will return a CFArray of CFDictionaries, one per instrument found in the DLS or SF2 bank.static intCopyNameFromSoundBank(CFURLRef inURL, org.moe.natj.general.ptr.Ptr<CFStringRef> outName)[@function] CopyNameFromSoundBank This will return the name of a sound bank from a DLS or SF2 bank.static intDisposeAUGraph(AUGraph inGraph)[@function] DisposeAUGraph Dispose an AUGraph Deallocates the AUGraph along with its nodes and their resources.static intDisposeMusicEventIterator(MusicEventIterator inIterator)[@function] DisposeMusicEventIterator Dispose an iteratorstatic intDisposeMusicPlayer(MusicPlayer inPlayer)[@function] DisposeMusicPlayer Dispose a music playerstatic intDisposeMusicSequence(MusicSequence inSequence)[@function] DisposeMusicSequence Dispose the sequence A sequence cannot be disposed while a MusicPlayer has it.static intExtAudioFileCreateWithURL(CFURLRef inURL, int inFileType, AudioStreamBasicDescription inStreamDesc, AudioChannelLayout inChannelLayout, int inFlags, org.moe.natj.general.ptr.Ptr<ExtAudioFileRef> outExtAudioFile)[@function] ExtAudioFileCreateWithURL Create a new audio file.static intExtAudioFileDispose(ExtAudioFileRef inExtAudioFile)[@function] ExtAudioFileDispose Close the file and dispose the object.static intExtAudioFileGetProperty(ExtAudioFileRef inExtAudioFile, int inPropertyID, org.moe.natj.general.ptr.IntPtr ioPropertyDataSize, org.moe.natj.general.ptr.VoidPtr outPropertyData)[@function] ExtAudioFileGetProperty Get a property value.static intExtAudioFileGetPropertyInfo(ExtAudioFileRef inExtAudioFile, int inPropertyID, org.moe.natj.general.ptr.IntPtr outSize, org.moe.natj.general.ptr.BytePtr outWritable)[@function] ExtAudioFileGetPropertyInfo Get information about a propertystatic intExtAudioFileOpenURL(CFURLRef inURL, org.moe.natj.general.ptr.Ptr<ExtAudioFileRef> outExtAudioFile)[@function] ExtAudioFileOpenURL Opens an audio file specified by a CFURLRef.static intExtAudioFileRead(ExtAudioFileRef inExtAudioFile, org.moe.natj.general.ptr.IntPtr ioNumberFrames, AudioBufferList ioData)[@function] ExtAudioFileRead Perform a synchronous sequential read.static intExtAudioFileSeek(ExtAudioFileRef inExtAudioFile, long inFrameOffset)[@function] ExtAudioFileSeek Seek to a specific frame position.static intExtAudioFileSetProperty(ExtAudioFileRef inExtAudioFile, int inPropertyID, int inPropertyDataSize, org.moe.natj.general.ptr.ConstVoidPtr inPropertyData)[@function] ExtAudioFileSetProperty Set a property value.static intExtAudioFileTell(ExtAudioFileRef inExtAudioFile, org.moe.natj.general.ptr.LongPtr outFrameOffset)[@function] ExtAudioFileTell Return the file's read/write position.static intExtAudioFileWrapAudioFileID(AudioFileID inFileID, byte inForWriting, org.moe.natj.general.ptr.Ptr<ExtAudioFileRef> outExtAudioFile)[@function] ExtAudioFileWrapAudioFileID Wrap an AudioFileID in an ExtAudioFileRef.static intExtAudioFileWrite(ExtAudioFileRef inExtAudioFile, int inNumberFrames, AudioBufferList ioData)[@function] ExtAudioFileWrite Perform a synchronous sequential write.static intExtAudioFileWriteAsync(ExtAudioFileRef inExtAudioFile, int inNumberFrames, AudioBufferList ioData)[@function] ExtAudioFileWriteAsync Perform an asynchronous sequential write.static intGetAudioUnitParameterDisplayType(int flags)static CFStringRefkAudioComponentInstanceInvalidationNotification()[@constant] kAudioComponentInstanceInvalidationNotification Notification generated when an audio unit extension process exits abnormally.static CFStringRefkAudioComponentRegistrationsChangedNotification()[@constant] kAudioComponentRegistrationsChangedNotification Notification generated when the set of available AudioComponents changes.static CFStringRefkAudioSession_AudioRouteChangeKey_CurrentRouteDescription()static CFStringRefkAudioSession_AudioRouteChangeKey_PreviousRouteDescription()CFDictionary keys for kAudioSessionProperty_AudioRouteChange Available in iOS 5.0 or greaterstatic CFStringRefkAudioSession_AudioRouteKey_Inputs()CFDictionary keys for kAudioSessionProperty_AudioRouteDescription Available in iOS 5.0 or greaterstatic CFStringRefkAudioSession_AudioRouteKey_Outputs()static CFStringRefkAudioSession_AudioRouteKey_Type()key(s) for the CFDictionary associated with each entry of the CFArrays returned by kAudioSession_AudioRouteKey_Inputs and kAudioSession_AudioRouteKey_Outputs.static CFStringRefkAudioSession_InputSourceKey_Description()static CFStringRefkAudioSession_InputSourceKey_ID()CFDictionary keys for kAudioSessionProperty_InputSourcesstatic CFStringRefkAudioSession_OutputDestinationKey_Description()static CFStringRefkAudioSession_OutputDestinationKey_ID()CFDictionary keys for kAudioSessionProperty_OutputDestinationsstatic CFStringRefkAudioSession_RouteChangeKey_Reason()CFString version of kAudioSession_AudioRouteChangeKey_Reason.static CFStringRefkAudioSessionInputRoute_BluetoothHFP()static CFStringRefkAudioSessionInputRoute_BuiltInMic()static CFStringRefkAudioSessionInputRoute_HeadsetMic()static CFStringRefkAudioSessionInputRoute_LineIn()[@enum] AudioSession route input types These are the strings used with the kAudioSession_AudioRouteKey_Type key for the CFDictionary associated with kAudioSession_AudioRouteKey_Inputs.static CFStringRefkAudioSessionInputRoute_USBAudio()static CFStringRefkAudioSessionOutputRoute_AirPlay()static CFStringRefkAudioSessionOutputRoute_BluetoothA2DP()static CFStringRefkAudioSessionOutputRoute_BluetoothHFP()static CFStringRefkAudioSessionOutputRoute_BuiltInReceiver()static CFStringRefkAudioSessionOutputRoute_BuiltInSpeaker()static CFStringRefkAudioSessionOutputRoute_HDMI()static CFStringRefkAudioSessionOutputRoute_Headphones()static CFStringRefkAudioSessionOutputRoute_LineOut()[@enum] AudioSession route output types These are strings used with the kAudioSession_AudioRouteKey_Type key for the CFDictionary associated with kAudioSession_AudioRouteKey_Outputs.static CFStringRefkAudioSessionOutputRoute_USBAudio()static intMusicDeviceMIDIEvent(AudioComponentInstance inUnit, int inStatus, int inData1, int inData2, int inOffsetSampleFrame)[@function] MusicDeviceMIDIEvent Used to sent MIDI channel messages to an audio unit This is the API used to send MIDI channel messages to an audio unit.static intMusicDeviceStartNote(AudioComponentInstance inUnit, int inInstrument, int inGroupID, org.moe.natj.general.ptr.IntPtr outNoteInstanceID, int inOffsetSampleFrame, MusicDeviceNoteParams inParams)[@function] MusicDeviceStartNote used to start a note This function is used to start a note.static intMusicDeviceStopNote(AudioComponentInstance inUnit, int inGroupID, int inNoteInstanceID, int inOffsetSampleFrame)[@function] MusicDeviceStopNote used to stop notes started with the MusicDeviceStartNote call This call is used to stop notes that have been started with the MusicDeviceStartNote call; both the group ID that the note was started on and the noteInstanceID should be specified.static intMusicDeviceSysEx(AudioComponentInstance inUnit, java.lang.String inData, int inLength)[@function] MusicDeviceSysEx used to send any non-channel MIDI event to an audio unit This is used to send any non-channel MIDI event to an audio unit.static intMusicEventIteratorDeleteEvent(MusicEventIterator inIterator)[@function] MusicEventIteratorDeleteEvent Deletes the event pointed to by the iterator The iterator will reference the next event after the event has been deleted.static intMusicEventIteratorGetEventInfo(MusicEventIterator inIterator, org.moe.natj.general.ptr.DoublePtr outTimeStamp, org.moe.natj.general.ptr.IntPtr outEventType, org.moe.natj.general.ptr.Ptr<org.moe.natj.general.ptr.ConstVoidPtr> outEventData, org.moe.natj.general.ptr.IntPtr outEventDataSize)[@function] MusicEventIteratorGetEventInfo Retrieves the event data at the iterator.static intMusicEventIteratorHasCurrentEvent(MusicEventIterator inIterator, org.moe.natj.general.ptr.BytePtr outHasCurEvent)[@function] MusicEventIteratorHasCurrentEvent Is there an event at the iterator's current position?static intMusicEventIteratorHasNextEvent(MusicEventIterator inIterator, org.moe.natj.general.ptr.BytePtr outHasNextEvent)[@function] MusicEventIteratorHasNextEvent Does the track have an event past the event the iterator is pointing too?static intMusicEventIteratorHasPreviousEvent(MusicEventIterator inIterator, org.moe.natj.general.ptr.BytePtr outHasPrevEvent)[@function] MusicEventIteratorHasPreviousEvent Does the track have an event previous to the event the iterator is pointing to?static intMusicEventIteratorNextEvent(MusicEventIterator inIterator)[@function] MusicEventIteratorNextEvent Move the iterator to the next event If the iterator was at the last event, then it will move past the last event and will no longer point to an event.static intMusicEventIteratorPreviousEvent(MusicEventIterator inIterator)[@function] MusicEventIteratorPreviousEvent Move the iterator to the previous event If the iterator was at the first event, then it will leave the iterator unchanged and return an error.static intMusicEventIteratorSeek(MusicEventIterator inIterator, double inTimeStamp)[@function] MusicEventIteratorSeek Move the iterator to an event at the specified time If there is no event at the specified time, the iterator will point to the first event after that time.static intMusicEventIteratorSetEventInfo(MusicEventIterator inIterator, int inEventType, org.moe.natj.general.ptr.ConstVoidPtr inEventData)[@function] MusicEventIteratorSetEventInfo Changes the type or value of an event Allows you to change either the event type, or the values of the event data, that the iterator is currently pointing too.static intMusicEventIteratorSetEventTime(MusicEventIterator inIterator, double inTimeStamp)[@function] MusicEventIteratorSetEventTime Set a new time for an event The iterator will still be pointing to the same event, but as the event will have moved, it may or may not have a next or previous event now (depending of course on the time you moved it too).static intMusicPlayerGetBeatsForHostTime(MusicPlayer inPlayer, long inHostTime, org.moe.natj.general.ptr.DoublePtr outBeats)[@function] MusicPlayerGetBeatsForHostTime Returns the beat that will be (or was) played at the specified host time.static intMusicPlayerGetHostTimeForBeats(MusicPlayer inPlayer, double inBeats, org.moe.natj.general.ptr.LongPtr outHostTime)[@function] MusicPlayerGetHostTimeForBeats Returns the host time that will be (or was) played at the specified beat.static intMusicPlayerGetPlayRateScalar(MusicPlayer inPlayer, org.moe.natj.general.ptr.DoublePtr outScaleRate)[@function] MusicPlayerGetPlayRateScalar Get the playback rate scalar of the playerstatic intMusicPlayerGetSequence(MusicPlayer inPlayer, org.moe.natj.general.ptr.Ptr<MusicSequence> outSequence)[@function] MusicPlayerGetSequence Get the sequence attached to a player If the player does not have a sequence set, this will return the _NoSequence errorstatic intMusicPlayerGetTime(MusicPlayer inPlayer, org.moe.natj.general.ptr.DoublePtr outTime)[@function] MusicPlayerGetTime Get the current time of the player The Get and Set Time calls take a specification of time as beats.static intMusicPlayerIsPlaying(MusicPlayer inPlayer, org.moe.natj.general.ptr.BytePtr outIsPlaying)[@function] MusicPlayerIsPlaying Returns the playing state of the player.static intMusicPlayerPreroll(MusicPlayer inPlayer)[@function] MusicPlayerPreroll Prepare the player for playing Allows the player to prepare its state so that starting is has a lower latency.static intMusicPlayerSetPlayRateScalar(MusicPlayer inPlayer, double inScaleRate)[@function] MusicPlayerSetPlayRateScalar Scale the playback rate of the playerstatic intMusicPlayerSetSequence(MusicPlayer inPlayer, MusicSequence inSequence)[@function] MusicPlayerSetSequence Set the sequence for the player to play A Sequence cannot be set on a player while it is playing.static intMusicPlayerSetTime(MusicPlayer inPlayer, double inTime)[@function] MusicPlayerSetTime Set the current time on the player The Get and Set Time calls take a specification of time as beats.static intMusicPlayerStart(MusicPlayer inPlayer)[@function] MusicPlayerStart Start the player If the player has not been prerolled, it will pre-roll itself and then start.static intMusicPlayerStop(MusicPlayer inPlayer)[@function] MusicPlayerStop Stop the playerstatic intMusicSequenceBarBeatTimeToBeats(MusicSequence inSequence, CABarBeatTime inBarBeatTime, org.moe.natj.general.ptr.DoublePtr outBeats)[@function] MusicSequenceBarBeatTimeToBeats Convenience function to format a bar-beat time to a sequence's beat time The sequence's tempo track Time Sig events are used to to calculate the bar-beat representation.static intMusicSequenceBeatsToBarBeatTime(MusicSequence inSequence, double inBeats, int inSubbeatDivisor, CABarBeatTime outBarBeatTime)[@function] MusicSequenceBeatsToBarBeatTime Convenience function to format a sequence's beat time to its bar-beat time The sequence's tempo track Time Sig events are used to to calculate the bar-beat representation.static intMusicSequenceDisposeTrack(MusicSequence inSequence, MusicTrack inTrack)[@function] MusicSequenceDisposeTrack Remove and dispose a track from a sequencestatic intMusicSequenceFileCreate(MusicSequence inSequence, CFURLRef inFileRef, int inFileType, int inFlags, short inResolution)[@function] MusicSequenceFileCreate Create a file from a sequence This function can be (and is most commonly) used to create a MIDI file from the events in a sequence.static intMusicSequenceFileCreateData(MusicSequence inSequence, int inFileType, int inFlags, short inResolution, org.moe.natj.general.ptr.Ptr<CFDataRef> outData)[@function] MusicSequenceFileCreateData Create a data object from a sequence The same basic parameters apply to this as with the MusicSequenceFileCreate function.static intMusicSequenceFileLoad(MusicSequence inSequence, CFURLRef inFileRef, int inFileTypeHint, int inFlags)[@function] MusicSequenceFileLoad Load the data contained within the referenced file to the sequence This function will parse the file referenced by the URL and add the events to the sequence.static intMusicSequenceFileLoadData(MusicSequence inSequence, CFDataRef inData, int inFileTypeHint, int inFlags)[@function] MusicSequenceFileLoadData Load the data to the sequence This function will parse the data and add the events to the sequence.static intMusicSequenceGetAUGraph(MusicSequence inSequence, org.moe.natj.general.ptr.Ptr<AUGraph> outGraph)[@function] MusicSequenceGetAUGraph Gets the graph currently associated with a sequence By default if no graph is assigned to a sequence then the sequence will create a default graph.static intMusicSequenceGetBeatsForSeconds(MusicSequence inSequence, double inSeconds, org.moe.natj.general.ptr.DoublePtr outBeats)[@function] MusicSequenceGetBeatsForSeconds Returns a beat value that would correspond to the supplied seconds from zero.static intMusicSequenceGetIndTrack(MusicSequence inSequence, int inTrackIndex, org.moe.natj.general.ptr.Ptr<MusicTrack> outTrack)[@function] MusicSequenceGetIndTrack Get a track at the specified index Index is zero based.static CFDictionaryRefMusicSequenceGetInfoDictionary(MusicSequence inSequence)[@function] MusicSequenceGetInfoDictionary Returns a dictionary containing meta-data derived from a sequence The dictionary can contain one or more of the kAFInfoDictionary_* keys specified inThe caller should release the returned dictionary. static intMusicSequenceGetSecondsForBeats(MusicSequence inSequence, double inBeats, org.moe.natj.general.ptr.DoublePtr outSeconds)[@function] MusicSequenceGetSecondsForBeats Returns a seconds value that would correspond to the supplied beats Uses the sequence's tempo eventsstatic intMusicSequenceGetSequenceType(MusicSequence inSequence, org.moe.natj.general.ptr.IntPtr outType)[@function] MusicSequenceGetSequenceType Get the sequence type See SetSequence for a full descriptionstatic voidMusicSequenceGetSMPTEResolution(short inRes, org.moe.natj.general.ptr.BytePtr fps, org.moe.natj.general.ptr.BytePtr ticks)[@function] MusicSequenceGetSMPTEResolution Helper function to get the fps and ticks from their representation in a SMPTE based MIDI file SMPTE resolution helpers for dealing with the interpretation and creation of tick values for standard MIDI files (see MusicSequenceFileCreate)static intMusicSequenceGetTempoTrack(MusicSequence inSequence, org.moe.natj.general.ptr.Ptr<MusicTrack> outTrack)[@function] MusicSequenceGetTempoTrack Get the tempo track of the sequence Each sequence has a single tempo track.static intMusicSequenceGetTrackCount(MusicSequence inSequence, org.moe.natj.general.ptr.IntPtr outNumberOfTracks)[@function] MusicSequenceGetTrackCount The number of tracks in a sequence.static intMusicSequenceGetTrackIndex(MusicSequence inSequence, MusicTrack inTrack, org.moe.natj.general.ptr.IntPtr outTrackIndex)[@function] MusicSequenceGetTrackIndex Get the index for a specific track Index is zero based.static intMusicSequenceNewTrack(MusicSequence inSequence, org.moe.natj.general.ptr.Ptr<MusicTrack> outTrack)[@function] MusicSequenceNewTrack Add a new (empty) track to the sequencestatic intMusicSequenceReverse(MusicSequence inSequence)[@function] MusicSequenceReverse Reverse in time all events in a sequence, including the tempo eventsstatic intMusicSequenceSetAUGraph(MusicSequence inSequence, AUGraph inGraph)[@function] MusicSequenceSetAUGraph Set the graph to be associated with the sequence A sequence can be associated with an AUGraph and this graph will be used to render the events as controlled by the sequence when it is played.static intMusicSequenceSetMIDIEndpoint(MusicSequence inSequence, int inEndpoint)[@function] MusicSequenceSetMIDIEndpoint Makes the target of all of the tracks in the sequence a MIDI endpoint This is a convenience function, and is equivalent to iterating through all of the tracks in a sequence and targeting each track to the MIDI endpointstatic intMusicSequenceSetSequenceType(MusicSequence inSequence, int inType)[@function] MusicSequenceSetSequenceType Set the sequence type (the default is beats) These two calls allow you to get and set a MusicSequence type; specifying kMusicSequenceType_Beats = 'beat', kMusicSequenceType_Seconds = 'secs', kMusicSequenceType_Samples = 'samp' The sequence type can be set to beats at any time.static shortMusicSequenceSetSMPTEResolution(byte fps, byte ticks)[@function] MusicSequenceSetSMPTEResolution Helper function to establish the SMPTE based MIDI file resolution for the specified ticks SMPTE resolution helpers for dealing with the interpretation and creation of tick values for standard MIDI files (see MusicSequenceFileCreate)static intMusicSequenceSetUserCallback(MusicSequence inSequence, AudioToolbox.Function_MusicSequenceSetUserCallback inCallback, org.moe.natj.general.ptr.VoidPtr inClientData)[@function] MusicSequenceSetUserCallback Establish a user callback for a sequence This call is used to register (or remove if inCallback is NULL) a callback that the MusicSequence will call for ANY UserEvents that are added to any of the tracks of the sequence.static intMusicTrackClear(MusicTrack inTrack, double inStartTime, double inEndTime)[@function] MusicTrackClear Removes all events within the specified range All time ranges are [starttime < endtime]static intMusicTrackCopyInsert(MusicTrack inSourceTrack, double inSourceStartTime, double inSourceEndTime, MusicTrack inDestTrack, double inDestInsertTime)[@function] MusicTrackCopyInsert Copies events from one track and inserts them into another Copies all of the events with the specified time range of the source track.static intMusicTrackCut(MusicTrack inTrack, double inStartTime, double inEndTime)[@function] MusicTrackCut Removes all the events within the specified range Events that fall past the specified range will be moved back by the specified range time.static intMusicTrackGetDestMIDIEndpoint(MusicTrack inTrack, org.moe.natj.general.ptr.IntPtr outEndpoint)[@function] MusicTrackGetDestMIDIEndpoint Gets the track's target if it is a MIDI Endpoint Returns kAudioToolboxErr_IllegalTrackDestination if the track's target is an AUNode and NOT a MIDI Endpointstatic intMusicTrackGetDestNode(MusicTrack inTrack, org.moe.natj.general.ptr.IntPtr outNode)[@function] MusicTrackGetDestNode Gets the track's target if it is an AUNode Returns kAudioToolboxErr_IllegalTrackDestination if the track's target is a MIDIEndpointRef and NOT an AUNodestatic intMusicTrackGetProperty(MusicTrack inTrack, int inPropertyID, org.moe.natj.general.ptr.VoidPtr outData, org.moe.natj.general.ptr.IntPtr ioLength)[@function] MusicTrackGetProperty Gets the specified property value If outData is NULL, then the size of the data will be passed back in ioLength This allows the client to allocate a buffer of the correct size (useful for variable length properties -- currently all properties have fixed size) Property values are always get and set by referencestatic intMusicTrackGetSequence(MusicTrack inTrack, org.moe.natj.general.ptr.Ptr<MusicSequence> outSequence)[@function] MusicTrackGetSequence Gets the sequence which the track is a member ofstatic intMusicTrackMerge(MusicTrack inSourceTrack, double inSourceStartTime, double inSourceEndTime, MusicTrack inDestTrack, double inDestInsertTime)[@function] MusicTrackMerge Copies events from one track and merges them into another Copies all of the events with the specified time range of the source track.static intMusicTrackMoveEvents(MusicTrack inTrack, double inStartTime, double inEndTime, double inMoveTime)[@function] MusicTrackMoveEvents Move events in a track Moves all of the events in the specified time range by the moveTime.static intMusicTrackNewAUPresetEvent(MusicTrack inTrack, double inTimeStamp, AUPresetEvent inPresetEvent)[@function] MusicTrackNewAUPresetEvent Adds a AUPresetEvent to a track The event is added at the specified time stamp.static intMusicTrackNewExtendedNoteEvent(MusicTrack inTrack, double inTimeStamp, ExtendedNoteOnEvent inInfo)[@function] MusicTrackNewExtendedNoteEvent Adds a ExtendedNoteOnEvent to a track The event is added at the specified time stamp.static intMusicTrackNewExtendedTempoEvent(MusicTrack inTrack, double inTimeStamp, double inBPM)[@function] MusicTrackNewExtendedTempoEvent Adds a tempo event to a track The event is added at the specified time stamp.static intMusicTrackNewMetaEvent(MusicTrack inTrack, double inTimeStamp, MIDIMetaEvent inMetaEvent)[@function] MusicTrackNewMetaEvent Adds a MIDIMetaEvent to a track The event is added at the specified time stamp.static intMusicTrackNewMIDIChannelEvent(MusicTrack inTrack, double inTimeStamp, MIDIChannelMessage inMessage)[@function] MusicTrackNewMIDIChannelEvent Adds a MIDIChannelMessage event to a track The event is added at the specified time stamp.static intMusicTrackNewMIDINoteEvent(MusicTrack inTrack, double inTimeStamp, MIDINoteMessage inMessage)[@function] MusicTrackNewMIDINoteEvent Adds a MIDINoteMessage event to a track The event is added at the specified time stamp.static intMusicTrackNewMIDIRawDataEvent(MusicTrack inTrack, double inTimeStamp, MIDIRawData inRawData)[@function] MusicTrackNewMIDIRawDataEvent Adds a MIDIRawData event to a track The event is added at the specified time stamp.static intMusicTrackNewParameterEvent(MusicTrack inTrack, double inTimeStamp, ParameterEvent inInfo)[@function] MusicTrackNewParameterEvent Adds a ParameterEvent to a track The event is added at the specified time stamp.static intMusicTrackNewUserEvent(MusicTrack inTrack, double inTimeStamp, MusicEventUserData inUserData)[@function] MusicEventUserData Adds a MusicEventUserData event to a track The event is added at the specified time stamp.static intMusicTrackSetDestMIDIEndpoint(MusicTrack inTrack, int inEndpoint)[@function] MusicTrackSetDestMIDIEndpoint Sets the track's target to the specified MIDI endpoint When played, the track will send all of its events to the specified MIDI Endpoint.static intMusicTrackSetDestNode(MusicTrack inTrack, int inNode)[@function] MusicTrackSetDestNode Sets the track's target to the specified AUNode The node must be a member of the graph that the track's sequence is using.static intMusicTrackSetProperty(MusicTrack inTrack, int inPropertyID, org.moe.natj.general.ptr.VoidPtr inData, int inLength)[@function] MusicTrackSetProperty Sets the specified property value Property values are always get and set by referencestatic intNewAUGraph(org.moe.natj.general.ptr.Ptr<AUGraph> outGraph)[@function] NewAUGraph Create a new AUGraphstatic intNewMusicEventIterator(MusicTrack inTrack, org.moe.natj.general.ptr.Ptr<MusicEventIterator> outIterator)[@function] NewMusicEventIterator Creates an iterator to iterator over a track's events The iterator should be considered invalid if a track is edited.static intNewMusicPlayer(org.moe.natj.general.ptr.Ptr<MusicPlayer> outPlayer)[@function] NewMusicPlayer Create a new music player A music player is used to play a sequence back.static intNewMusicSequence(org.moe.natj.general.ptr.Ptr<MusicSequence> outSequence)[@functiongroup] Music Sequence [@function] NewMusicSequence Create a new empty sequence A new music sequence will only have a tempo track (with a default tempo of 120 bpm), and the default type is beat based.static AudioFileRegionNextAudioFileRegion(AudioFileRegion inAFRegionPtr)static longNumAudioFileMarkersToNumBytes(long inNumMarkers)static longNumBytesToNumAudioFileMarkers(long inNumBytes)static intSetAudioUnitParameterDisplayType(int flags, int displayType)
-
-
-
Method Detail
-
AudioComponentFindNext
public static AudioComponent AudioComponentFindNext(AudioComponent inComponent, AudioComponentDescription inDesc)
[@function] AudioComponentFindNext Finds an audio component. This function is used to find an audio component that is the closest match to the provided values. Note that the list of available components may change dynamically in situations involving inter-app audio on iOS, or version 3 audio unit extensions. See kAudioComponentRegistrationsChangedNotification.- Parameters:
inComponent- If NULL, then the search starts from the beginning until an audio component is found that matches the description provided by inDesc. If non-NULL, then the search starts (continues) from the previously found audio component specified by inComponent, and will return the next found audio component.inDesc- The type, subtype and manufacturer fields are used to specify the audio component to search for. A value of 0 (zero) for any of these fields is a wildcard, so the first match found is returned.- Returns:
- An audio component that matches the search parameters, or NULL if none found.
-
AudioComponentCount
public static int AudioComponentCount(AudioComponentDescription inDesc)
[@function] AudioComponentCount Counts audio components. Returns the number of AudioComponents that match the specified AudioComponentDescription.- Parameters:
inDesc- The type, subtype and manufacturer fields are used to specify the audio components to count A value of 0 (zero) for any of these fields is a wildcard, so will match any value for this field- Returns:
- a UInt32. 0 (zero) means no audio components were found that matched the search parameters.
-
AudioComponentCopyName
public static int AudioComponentCopyName(AudioComponent inComponent, org.moe.natj.general.ptr.Ptr<CFStringRef> outName)
[@function] AudioComponentCopyName Retrieves the name of an audio component. the name of an audio component- Parameters:
inComponent- the audio component (must not be NULL)outName- a CFString that is the name of the audio component. This string should be released by the caller.- Returns:
- an OSStatus result code.
-
AudioComponentGetDescription
public static int AudioComponentGetDescription(AudioComponent inComponent, AudioComponentDescription outDesc)
[@function] AudioComponentGetDescription Retrieve an audio component's description. This will return the fully specified audio component description for the provided audio component.- Parameters:
inComponent- the audio component (must not be NULL)outDesc- the audio component description for the specified audio component- Returns:
- an OSStatus result code.
-
AudioComponentGetVersion
public static int AudioComponentGetVersion(AudioComponent inComponent, org.moe.natj.general.ptr.IntPtr outVersion)
[@function] AudioComponentGetVersion Retrieve an audio component's version.- Parameters:
inComponent- the audio component (must not be NULL)outVersion- the audio component's version in the form of 0xMMMMmmDD (Major, Minor, Dot)- Returns:
- an OSStatus result code.
-
AudioComponentInstanceNew
public static int AudioComponentInstanceNew(AudioComponent inComponent, org.moe.natj.general.ptr.Ptr<AudioComponentInstance> outInstance)
[@function] AudioComponentInstanceNew Creates an audio component instance. This function creates an instance of a given audio component. The audio component instance is the object that does all of the work, whereas the audio component is the way an application finds and then creates this object to do this work. For example, an audio unit is a type of audio component instance, so to use an audio unit, one finds its audio component, and then creates a new instance of that component. This instance is then used to perform the audio tasks for which it was designed (process, mix, synthesise, etc.).- Parameters:
inComponent- the audio component (must not be NULL)outInstance- the audio component instance- Returns:
- an OSStatus result code.
-
AudioComponentInstantiate
public static void AudioComponentInstantiate(AudioComponent inComponent, int inOptions, AudioToolbox.Block_AudioComponentInstantiate inCompletionHandler)
[@function] AudioComponentInstantiate Creates an audio component instance, asynchronously. This is an asynchronous version of AudioComponentInstanceNew(). It must be used to instantiate any component with kAudioComponentFlag_RequiresAsyncInstantiation set in its component flags. It may be used for other components as well. Note: Do not block the main thread while waiting for the completion handler to be called; this can deadlock.- Parameters:
inComponent- the audio componentinOptions- see AudioComponentInstantiationOptionsinCompletionHandler- called in an arbitrary thread context when instantiation is complete.
-
AudioComponentInstanceDispose
public static int AudioComponentInstanceDispose(AudioComponentInstance inInstance)
[@function] AudioComponentInstanceDispose Disposes of an audio component instance. This function will dispose the audio component instance that was created with the New call. It will deallocate any resources that the instance was using.- Parameters:
inInstance- the audio component instance to dispose (must not be NULL)- Returns:
- an OSStatus result code.
-
AudioComponentInstanceGetComponent
public static AudioComponent AudioComponentInstanceGetComponent(AudioComponentInstance inInstance)
[@function] AudioComponentInstanceGetComponent Retrieve the audio component from its instance Allows the application at any time to retrieve the audio component that is the factory object of a given instance (i.e., the audio component that was used to create the instance in the first place). This allows the application to retrieve general information about a particular audio component (its name, version, etc) when one just has an audio component instance to work with- Parameters:
inInstance- the audio component instance (must not be NULL, and instance must be valid - that is, not disposed)- Returns:
- a valid audio component or NULL if no component was found.
-
AudioComponentInstanceCanDo
public static byte AudioComponentInstanceCanDo(AudioComponentInstance inInstance, short inSelectorID)
[@function] AudioComponentInstanceCanDo Determines if an audio component instance implements a particular component API call as signified by the specified selector identifier token.- Parameters:
inInstance- the audio component instanceinSelectorID- a number to signify the audio component API (component selector) as appropriate for the instance's component type.- Returns:
- a boolean
-
AudioComponentRegister
public static AudioComponent AudioComponentRegister(AudioComponentDescription inDesc, CFStringRef inName, int inVersion, AudioToolbox.Function_AudioComponentRegister inFactory)
[@function] AudioComponentRegister Dynamically registers an AudioComponent within the current process AudioComponents are registered either when found in appropriate bundles in the filesystem, or via this call. AudioComponents registered via this call are available only within the current process.- Parameters:
inDesc- The AudioComponentDescription that describes the AudioComponent. Note that the registrar needs to be sure to set the flag kAudioComponentFlag_SandboxSafe in the componentFlags field of the AudioComponentDescription to indicate that the AudioComponent can be loaded directly into a sandboxed process.inName- the AudioComponent's nameinVersion- the AudioComponent's versioninFactory- an AudioComponentFactoryFunction which will create instances of your AudioComponent- Returns:
- an AudioComponent object
-
AudioUnitInitialize
public static int AudioUnitInitialize(AudioComponentInstance inUnit)
[@function] AudioUnitInitialize initialize an audio unit Upon success, the audio unit has been successfully initialized. This means that the formats for input and output are valid and can be supported and it has based its allocations on the max number of frames that it is able to render at any given time. Once initialized, it is in a state where it can be asked to render. In common practice, major state of an audio unit (such as its I/O formats, memory allocations) cannot be changed while an audio unit is initialized.- Parameters:
inUnit- The audio unit to initialize- Returns:
- noErr, or an error representing the reasons why the audio unit was not able to be initialized successfully
-
AudioUnitUninitialize
public static int AudioUnitUninitialize(AudioComponentInstance inUnit)
[@function] AudioUnitUninitialize uninitialize an audio unit Once an audio unit has been initialized, to change its state in response to some kind of environmental change, the audio unit should be uninitialized. This will have the effect of the audio unit de-allocating its resources. The caller can then reconfigure the audio unit to match the new environment (for instance, the sample rate to process audio is different than it was) and then re-initialize the audio unit when those changes have been applied.- Parameters:
inUnit- The audio unit to uninitialize- Returns:
- noErr, or an error representing the reasons why the audio unit was not able to be initialized successfully. Typically this call won't return an error unless the audio unit in question is no longer valid.
-
AudioUnitGetPropertyInfo
public static int AudioUnitGetPropertyInfo(AudioComponentInstance inUnit, int inID, int inScope, int inElement, org.moe.natj.general.ptr.IntPtr outDataSize, org.moe.natj.general.ptr.BytePtr outWritable)
[@function] AudioUnitGetPropertyInfo retrieves information about a specified property The API can be used to retrieve both the size of the property, and whether it is writable or not. In order to get a general answer on the capability of an audio unit, this function should be called before the audio unit is initialized (as some properties are writable when the audio unit is initialized, and others not)- Parameters:
inUnit- the audio unitinID- the property identifierinScope- the scope of the propertyinElement- the element of the scopeoutDataSize- if not null, then will retrieve the maximum size for the property. if null, then it is ignoredoutWritable- if not null, then will retrieve whether the property can be written or not. if null, then it is ignored- Returns:
- noErr, or various audio unit errors related to properties
-
AudioUnitGetProperty
public static int AudioUnitGetProperty(AudioComponentInstance inUnit, int inID, int inScope, int inElement, org.moe.natj.general.ptr.VoidPtr outData, org.moe.natj.general.ptr.IntPtr ioDataSize)
[@function] AudioUnitGetProperty retrieves the value of a specified property The API can is used to retrieve the value of the property. Property values for audio units are always passed by reference- Parameters:
inUnit- the audio unitinID- the property identifierinScope- the scope of the propertyinElement- the element of the scopeoutData- used to retrieve the value of the property. It should point to memory at least as large as the value described by ioDataSizeioDataSize- on input contains the size of the data pointed to by outData, on output, the size of the data that was returned.- Returns:
- noErr, or various audio unit errors related to properties
-
AudioUnitSetProperty
public static int AudioUnitSetProperty(AudioComponentInstance inUnit, int inID, int inScope, int inElement, org.moe.natj.general.ptr.ConstVoidPtr inData, int inDataSize)
[@function] AudioUnitSetProperty sets the value of a specified property The API can is used to set the value of the property. Property values for audio units are always passed by reference- Parameters:
inUnit- the audio unitinID- the property identifierinScope- the scope of the propertyinElement- the element of the scopeinData- if not null, then is the new value for the property that will be set. If null, then inDataSize should be zero, and the call is then used to remove a previously set value for a property. This removal is only valid for some properties, as most properties will always have a default value if not set.inDataSize- the size of the data being provided in inData- Returns:
- noErr, or various audio unit errors related to properties
-
AudioUnitAddPropertyListener
public static int AudioUnitAddPropertyListener(AudioComponentInstance inUnit, int inID, AudioToolbox.Function_AudioUnitAddPropertyListener inProc, org.moe.natj.general.ptr.VoidPtr inProcUserData)
[@function] AudioUnitAddPropertyListener registration call to receive notifications for when a property changes When an audio unit property value changes, a notification callback can be called by the audio unit to inform interested parties that this event has occurred. The notification is defined by the tuple of inProc and inProcUserData as paired to the specified property ID, so the previously defined AudioUnitRemovePropertyListener is deprecated because it didn't allow for the provision of the inProcUserData to remove a given listener (so, you should use AudioUnitRemovePropertyListenerWithUserData).- Parameters:
inUnit- the audio unitinID- the property identifierinProc- the procedure to call when the property changes (on any scope or element)inProcUserData- the user data to provide with the callback- Returns:
- noErr, or various audio unit errors related to properties
-
AudioUnitRemovePropertyListenerWithUserData
public static int AudioUnitRemovePropertyListenerWithUserData(AudioComponentInstance inUnit, int inID, AudioToolbox.Function_AudioUnitRemovePropertyListenerWithUserData inProc, org.moe.natj.general.ptr.VoidPtr inProcUserData)
[@function] AudioUnitRemovePropertyListenerWithUserData remove a previously registered property listener Removes a previously registered property listener as specified by the inProc and inProcUser data as paired to the property identifier- Parameters:
inUnit- the audio unitinID- the property identifierinProc- the procedure previously registeredinProcUserData- the user data paired with the provided inProc- Returns:
- noErr, or various audio unit errors related to properties
-
AudioUnitAddRenderNotify
public static int AudioUnitAddRenderNotify(AudioComponentInstance inUnit, AudioToolbox.Function_AudioUnitAddRenderNotify inProc, org.moe.natj.general.ptr.VoidPtr inProcUserData)
[@function] AudioUnitAddRenderNotify a notification callback to call when an audio unit is asked to render allows an application to register a callback with an audio unit for whenever the audio unit is asked to render. The callback is called both before the audio unit performs its render operations (the render flag's pre-render bit is set) and after the audio unit has completed its render operations (the render flag's post-render bit is set). On post-render, the audio buffer list (ioData) will contain valid audio data that was rendered by the audio unit. The inProc and inProcUserData are treated as a tuple entity, so when wanting to remove one, both the inProc and its inProcUserData must be specified- Parameters:
inUnit- the audio unitinProc- an AURenderCallback procinProcUserData- the user data that will be provided with the proc when it is called- Returns:
- noErr, or an audio unit error code
-
AudioUnitRemoveRenderNotify
public static int AudioUnitRemoveRenderNotify(AudioComponentInstance inUnit, AudioToolbox.Function_AudioUnitRemoveRenderNotify inProc, org.moe.natj.general.ptr.VoidPtr inProcUserData)
[@function] AudioUnitRemoveRenderNotify remove a previously registered render notification proc- Parameters:
inUnit- the audio unitinProc- an AURenderCallback procinProcUserData- the user data that was provided with the proc when it was previously registered- Returns:
- noErr, or an audio unit error code
-
AudioUnitGetParameter
public static int AudioUnitGetParameter(AudioComponentInstance inUnit, int inID, int inScope, int inElement, org.moe.natj.general.ptr.FloatPtr outValue)
[@function] AudioUnitGetParameter Get the value of a parameter Get the value of a parameter as specified by its ID, scope and element.- Parameters:
inUnit- the audio unitinID- the parameter IDinScope- the scope for the parameterinElement- the element on the scope for the parameteroutValue- Must be non-null, and upon success will contain the current value for the specified parameter- Returns:
- noErr, or an audio unit error code (such as InvalidParameter)
-
AudioUnitSetParameter
public static int AudioUnitSetParameter(AudioComponentInstance inUnit, int inID, int inScope, int inElement, float inValue, int inBufferOffsetInFrames)
[@function] AudioUnitSetParameter Set the value of a parameter Set the value of a parameter as specified by its ID, scope and element. Parameter IDs are consistent across all of the elements in a scope - so for a mixer, the "input volume" parameter can be applied on any input, and the particular input is specified by the elementID.- Parameters:
inUnit- the audio unitinID- the parameter IDinScope- the scope for the parameterinElement- the element on the scope for the parameterinValue- the new value for the parameter.inBufferOffsetInFrames- generally should be set to zero - see AudioUnitScheduleParameters- Returns:
- noErr, or an audio unit error code (such as InvalidParameter)
-
AudioUnitScheduleParameters
public static int AudioUnitScheduleParameters(AudioComponentInstance inUnit, org.moe.natj.general.ptr.VoidPtr inParameterEvent, int inNumParamEvents)
[@function] AudioUnitScheduleParameters Schedule changes to the value of a parameter This API is used to schedule intra-buffer changes to the value of a parameter (immediate) or to ramp a parameter from a start value to an end value for a specified number of samples (ramp) The API allows for the scheduling of multiple parameter events with the one call. All of the parameter events must apply to the current (and only apply to the current) audio unit render call, so the events are scheduled as a part of the pre-render notification callback. When scheduling an immediate parameter event, the new value at the specified sample buffer offset is provided When scheduling a ramped parameter, the ramp is scheduled each audio unit render for the duration of the ramp. Each schedule of the the new audio unit render specifies the progress of the ramp. Parameters that can have events scheduled to them will indicate this through their parameter info struct- Parameters:
inUnit- the audio unitinParameterEvent- a pointer to an array of parameter event structsinNumParamEvents- the number of parameter event structs pointed to by inParameterEvent- Returns:
- noErr, or an audio unit error code (such as InvalidParameter)
-
AudioUnitRender
public static int AudioUnitRender(AudioComponentInstance inUnit, org.moe.natj.general.ptr.IntPtr ioActionFlags, AudioTimeStamp inTimeStamp, int inOutputBusNumber, int inNumberFrames, AudioBufferList ioData)
[@function] AudioUnitRender the render operation where ioData will contain the results of the audio unit's render operations an audio unit will render the amount of audio data described by inNumberOfFrames and the results of that render will be contained within ioData. The caller should provide audio time stamps where at least the sample time is valid and it is incrementing sequentially from its previous call (so, the next time stamp will be the current time stamp + inNumberFrames) If the sample time is not incrementing sequentially, the audio unit will infer that there is some discontinuity with the timeline it is rendering for The caller must provide a valid ioData AudioBufferList that matches the expected topology for the current audio format for the given bus. The buffer list can be of two variants: (1) If the mData pointers are non-null then the audio unit will render its output into those buffers. These buffers should be aligned to 16 byte boundaries (which is normally what malloc will return). (2) If the mData pointers are null, then the audio unit can provide pointers to its own buffers. In this case the audio unit is required to keep those buffers valid for the duration of the calling thread's I/O cycle- Parameters:
inUnit- the audio unitioActionFlags- any appropriate action flags for the render operationinTimeStamp- the time stamp that applies to this particular render operation. when rendering for multiple output buses the time stamp will generally be the same for each output bus, so the audio unit is able to determine without doubt that this the same render operationinOutputBusNumber- the output bus to render forinNumberFrames- the number of sample frames to renderioData- the audio buffer list that the audio unit is to render into.- Returns:
- noErr, or an audio unit render error
-
AudioUnitProcess
public static int AudioUnitProcess(AudioComponentInstance inUnit, org.moe.natj.general.ptr.IntPtr ioActionFlags, AudioTimeStamp inTimeStamp, int inNumberFrames, AudioBufferList ioData)
-
AudioUnitProcessMultiple
public static int AudioUnitProcessMultiple(AudioComponentInstance inUnit, org.moe.natj.general.ptr.IntPtr ioActionFlags, AudioTimeStamp inTimeStamp, int inNumberFrames, int inNumberInputBufferLists, org.moe.natj.general.ptr.Ptr<org.moe.natj.general.ptr.ConstPtr<AudioBufferList>> inInputBufferLists, int inNumberOutputBufferLists, org.moe.natj.general.ptr.Ptr<org.moe.natj.general.ptr.Ptr<AudioBufferList>> ioOutputBufferLists)
-
AudioUnitReset
public static int AudioUnitReset(AudioComponentInstance inUnit, int inScope, int inElement)
[@function] AudioUnitReset reset an audio unit's render state This call will clear any render state of an audio unit. For instance, with a delay or reverb type of audio unit reset will clear any of the delay lines maintained within the audio unit. Typically, this call is made when an audio unit was previously rendering, and was taken out of the render chain (say, the track it is in was muted) and is being added back in (unmuted). The host should reset the audio unit before adding it back so that it doesn't produce audio from its delay lines that is no longer valid. The call should only clear memory, it should NOT allocate or free memory resources (this is done in the Initialize calls).- Parameters:
inUnit- the audio unitinScope- the scope - typically this is set to GlobalScopeinElement- the element - typically this is set to 0- Returns:
- noErr, or an audio unit error
-
AudioOutputUnitPublish
public static int AudioOutputUnitPublish(AudioComponentDescription inDesc, CFStringRef inName, int inVersion, AudioComponentInstance inOutputUnit)
[@function] AudioOutputUnitPublish Register an audio output unit as available to be used as an audio unit by other applications. This allows a publishing application to register its audio (input/)output unit as being able to be redirected and repurposed as an audio unit effect, generator, music device or music effect by another host application.- Parameters:
inOutputUnit- The audio output unit to be published.inDesc- The AudioComponentDescription under which to register the application.inName- The application or component name.- Returns:
- An OSStatus result code.
-
AudioOutputUnitGetHostIcon
public static UIImage AudioOutputUnitGetHostIcon(AudioComponentInstance au, float desiredPointSize)
-
AudioComponentGetIcon
public static UIImage AudioComponentGetIcon(AudioComponent comp, float desiredPointSize)
-
AudioComponentGetLastActiveTime
public static double AudioComponentGetLastActiveTime(AudioComponent comp)
[@function] AudioComponentGetLastActiveTime Fetches the time at which the application publishing the component was last active. Inter-app audio hosts can use this to sort the list of available nodes by how recently the user interacted with them.- Parameters:
comp- The AudioComponent being queried.- Returns:
- The CFAbsoluteTime at which the node was last active (0 if never).
-
AudioOutputUnitStart
public static int AudioOutputUnitStart(AudioComponentInstance ci)
----------------------------------------------------------------------------- Start/stop methods for output units -----------------------------------------------------------------------------
-
AudioOutputUnitStop
public static int AudioOutputUnitStop(AudioComponentInstance ci)
-
GetAudioUnitParameterDisplayType
public static int GetAudioUnitParameterDisplayType(int flags)
-
SetAudioUnitParameterDisplayType
public static int SetAudioUnitParameterDisplayType(int flags, int displayType)
-
MusicDeviceMIDIEvent
public static int MusicDeviceMIDIEvent(AudioComponentInstance inUnit, int inStatus, int inData1, int inData2, int inOffsetSampleFrame)
[@function] MusicDeviceMIDIEvent Used to sent MIDI channel messages to an audio unit This is the API used to send MIDI channel messages to an audio unit. The status and data parameters are used exactly as described by the MIDI specification, including the combination of channel and command in the status byte.- Parameters:
inUnit- The audio unitinStatus- The MIDI status byteinData1- The first MIDI data byte (value is in the range 0 < 128)inData2- The second MIDI data byte (value is in the range 0 < 128). If the MIDI status byte only has one data byte, this should be set to zero.inOffsetSampleFrame- If you are scheduling the MIDI Event from the audio unit's render thread, then you can supply a sample offset that the audio unit may apply when applying that event in its next audio unit render. This allows you to schedule to the sample, the time when a MIDI command is applied and is particularly important when starting new notes. If you are not scheduling in the audio unit's render thread, then you should set this value to 0- Returns:
- noErr, or an audio unit error code
-
MusicDeviceSysEx
public static int MusicDeviceSysEx(AudioComponentInstance inUnit, java.lang.String inData, int inLength)
[@function] MusicDeviceSysEx used to send any non-channel MIDI event to an audio unit This is used to send any non-channel MIDI event to an audio unit. In practise this is a System Exclusive (SysEx) MIDI message- Parameters:
inUnit- The audio unitinData- The complete MIDI SysEx message including the F0 and F7 start and termination bytesinLength- The size, in bytes, of the data- Returns:
- noErr, or an audio unit error code
-
MusicDeviceStartNote
public static int MusicDeviceStartNote(AudioComponentInstance inUnit, int inInstrument, int inGroupID, org.moe.natj.general.ptr.IntPtr outNoteInstanceID, int inOffsetSampleFrame, MusicDeviceNoteParams inParams)
[@function] MusicDeviceStartNote used to start a note This function is used to start a note. The caller must provide a NoteInstanceID to receive a token that is then used to stop the note. The MusicDeviceStopNote call should be used to stop notes started with this API. The token can also be used to address individual notes on the kAudioUnitScope_Note if the audio unit supports it. The instrumentID is no longer used and the kMusicNoteEvent_Unused constant should be specified (this takes the current patch for the specifed group as the sound to use for the note). The Audio unit must provide an unique ID for the note instance ID. This ID must be non-zero and not 0xFFFFFFFF (any other UInt32 value is valid). Not all Music Device audio units implement the semantics of this API (though it is strongly recommended that they do). A host application shoudl query the kMusicDeviceProperty_SupportsStartStopNote to check that this is supported.- Parameters:
inUnit- The audio unitinInstrument- The instrumentID is no longer used and the kMusicNoteEvent_Unused constant should be specified (this takes the current patch for the specifed group as the sound to use for the note)inGroupID- The group ID that this note will be attached too. As with MIDI, all notes sounding on a groupID can be controlled through the various parameters (such as pitch bend, etc) that can be specified on the Group ScopeoutNoteInstanceID- A pointer to receive the token that is used to identify the note. This parameter must be specifiedinOffsetSampleFrame- If you are scheduling the MIDI Event from the audio unit's render thread, then you can supply a sample offset that the audio unit may apply when starting the note in its next audio unit render. This allows you to schedule to the sample and is particularly important when starting new notes. If you are not scheduling in the audio unit's render thread, then you should set this value to 0inParams- The parameters to be used when starting the note - pitch and velocity must be specified- Returns:
- noErr, or an audio unit error code
-
MusicDeviceStopNote
public static int MusicDeviceStopNote(AudioComponentInstance inUnit, int inGroupID, int inNoteInstanceID, int inOffsetSampleFrame)
[@function] MusicDeviceStopNote used to stop notes started with the MusicDeviceStartNote call This call is used to stop notes that have been started with the MusicDeviceStartNote call; both the group ID that the note was started on and the noteInstanceID should be specified.- Parameters:
inUnit- The audio unitinGroupID- the group IDinNoteInstanceID- the note instance IDinOffsetSampleFrame- the sample offset within the next buffer rendered that the note should be turned off at- Returns:
- noErr, or an audio unit error code
-
NewAUGraph
public static int NewAUGraph(org.moe.natj.general.ptr.Ptr<AUGraph> outGraph)
[@function] NewAUGraph Create a new AUGraph- Parameters:
outGraph- the new AUGraph object
-
DisposeAUGraph
public static int DisposeAUGraph(AUGraph inGraph)
[@function] DisposeAUGraph Dispose an AUGraph Deallocates the AUGraph along with its nodes and their resources.- Parameters:
inGraph- the AUGraph object to be disposed
-
AUGraphAddNode
public static int AUGraphAddNode(AUGraph inGraph, AudioComponentDescription inDescription, org.moe.natj.general.ptr.IntPtr outNode)
[@function] AUGraphAddNode Add a node to an AUGraph Creates a node in the graph that is an AudioUnit, using the supplied AudioComponentDescription to find and open that unit.- Parameters:
inGraph- the AUGraph objectinDescription- the AudioComponentDescription used to find and open the AudioUnitoutNode- the newly added node
-
AUGraphRemoveNode
public static int AUGraphRemoveNode(AUGraph inGraph, int inNode)
[@function] AUGraphRemoveNode Remove a node from an AUGraph Nodes can be removed from any thread context. The output node of the AUGraph cannot be removed while the graph is running.- Parameters:
inGraph- the AUGraph objectinNode- the node to be removed
-
AUGraphGetNodeCount
public static int AUGraphGetNodeCount(AUGraph inGraph, org.moe.natj.general.ptr.IntPtr outNumberOfNodes)
[@function] AUGraphGetNodeCount The number of nodes in an AUGraph- Parameters:
inGraph- the AUGraph objectoutNumberOfNodes- the number of nodes
-
AUGraphGetIndNode
public static int AUGraphGetIndNode(AUGraph inGraph, int inIndex, org.moe.natj.general.ptr.IntPtr outNode)
[@function] AUGraphGetIndNode Returns the node at a given index By using AUGraphGetNodeCount in conjunction with this call, you can iterate through the nodes of an AUGraph.- Parameters:
inGraph- the AUGraph objectinIndex- the index of the node to retrieveoutNode- the node at that index
-
AUGraphNodeInfo
public static int AUGraphNodeInfo(AUGraph inGraph, int inNode, AudioComponentDescription outDescription, org.moe.natj.general.ptr.Ptr<AudioComponentInstance> outAudioUnit)
[@function] AUGraphNodeInfo Returns information about a particular AUNode You can pass in NULL for any of the out parameters if you're not interested in that value.- Parameters:
inGraph- the AUGraph objectinNode- the node to queryoutDescription- the component description that would describe the AudioUnit of this nodeoutAudioUnit- the AudioUnit of this node
-
AUGraphConnectNodeInput
public static int AUGraphConnectNodeInput(AUGraph inGraph, int inSourceNode, int inSourceOutputNumber, int inDestNode, int inDestInputNumber)
[@function] AUGraphConnectNodeInput connect a node's output to a node's input
-
AUGraphSetNodeInputCallback
public static int AUGraphSetNodeInputCallback(AUGraph inGraph, int inDestNode, int inDestInputNumber, AURenderCallbackStruct inInputCallback)
[@function] AUGraphSetNodeInputCallback Set a callback for the specified node's specified input.- Parameters:
inInputCallback- The callback that will provide input data to the node
-
AUGraphDisconnectNodeInput
public static int AUGraphDisconnectNodeInput(AUGraph inGraph, int inDestNode, int inDestInputNumber)
[@function] AUGraphDisconnectNodeInput disconnect a node's input This can be used to disconnect either a connection or callback interaction to the specified node input
-
AUGraphClearConnections
public static int AUGraphClearConnections(AUGraph inGraph)
[@function] AUGraphClearConnections clear all of the interactions in a graph This will clear all connections and callback interactions of the nodes of a graph
-
AUGraphGetNumberOfInteractions
public static int AUGraphGetNumberOfInteractions(AUGraph inGraph, org.moe.natj.general.ptr.IntPtr outNumInteractions)
[@function] AUGraphGetNumberOfInteractions Retrieve the number of interactions of a graph The number of node interactions currently being managed by the graph
-
AUGraphGetInteractionInfo
public static int AUGraphGetInteractionInfo(AUGraph inGraph, int inInteractionIndex, org.moe.natj.general.ptr.VoidPtr outInteraction)
[@function] AUGraphGetInteractionInfo Retrieve information about a particular interaction in a graph Returns information about a particular interaction. inInteractionIndex is based on the outNumInteractions value and is only valid if no edits to the graph's state have been made. An app can iterate through the interactions (as with the nodes) of a graph by retrieving the number of interactions, and then iterating an index from 0 < numInteractions- Parameters:
outInteraction- the interaction information at the specified index
-
AUGraphCountNodeInteractions
public static int AUGraphCountNodeInteractions(AUGraph inGraph, int inNode, org.moe.natj.general.ptr.IntPtr outNumInteractions)
[@function] AUGraphCountNodeInteractions Retrieve the number of interactions of a graph's node The number of node interactions currently being managed by the graph for the specified node.
-
AUGraphGetNodeInteractions
public static int AUGraphGetNodeInteractions(AUGraph inGraph, int inNode, org.moe.natj.general.ptr.IntPtr ioNumInteractions, org.moe.natj.general.ptr.VoidPtr outInteractions)
[@function] AUGraphGetNodeInteractions Retrieve information about the interactions in a graph for a given node- Parameters:
ioNumInteractions- on input, specifies the number of interactions that can be returned on output, specifies the number of interactions returned.outInteractions- the interactions the specified node is involved in
-
AUGraphUpdate
public static int AUGraphUpdate(AUGraph inGraph, org.moe.natj.general.ptr.BytePtr outIsUpdated)
[@function] AUGraphUpdate Updates the state of a running AUGraph Call this after performing a series of "edits" on the AUGraph with calls such as AUGraphConnectNodeInput() to finalize those edits. The call will be synchronous if outIsUpdated is NULL, meaning it will block until the changes are incorporated into the graph OR an error is returned from the update process if outIsUpdated is non-NULL, then AUGraphUpdate() will return immediately and outIsUpdated will equal "true" if the changes were already made (no more changes to make) or "false" if changes are still outstanding. Calling from the AUGraphRenderNotification callback: Connection and Disconnection events can be completely processed in the render notification callback of the AUGraph Nodes can also be removed (except for the output node or a sub-graph of the AUGraph) as well. Getting kAUGraphErr_CannotDoInCurrentContext as a result code: If AUGraphUpdate returns this result, then it means it was unable to process the update, due to an inability to safely alter the state of the graph (because another thread was accessing a call that relies on the graph's state having integrity). This result code is only a transitory state, which will pass as soon as your other thread's call to AUGraph (that has the lock) completes. If an error is encountered in the process of an update (say an invalid connection is attempted, a disconnection between nodes that are not connected, etc) on a running graph, then the call will return that error code. It only process events whilst it receives no error results. Thus, if an error is encountered, other events will not be processed until AUGraphUpdate is called again. This is done, in cases where the state of the graph could become inconsistent if further events were processed, so this decision is left up to you. The same applies to the "cant do" error - you have to explicitly call AUGraphUpdate again to have the processing of the events occur.- Parameters:
outIsUpdated- if specified returns true if all of the edits were applied to the graph
-
AUGraphOpen
public static int AUGraphOpen(AUGraph inGraph)
[@function] AUGraphOpen Open a graph AudioUnits are open but not initialized (no resource allocation occurs here)
-
AUGraphClose
public static int AUGraphClose(AUGraph inGraph)
[@function] AUGraphClose Close a graph All AudioUnits are closed - leaving only its nodal representation
-
AUGraphInitialize
public static int AUGraphInitialize(AUGraph inGraph)
[@function] AUGraphInitialize Initialise a graph AudioUnitInitialize() is called on each opened node/AudioUnit (get ready to render) and SubGraph that are involved in a interaction. If the node is not involved, it is initialised after it becomes involved in an interaction. A graph must be opened before it can be initialised.
-
AUGraphUninitialize
public static int AUGraphUninitialize(AUGraph inGraph)
[@function] AUGraphUninitialize Uninitialise a graph The member of the graph are uninitialised
-
AUGraphStart
public static int AUGraphStart(AUGraph inGraph)
[@function] AUGraphStart Start a graph Start() is called on the "head" node(s) of the AUGraph (now rendering starts) The graph must be initialised before it can be started.
-
AUGraphStop
public static int AUGraphStop(AUGraph inGraph)
[@function] AUGraphStop Stop a graph Stop() is called on the "head" node(s) of the AUGraph (rendering is stopped)
-
AUGraphIsOpen
public static int AUGraphIsOpen(AUGraph inGraph, org.moe.natj.general.ptr.BytePtr outIsOpen)
[@function] AUGraphIsOpen Is the graph open
-
AUGraphIsInitialized
public static int AUGraphIsInitialized(AUGraph inGraph, org.moe.natj.general.ptr.BytePtr outIsInitialized)
[@function] AUGraphIsInitialized Is the graph initialised
-
AUGraphIsRunning
public static int AUGraphIsRunning(AUGraph inGraph, org.moe.natj.general.ptr.BytePtr outIsRunning)
[@function] AUGraphIsRunning Is the graph running (has it been started)
-
AUGraphGetCPULoad
public static int AUGraphGetCPULoad(AUGraph inGraph, org.moe.natj.general.ptr.FloatPtr outAverageCPULoad)
[@function] AUGraphGetCPULoad The CPU load of the graph Returns a short-term running average of the current CPU load of the graph.
-
AUGraphGetMaxCPULoad
public static int AUGraphGetMaxCPULoad(AUGraph inGraph, org.moe.natj.general.ptr.FloatPtr outMaxLoad)
[@function] AUGraphGetMaxCPULoad The Maximum CPU load of the graph Returns the max CPU load of the graph since this call was last made or the graph was last started.
-
AUGraphAddRenderNotify
public static int AUGraphAddRenderNotify(AUGraph inGraph, AudioToolbox.Function_AUGraphAddRenderNotify inCallback, org.moe.natj.general.ptr.VoidPtr inRefCon)
[@function] AUGraphAddRenderNotify Add a notification callback Add a callback that the graph will call every time the graph renders. The callback will be called once before the graph's render operation, and once after the render operation is complete.
-
AUGraphRemoveRenderNotify
public static int AUGraphRemoveRenderNotify(AUGraph inGraph, AudioToolbox.Function_AUGraphRemoveRenderNotify inCallback, org.moe.natj.general.ptr.VoidPtr inRefCon)
[@function] AUGraphRemoveRenderNotify Remove a notification callback Remove a previously added callback. You must provide both the callback and the refCon that was used previously to add the callback.
-
AudioConverterNew
public static int AudioConverterNew(AudioStreamBasicDescription inSourceFormat, AudioStreamBasicDescription inDestinationFormat, org.moe.natj.general.ptr.Ptr<AudioConverterRef> outAudioConverter)
----------------------------------------------------------------------------- [@function] AudioConverterNew Create a new AudioConverter.- Parameters:
inSourceFormat- The format of the source audio to be converted.inDestinationFormat- The destination format to which the audio is to be converted.outAudioConverter- On successful return, points to a new AudioConverter instance.- Returns:
- An OSStatus result code.
For a pair of linear PCM formats, the following conversions
are supported:
- addition and removal of channels, when the stream descriptions' mChannelsPerFrame does not match. Channels may also be reordered and removed using the kAudioConverterChannelMap property.
- sample rate conversion
- interleaving/deinterleaving, when the stream descriptions' (mFormatFlags & kAudioFormatFlagIsNonInterleaved) does not match.
- conversion between any pair of the following formats:
- 8 bit integer, signed or unsigned
- 16, 24, or 32-bit integer, big- or little-endian. Other integral bit depths, if high-aligned and non-packed, are also supported
- 32 and 64-bit float, big- or little-endian.
-
AudioConverterNewSpecific
public static int AudioConverterNewSpecific(AudioStreamBasicDescription inSourceFormat, AudioStreamBasicDescription inDestinationFormat, int inNumberClassDescriptions, AudioClassDescription inClassDescriptions, org.moe.natj.general.ptr.Ptr<AudioConverterRef> outAudioConverter)
----------------------------------------------------------------------------- [@function] AudioConverterNewSpecific Create a new AudioConverter using specific codecs.- Parameters:
inSourceFormat- The format of the source audio to be converted.inDestinationFormat- The destination format to which the audio is to be converted.inNumberClassDescriptions- The number of class descriptions.inClassDescriptions- AudioClassDescriptions specifiying the codec to instantiate.outAudioConverter- On successful return, points to a new AudioConverter instance.- Returns:
- An OSStatus result code. This function is identical to AudioConverterNew(), except that the client may explicitly choose which codec to instantiate if there is more than one choice.
-
AudioConverterDispose
public static int AudioConverterDispose(AudioConverterRef inAudioConverter)
----------------------------------------------------------------------------- [@function] AudioConverterDispose Destroy an AudioConverter.- Parameters:
inAudioConverter- The AudioConverter to dispose.- Returns:
- An OSStatus result code.
-
AudioConverterReset
public static int AudioConverterReset(AudioConverterRef inAudioConverter)
----------------------------------------------------------------------------- [@function] AudioConverterReset Reset an AudioConverter- Parameters:
inAudioConverter- The AudioConverter to reset.- Returns:
- An OSStatus result code. Should be called whenever there is a discontinuity in the source audio stream being provided to the converter. This will flush any internal buffers in the converter.
-
AudioConverterGetPropertyInfo
public static int AudioConverterGetPropertyInfo(AudioConverterRef inAudioConverter, int inPropertyID, org.moe.natj.general.ptr.IntPtr outSize, org.moe.natj.general.ptr.BytePtr outWritable)
----------------------------------------------------------------------------- [@function] AudioConverterGetPropertyInfo Returns information about an AudioConverter property.- Parameters:
inAudioConverter- The AudioConverter to query.inPropertyID- The property to query.outSize- If non-null, on exit, the maximum size of the property value in bytes.outWritable- If non-null, on exit, indicates whether the property value is writable.- Returns:
- An OSStatus result code.
-
AudioConverterGetProperty
public static int AudioConverterGetProperty(AudioConverterRef inAudioConverter, int inPropertyID, org.moe.natj.general.ptr.IntPtr ioPropertyDataSize, org.moe.natj.general.ptr.VoidPtr outPropertyData)
----------------------------------------------------------------------------- [@function] AudioConverterGetProperty Returns an AudioConverter property value.- Parameters:
inAudioConverter- The AudioConverter to query.inPropertyID- The property to fetch.ioPropertyDataSize- On entry, the size of the memory pointed to by outPropertyData. On successful exit, the size of the property value.outPropertyData- On exit, the property value.- Returns:
- An OSStatus result code.
-
AudioConverterSetProperty
public static int AudioConverterSetProperty(AudioConverterRef inAudioConverter, int inPropertyID, int inPropertyDataSize, org.moe.natj.general.ptr.ConstVoidPtr inPropertyData)
----------------------------------------------------------------------------- [@function] AudioConverterSetProperty Sets an AudioConverter property value.- Parameters:
inAudioConverter- The AudioConverter to modify.inPropertyID- The property to set.inPropertyDataSize- The size in bytes of the property value.inPropertyData- Points to the new property value.- Returns:
- An OSStatus result code.
-
AudioConverterConvertBuffer
public static int AudioConverterConvertBuffer(AudioConverterRef inAudioConverter, int inInputDataSize, org.moe.natj.general.ptr.ConstVoidPtr inInputData, org.moe.natj.general.ptr.IntPtr ioOutputDataSize, org.moe.natj.general.ptr.VoidPtr outOutputData)
----------------------------------------------------------------------------- [@function] AudioConverterConvertBuffer Converts data from an input buffer to an output buffer.- Parameters:
inAudioConverter- The AudioConverter to use.inInputDataSize- The size of the buffer inInputData.inInputData- The input audio data buffer.ioOutputDataSize- On entry, the size of the buffer outOutputData. On exit, the number of bytes written to outOutputData.outOutputData- The output data buffer.- Returns:
- Produces a buffer of output data from an AudioConverter, using the supplied input buffer. WARNING: this function will fail for any conversion where there is a variable relationship between the input and output data buffer sizes. This includes sample rate conversions and most compressed formats. In these cases, use AudioConverterFillComplexBuffer. Generally this function is only appropriate for PCM-to-PCM conversions where there is no sample rate conversion.
-
AudioConverterFillComplexBuffer
public static int AudioConverterFillComplexBuffer(AudioConverterRef inAudioConverter, AudioToolbox.Function_AudioConverterFillComplexBuffer inInputDataProc, org.moe.natj.general.ptr.VoidPtr inInputDataProcUserData, org.moe.natj.general.ptr.IntPtr ioOutputDataPacketSize, AudioBufferList outOutputData, AudioStreamPacketDescription outPacketDescription)
----------------------------------------------------------------------------- [@function] AudioConverterFillComplexBuffer Converts data supplied by an input callback function, supporting non-interleaved and packetized formats.- Parameters:
inAudioConverter- The AudioConverter to use.inInputDataProc- A callback function which supplies the input data.inInputDataProcUserData- A value for the use of the callback function.ioOutputDataPacketSize- On entry, the capacity of outOutputData expressed in packets in the converter's output format. On exit, the number of packets of converted data that were written to outOutputData.outOutputData- The converted output data is written to this buffer.outPacketDescription- If non-null, and the converter's output uses packet descriptions, then packet descriptions are written to this array. It must point to a memory block capable of holding *ioOutputDataPacketSize packet descriptions. (See AudioFormat.h for ways to determine whether an audio format uses packet descriptions).- Returns:
- An OSStatus result code. Produces a buffer list of output data from an AudioConverter. The supplied input callback function is called whenever necessary.
-
AudioConverterConvertComplexBuffer
public static int AudioConverterConvertComplexBuffer(AudioConverterRef inAudioConverter, int inNumberPCMFrames, AudioBufferList inInputData, AudioBufferList outOutputData)
----------------------------------------------------------------------------- [@function] AudioConverterConvertComplexBuffer Converts PCM data from an input buffer list to an output buffer list. [@warning] This function will fail for any conversion where there is a variable relationship between the input and output data buffer sizes. This includes sample rate conversions and most compressed formats. In these cases, use AudioConverterFillComplexBuffer. Generally this function is only appropriate for PCM-to-PCM conversions where there is no sample rate conversion.- Parameters:
inAudioConverter- The AudioConverter to use.inNumberPCMFrames- The number of PCM frames to convert.inInputData- The source audio buffer list.outOutputData- The converted output data is written to this buffer list.- Returns:
- An OSStatus result code.
-
NumBytesToNumAudioFileMarkers
public static long NumBytesToNumAudioFileMarkers(long inNumBytes)
-
NumAudioFileMarkersToNumBytes
public static long NumAudioFileMarkersToNumBytes(long inNumMarkers)
-
NextAudioFileRegion
public static AudioFileRegion NextAudioFileRegion(AudioFileRegion inAFRegionPtr)
-
AudioFileCreateWithURL
public static int AudioFileCreateWithURL(CFURLRef inFileRef, int inFileType, AudioStreamBasicDescription inFormat, int inFlags, org.moe.natj.general.ptr.Ptr<AudioFileID> outAudioFile)
[@function] AudioFileCreateWithURL creates a new audio file (or initialises an existing file) creates a new (or initialises an existing) audio file specified by the URL. Upon success, an AudioFileID is returned which can be used for subsequent calls to the AudioFile APIs.- Parameters:
inFileRef- an CFURLRef fully specifying the path of the file to create/initialiseinFileType- an AudioFileTypeID indicating the type of audio file to create.inFormat- an AudioStreamBasicDescription describing the data format that will be added to the audio file.inFlags- relevant flags for creating/opening the file. if kAudioFileFlags_EraseFile is set, it will erase an existing file if not set, then the Create call will fail if the URL is an existing fileoutAudioFile- if successful, an AudioFileID that can be used for subsequent AudioFile calls.- Returns:
- returns noErr if successful.
-
AudioFileOpenURL
public static int AudioFileOpenURL(CFURLRef inFileRef, byte inPermissions, int inFileTypeHint, org.moe.natj.general.ptr.Ptr<AudioFileID> outAudioFile)
[@function] AudioFileOpenURL Open an existing audio file. Open an existing audio file for reading or reading and writing.- Parameters:
inFileRef- the CFURLRef of an existing audio file.inPermissions- use the permission constantsinFileTypeHint- For files which have no filename extension and whose type cannot be easily or uniquely determined from the data (ADTS,AC3), this hint can be used to indicate the file type. Otherwise you can pass zero for this. The hint is only used on OS versions 10.3.1 or greater. For OS versions prior to that, opening files of the above description will fail.outAudioFile- upon success, an AudioFileID that can be used for subsequent AudioFile calls.- Returns:
- returns noErr if successful.
-
AudioFileInitializeWithCallbacks
public static int AudioFileInitializeWithCallbacks(org.moe.natj.general.ptr.VoidPtr inClientData, AudioToolbox.Function_AudioFileInitializeWithCallbacks_1 inReadFunc, AudioToolbox.Function_AudioFileInitializeWithCallbacks_2 inWriteFunc, AudioToolbox.Function_AudioFileInitializeWithCallbacks_3 inGetSizeFunc, AudioToolbox.Function_AudioFileInitializeWithCallbacks_4 inSetSizeFunc, int inFileType, AudioStreamBasicDescription inFormat, int inFlags, org.moe.natj.general.ptr.Ptr<AudioFileID> outAudioFile)[@function] AudioFileInitializeWithCallbacks Wipe clean an existing file. You provide callbacks that the AudioFile API will use to get the data.- Parameters:
inClientData- a constant that will be passed to your callbacks.inReadFunc- a function that will be called when AudioFile needs to read data.inWriteFunc- a function that will be called when AudioFile needs to write data.inGetSizeFunc- a function that will be called when AudioFile needs to know the file size.inSetSizeFunc- a function that will be called when AudioFile needs to set the file size.inFileType- an AudioFileTypeID indicating the type of audio file to which to initialize the file.inFormat- an AudioStreamBasicDescription describing the data format that will be added to the audio file.inFlags- flags for creating/opening the file. Currently zero.outAudioFile- upon success, an AudioFileID that can be used for subsequent AudioFile calls.- Returns:
- returns noErr if successful.
-
AudioFileOpenWithCallbacks
public static int AudioFileOpenWithCallbacks(org.moe.natj.general.ptr.VoidPtr inClientData, AudioToolbox.Function_AudioFileOpenWithCallbacks_1 inReadFunc, AudioToolbox.Function_AudioFileOpenWithCallbacks_2 inWriteFunc, AudioToolbox.Function_AudioFileOpenWithCallbacks_3 inGetSizeFunc, AudioToolbox.Function_AudioFileOpenWithCallbacks_4 inSetSizeFunc, int inFileTypeHint, org.moe.natj.general.ptr.Ptr<AudioFileID> outAudioFile)[@function] AudioFileOpenWithCallbacks Open an existing file. You provide callbacks that the AudioFile API will use to get the data.- Parameters:
inClientData- a constant that will be passed to your callbacks.inReadFunc- a function that will be called when AudioFile needs to read data.inWriteFunc- a function that will be called when AudioFile needs to write data.inGetSizeFunc- a function that will be called when AudioFile needs to know the total file size.inSetSizeFunc- a function that will be called when AudioFile needs to set the file size.inFileTypeHint- For files which have no filename extension and whose type cannot be easily or uniquely determined from the data (ADTS,AC3), this hint can be used to indicate the file type. Otherwise you can pass zero for this. The hint is only used on OS versions 10.3.1 or greater. For OS versions prior to that, opening files of the above description will fail.outAudioFile- upon success, an AudioFileID that can be used for subsequent AudioFile calls.- Returns:
- returns noErr if successful.
-
AudioFileClose
public static int AudioFileClose(AudioFileID inAudioFile)
[@function] AudioFileClose Close an existing audio file.- Parameters:
inAudioFile- an AudioFileID.- Returns:
- returns noErr if successful.
-
AudioFileOptimize
public static int AudioFileOptimize(AudioFileID inAudioFile)
[@function] AudioFileOptimize Move the audio data to the end of the file and other internal optimizations of the file structure. Optimize the file so additional audio data can be appended to the existing data. Generally, this will place the audio data at the end of the file so additional writes can be placed to the file end. This can be a potentially expensive and time-consuming operation and should not be used during time critical operations. There is a kAudioFilePropertyIsOptimized property for checking on the optimized state of the file.- Parameters:
inAudioFile- an AudioFileID.- Returns:
- returns noErr if successful.
-
AudioFileReadBytes
public static int AudioFileReadBytes(AudioFileID inAudioFile, byte inUseCache, long inStartingByte, org.moe.natj.general.ptr.IntPtr ioNumBytes, org.moe.natj.general.ptr.VoidPtr outBuffer)
[@function] AudioFileReadBytes Read bytes of audio data from the audio file. Returns kAudioFileEndOfFileError when read encounters end of file.- Parameters:
inAudioFile- an AudioFileID.inUseCache- true if it is desired to cache the data upon read, else falseinStartingByte- the byte offset of the audio data desired to be returnedioNumBytes- on input, the number of bytes to read, on output, the number of bytes actually read.outBuffer- outBuffer should be a void * to user allocated memory large enough for the requested bytes.- Returns:
- returns noErr if successful.
-
AudioFileWriteBytes
public static int AudioFileWriteBytes(AudioFileID inAudioFile, byte inUseCache, long inStartingByte, org.moe.natj.general.ptr.IntPtr ioNumBytes, org.moe.natj.general.ptr.ConstVoidPtr inBuffer)
[@function] AudioFileWriteBytes Write bytes of audio data to the audio file.- Parameters:
inAudioFile- an AudioFileID.inUseCache- true if it is desired to cache the data upon write, else falseinStartingByte- the byte offset where the audio data should be writtenioNumBytes- on input, the number of bytes to write, on output, the number of bytes actually written.inBuffer- inBuffer should be a void * containing the bytes to be written- Returns:
- returns noErr if successful.
-
AudioFileReadPacketData
public static int AudioFileReadPacketData(AudioFileID inAudioFile, byte inUseCache, org.moe.natj.general.ptr.IntPtr ioNumBytes, org.moe.natj.general.ptr.Ptr<AudioStreamPacketDescription> outPacketDescriptions, long inStartingPacket, org.moe.natj.general.ptr.IntPtr ioNumPackets, org.moe.natj.general.ptr.VoidPtr outBuffer)
[@function] AudioFileReadPacketData Read packets of audio data from the audio file. AudioFileReadPacketData reads as many of the requested number of packets as will fit in the buffer size given by ioNumPackets. Unlike the deprecated AudioFileReadPackets, ioNumPackets must be initialized. If the byte size of the number packets requested is less than the buffer size, ioNumBytes will be reduced. If the buffer is too small for the number of packets requested, ioNumPackets and ioNumBytes will be reduced to the number of packets that can be accommodated and their byte size. Returns kAudioFileEndOfFileError when read encounters end of file. For all uncompressed formats, packets == frames.- Parameters:
inAudioFile- an AudioFileID.inUseCache- true if it is desired to cache the data upon read, else falseioNumBytes- on input the size of outBuffer in bytes. on output, the number of bytes actually returned.outPacketDescriptions- An array of packet descriptions describing the packets being returned. The size of the array must be greater or equal to the number of packets requested. On return the packet description will be filled out with the packet offsets and sizes. Packet descriptions are ignored for CBR data.inStartingPacket- The packet index of the first packet desired to be returnedioNumPackets- on input, the number of packets to read, on output, the number of packets actually read.outBuffer- outBuffer should be a pointer to user allocated memory.- Returns:
- returns noErr if successful.
-
AudioFileReadPackets
@Deprecated public static int AudioFileReadPackets(AudioFileID inAudioFile, byte inUseCache, org.moe.natj.general.ptr.IntPtr outNumBytes, org.moe.natj.general.ptr.Ptr<AudioStreamPacketDescription> outPacketDescriptions, long inStartingPacket, org.moe.natj.general.ptr.IntPtr ioNumPackets, org.moe.natj.general.ptr.VoidPtr outBuffer)
Deprecated.[@function] AudioFileReadPackets Read packets of audio data from the audio file. AudioFileReadPackets is DEPRECATED. Use AudioFileReadPacketData instead. READ THE HEADER DOC FOR AudioFileReadPacketData. It is not a drop-in replacement. In particular, for AudioFileReadPacketData ioNumBytes must be initialized to the buffer size. AudioFileReadPackets assumes you have allocated your buffer to ioNumPackets times the maximum packet size. For many compressed formats this will only use a portion of the buffer since the ratio of the maximum packet size to the typical packet size can be large. Use AudioFileReadPacketData instead.- Parameters:
inAudioFile- an AudioFileID.inUseCache- true if it is desired to cache the data upon read, else falseoutNumBytes- on output, the number of bytes actually returnedoutPacketDescriptions- on output, an array of packet descriptions describing the packets being returned. NULL may be passed for this parameter. Nothing will be returned for linear pcm data.inStartingPacket- the packet index of the first packet desired to be returnedioNumPackets- on input, the number of packets to read, on output, the number of packets actually read.outBuffer- outBuffer should be a pointer to user allocated memory of size: number of packets requested times file's maximum (or upper bound on) packet size.- Returns:
- returns noErr if successful.
-
AudioFileWritePackets
public static int AudioFileWritePackets(AudioFileID inAudioFile, byte inUseCache, int inNumBytes, org.moe.natj.general.ptr.ConstPtr<AudioStreamPacketDescription> inPacketDescriptions, long inStartingPacket, org.moe.natj.general.ptr.IntPtr ioNumPackets, org.moe.natj.general.ptr.ConstVoidPtr inBuffer)
[@function] AudioFileWritePackets Write packets of audio data to the audio file. For all uncompressed formats, packets == frames.- Parameters:
inAudioFile- an AudioFileID.inUseCache- true if it is desired to cache the data upon write, else falseinNumBytes- the number of bytes being provided for writeinPacketDescriptions- an array of packet descriptions describing the packets being provided. Not all formats require packet descriptions to be provided. NULL may be passed if no descriptions are required.inStartingPacket- the packet index of where the first packet provided should be placed.ioNumPackets- on input, the number of packets to write, on output, the number of packets actually written.inBuffer- a void * to user allocated memory containing the packets to write.- Returns:
- returns noErr if successful.
-
AudioFileCountUserData
public static int AudioFileCountUserData(AudioFileID inAudioFile, int inUserDataID, org.moe.natj.general.ptr.IntPtr outNumberItems)
[@function] AudioFileCountUserData Get the number of user data items with a certain ID in the file "User Data" refers to chunks in AIFF, CAF and WAVE files, or resources in Sound Designer II files, and possibly other things in other files. For simplicity, referred to below as "chunks".- Parameters:
inAudioFile- an AudioFileID.inUserDataID- the four char code of the chunk.outNumberItems- on output, if successful, number of chunks of this type in the file.- Returns:
- returns noErr if successful.
-
AudioFileGetUserDataSize
public static int AudioFileGetUserDataSize(AudioFileID inAudioFile, int inUserDataID, int inIndex, org.moe.natj.general.ptr.IntPtr outUserDataSize)
[@function] AudioFileGetUserDataSize Get the size of user data in a file- Parameters:
inAudioFile- an AudioFileID.inUserDataID- the four char code of the chunk.inIndex- an index specifying which chunk if there are more than one.outUserDataSize- on output, if successful, the size of the user data chunk.- Returns:
- returns noErr if successful.
-
AudioFileGetUserData
public static int AudioFileGetUserData(AudioFileID inAudioFile, int inUserDataID, int inIndex, org.moe.natj.general.ptr.IntPtr ioUserDataSize, org.moe.natj.general.ptr.VoidPtr outUserData)
[@function] AudioFileGetUserData Get the data of a chunk in a file.- Parameters:
inAudioFile- an AudioFileID.inUserDataID- the four char code of the chunk.inIndex- an index specifying which chunk if there are more than one.ioUserDataSize- the size of the buffer on input, size of bytes copied to buffer on outputoutUserData- a pointer to a buffer in which to copy the chunk data.- Returns:
- returns noErr if successful.
-
AudioFileSetUserData
public static int AudioFileSetUserData(AudioFileID inAudioFile, int inUserDataID, int inIndex, int inUserDataSize, org.moe.natj.general.ptr.ConstVoidPtr inUserData)
[@function] AudioFileSetUserData Set the data of a chunk in a file.- Parameters:
inAudioFile- an AudioFileID.inUserDataID- the four char code of the chunk.inIndex- an index specifying which chunk if there are more than one.inUserDataSize- on input the size of the data to copy, on output, size of bytes copied from the bufferinUserData- a pointer to a buffer from which to copy the chunk data (only the contents of the chunk, not including the chunk header).- Returns:
- returns noErr if successful.
-
AudioFileRemoveUserData
public static int AudioFileRemoveUserData(AudioFileID inAudioFile, int inUserDataID, int inIndex)
[@function] AudioFileRemoveUserData Remove a user chunk in a file.- Parameters:
inAudioFile- an AudioFileID.inUserDataID- the four char code of the chunk.inIndex- an index specifying which chunk if there are more than one.- Returns:
- returns noErr if successful.
-
AudioFileGetPropertyInfo
public static int AudioFileGetPropertyInfo(AudioFileID inAudioFile, int inPropertyID, org.moe.natj.general.ptr.IntPtr outDataSize, org.moe.natj.general.ptr.IntPtr isWritable)
[@function] AudioFileGetPropertyInfo Get information about the size of a property of an AudioFile and whether it can be set.- Parameters:
inAudioFile- an AudioFileID.inPropertyID- an AudioFileProperty constant.outDataSize- the size in bytes of the current value of the property. In order to get the property value, you will need a buffer of this size.isWritable- will be set to 1 if writable, or 0 if read only.- Returns:
- returns noErr if successful.
-
AudioFileGetProperty
public static int AudioFileGetProperty(AudioFileID inAudioFile, int inPropertyID, org.moe.natj.general.ptr.IntPtr ioDataSize, org.moe.natj.general.ptr.VoidPtr outPropertyData)
[@function] AudioFileGetProperty Copies the value for a property of an AudioFile into a buffer.- Parameters:
inAudioFile- an AudioFileID.inPropertyID- an AudioFileProperty constant.ioDataSize- on input the size of the outPropertyData buffer. On output the number of bytes written to the buffer.outPropertyData- the buffer in which to write the property data.- Returns:
- returns noErr if successful.
-
AudioFileSetProperty
public static int AudioFileSetProperty(AudioFileID inAudioFile, int inPropertyID, int inDataSize, org.moe.natj.general.ptr.ConstVoidPtr inPropertyData)
[@function] AudioFileSetProperty Sets the value for a property of an AudioFile .- Parameters:
inAudioFile- an AudioFileID.inPropertyID- an AudioFileProperty constant.inDataSize- the size of the property data.inPropertyData- the buffer containing the property data.- Returns:
- returns noErr if successful.
-
AudioFileGetGlobalInfoSize
public static int AudioFileGetGlobalInfoSize(int inPropertyID, int inSpecifierSize, org.moe.natj.general.ptr.VoidPtr inSpecifier, org.moe.natj.general.ptr.IntPtr outDataSize)[@function] AudioFileGetGlobalInfoSize Get the size of a global property.- Parameters:
inPropertyID- an AudioFileGlobalInfo property constant.inSpecifierSize- The size of the specifier data.inSpecifier- A specifier is a buffer of data used as an input argument to some of the global info properties.outDataSize- the size in bytes of the current value of the property. In order to get the property value, you will need a buffer of this size.- Returns:
- returns noErr if successful.
-
AudioFileGetGlobalInfo
public static int AudioFileGetGlobalInfo(int inPropertyID, int inSpecifierSize, org.moe.natj.general.ptr.VoidPtr inSpecifier, org.moe.natj.general.ptr.IntPtr ioDataSize, org.moe.natj.general.ptr.VoidPtr outPropertyData)[@function] AudioFileGetGlobalInfo Copies the value for a global property into a buffer.- Parameters:
inPropertyID- an AudioFileGlobalInfo property constant.inSpecifierSize- The size of the specifier data.inSpecifier- A specifier is a buffer of data used as an input argument to some of the global info properties.ioDataSize- on input the size of the outPropertyData buffer. On output the number of bytes written to the buffer.outPropertyData- the buffer in which to write the property data.- Returns:
- returns noErr if successful.
-
AudioFileStreamOpen
public static int AudioFileStreamOpen(org.moe.natj.general.ptr.VoidPtr inClientData, AudioToolbox.Function_AudioFileStreamOpen_1 inPropertyListenerProc, AudioToolbox.Function_AudioFileStreamOpen_2 inPacketsProc, int inFileTypeHint, org.moe.natj.general.ptr.Ptr<AudioFileStreamID> outAudioFileStream)[@function] AudioFileStreamOpen Create a new audio file stream parser. The client provides the parser with data and the parser calls callbacks when interesting things are found in the data, such as properties and audio packets.- Parameters:
inClientData- a constant that will be passed to your callbacks.inPropertyListenerProc- Whenever the value of a property is parsed in the data, this function will be called. You can then get the value of the property from in the callback. In some cases, due to boundaries in the input data, the property may return kAudioFileStreamError_DataUnavailable. When unavailable data is requested from within the property listener, the parser will begin caching the property value and will call the property listener again when the property is available. For property values for which kAudioFileStreamPropertyFlag_PropertyIsCached is unset, this will be the only opportunity to get the value of the property, since the data will be disposed upon return of the property listener callback.inPacketsProc- Whenever packets are parsed in the data, a pointer to the packets is passed to the client using this callback. At times only a single packet may be passed due to boundaries in the input data.inFileTypeHint- For files whose type cannot be easily or uniquely determined from the data (ADTS,AC3), this hint can be used to indicate the file type. Otherwise if you do not know the file type, you can pass zero.outAudioFileStream- A new file stream ID for use in other AudioFileStream API calls.
-
AudioFileStreamParseBytes
public static int AudioFileStreamParseBytes(AudioFileStreamID inAudioFileStream, int inDataByteSize, org.moe.natj.general.ptr.ConstVoidPtr inData, int inFlags)
[@function] AudioFileStreamParseBytes This call is the means for streams to supply data to the parser. Data is expected to be passed in sequentially from the beginning of the file, without gaps. In the course of parsing, the client's property and/or packets callbacks may be called. At the end of the stream, this function must be called once with null data pointer and zero data byte size to flush any remaining packets out of the parser.- Parameters:
inAudioFileStream- The file stream IDinDataByteSize- The number of bytes passed in for parsing. Must be zero when flushing the parser.inData- The data passed in to be parsed. Must be null when flushing the parser.inFlags- If there is a data discontinuity, then kAudioFileStreamParseFlag_Discontinuity should be set true.
-
AudioFileStreamSeek
public static int AudioFileStreamSeek(AudioFileStreamID inAudioFileStream, long inPacketOffset, org.moe.natj.general.ptr.LongPtr outDataByteOffset, org.moe.natj.general.ptr.IntPtr ioFlags)
[@function] AudioFileStreamSeek This call is used to seek in the data stream. The client passes in a packet offset to seek to and the parser passes back a byte offset from which to get the data to satisfy that request. The data passed to the next call to AudioFileParseBytes will be assumed to be from that byte offset. For file formats which do not contain packet tables the byte offset may be an estimate. If so, the flag kAudioFileStreamSeekFlag_OffsetIsEstimated will be true.- Parameters:
inAudioFileStream- The file stream IDinPacketOffset- The offset from the beginning of the file of the packet to which to seek.outDataByteOffset- The byte offset of the data from the file's data offset returned. You need to add the value of kAudioFileStreamProperty_DataOffset to get an absolute byte offset in the file.ioFlags- If outDataByteOffset is an estimate, then kAudioFileStreamSeekFlag_OffsetIsEstimated will be set on output. There are currently no flags defined for passing into this call.
-
AudioFileStreamGetPropertyInfo
public static int AudioFileStreamGetPropertyInfo(AudioFileStreamID inAudioFileStream, int inPropertyID, org.moe.natj.general.ptr.IntPtr outPropertyDataSize, org.moe.natj.general.ptr.BytePtr outWritable)
[@function] AudioFileStreamGetPropertyInfo Retrieve the info about the given property. The outSize argument will return the size in bytes of the current value of the property.- Parameters:
inAudioFileStream- The file stream IDinPropertyID- Property ID whose value should be readoutPropertyDataSize- Size in bytes of the propertyoutWritable- whether the property is writable- Returns:
- an OSStatus return code
-
AudioFileStreamGetProperty
public static int AudioFileStreamGetProperty(AudioFileStreamID inAudioFileStream, int inPropertyID, org.moe.natj.general.ptr.IntPtr ioPropertyDataSize, org.moe.natj.general.ptr.VoidPtr outPropertyData)
[@function] AudioFileStreamGetProperty Retrieve the indicated property data.- Parameters:
inAudioFileStream- The file stream IDinPropertyID- Property ID whose value should be readioPropertyDataSize- On input, the size of the buffer pointed to by outPropertyData. On output, the number of bytes written.outPropertyData- Pointer to the property data buffer- Returns:
- an OSStatus return code
-
AudioFileStreamSetProperty
public static int AudioFileStreamSetProperty(AudioFileStreamID inAudioFileStream, int inPropertyID, int inPropertyDataSize, org.moe.natj.general.ptr.ConstVoidPtr inPropertyData)
[@function] AudioFileStreamSetProperty Set the value of the property. There are currently no settable properties.- Parameters:
inAudioFileStream- The file stream IDinPropertyID- Property ID whose value should be setinPropertyDataSize- Size in bytes of the property datainPropertyData- Pointer to the property data buffer- Returns:
- an OSStatus return code
-
AudioFileStreamClose
public static int AudioFileStreamClose(AudioFileStreamID inAudioFileStream)
[@function] AudioFileStreamClose Close and deallocate the file stream object.- Parameters:
inAudioFileStream- The file stream ID
-
AudioFormatGetPropertyInfo
public static int AudioFormatGetPropertyInfo(int inPropertyID, int inSpecifierSize, org.moe.natj.general.ptr.ConstVoidPtr inSpecifier, org.moe.natj.general.ptr.IntPtr outPropertyDataSize)[@function] AudioFormatGetPropertyInfo Retrieve information about the given property- Parameters:
inPropertyID- an AudioFormatPropertyID constant.inSpecifierSize- The size of the specifier data.inSpecifier- A specifier is a buffer of data used as an input argument to some of the properties.outPropertyDataSize- The size in bytes of the current value of the property. In order to get the property value, you will need a buffer of this size.- Returns:
- returns noErr if successful.
-
AudioFormatGetProperty
public static int AudioFormatGetProperty(int inPropertyID, int inSpecifierSize, org.moe.natj.general.ptr.ConstVoidPtr inSpecifier, org.moe.natj.general.ptr.IntPtr ioPropertyDataSize, org.moe.natj.general.ptr.VoidPtr outPropertyData)[@function] AudioFormatGetProperty Retrieve the indicated property data- Parameters:
inPropertyID- an AudioFormatPropertyID constant.inSpecifierSize- The size of the specifier data.inSpecifier- A specifier is a buffer of data used as an input argument to some of the properties.ioPropertyDataSize- on input the size of the outPropertyData buffer. On output the number of bytes written to the buffer.outPropertyData- the buffer in which to write the property data. If outPropertyData is NULL and ioPropertyDataSize is not, the amount that would have been written will be reported.- Returns:
- returns noErr if successful.
-
AudioQueueNewOutput
public static int AudioQueueNewOutput(AudioStreamBasicDescription inFormat, AudioToolbox.Function_AudioQueueNewOutput inCallbackProc, org.moe.natj.general.ptr.VoidPtr inUserData, CFRunLoopRef inCallbackRunLoop, CFStringRef inCallbackRunLoopMode, int inFlags, org.moe.natj.general.ptr.Ptr<AudioQueueRef> outAQ)
[@function] AudioQueueNewOutput Creates a new audio queue for playing audio data. To create an playback audio queue, you allocate buffers, then queue buffers (using AudioQueueEnqueueBuffer). The callback receives buffers and typically queues them again. To schedule a buffer for playback, providing parameter and start time information, call AudioQueueEnqueueBufferWithParameters.- Parameters:
inFormat- A pointer to a structure describing the format of the audio data to be played. For linear PCM, only interleaved formats are supported. Compressed formats are supported.inCallbackProc- A pointer to a callback function to be called when the audio queue has finished playing a buffer.inUserData- A value or pointer to data that you specify to be passed to the callback function.inCallbackRunLoop- The event loop on which inCallbackProc is to be called. If you specify NULL, the callback is called on one of the audio queue's internal threads.inCallbackRunLoopMode- The run loop mode in which to call the callback. Typically, you pass kCFRunLoopCommonModes. (NULL also specifies kCFRunLoopCommonModes). Other possibilities are implementation specific. You can choose to create your own thread with your own run loops. For more information on run loops, see Run Loops or CFRunLoop Reference.inFlags- Reserved for future use. Pass 0.outAQ- On return, this variable contains a pointer to the newly created playback audio queue object.- Returns:
- An OSStatus result code.
-
AudioQueueNewInput
public static int AudioQueueNewInput(AudioStreamBasicDescription inFormat, AudioToolbox.Function_AudioQueueNewInput inCallbackProc, org.moe.natj.general.ptr.VoidPtr inUserData, CFRunLoopRef inCallbackRunLoop, CFStringRef inCallbackRunLoopMode, int inFlags, org.moe.natj.general.ptr.Ptr<AudioQueueRef> outAQ)
[@function] AudioQueueNewInput Creates a new audio queue for recording audio data. Outline of how to use the queue for input: - create input queue - allocate buffers - enqueue buffers (AudioQueueEnqueueBuffer, not with parameters, no packet descriptions) - the callback receives buffers and re-enqueues them- Parameters:
inFormat- A pointer to a structure describing the format of the audio data to be recorded. For linear PCM, only interleaved formats are supported. Compressed formats are supported.inCallbackProc- A pointer to a callback function to be called when the audio queue has finished filling a buffer.inUserData- A value or pointer to data that you specify to be passed to the callback function.inCallbackRunLoop- The event loop on which inCallbackProc is to be called. If you specify NULL, the callback is called on one of the audio queue's internal threads.inCallbackRunLoopMode- The run loop mode in which to call the callback. Typically, you pass kCFRunLoopCommonModes. (NULL also specifies kCFRunLoopCommonModes). Other possibilities are implementation specific. You can choose to create your own thread with your own run loops. For more information on run loops, see Run Loops or CFRunLoop Reference.inFlags- Reserved for future use. Pass 0.outAQ- On return, this variable contains a pointer to the newly created recording audio queue object.- Returns:
- An OSStatus result code.
-
AudioQueueNewOutputWithDispatchQueue
public static int AudioQueueNewOutputWithDispatchQueue(org.moe.natj.general.ptr.Ptr<AudioQueueRef> outAQ, AudioStreamBasicDescription inFormat, int inFlags, NSObject inCallbackDispatchQueue, AudioToolbox.Block_AudioQueueNewOutputWithDispatchQueue inCallbackBlock)
[@function] AudioQueueNewOutputWithDispatchQueue Creates a new audio queue for playing audio data. To create an playback audio queue, you allocate buffers, then queue buffers (using AudioQueueEnqueueBuffer). The callback receives buffers and typically queues them again. To schedule a buffer for playback, providing parameter and start time information, call AudioQueueEnqueueBufferWithParameters.- Parameters:
outAQ- On return, this variable contains a pointer to the newly created playback audio queue object.inFormat- A pointer to a structure describing the format of the audio data to be played. For linear PCM, only interleaved formats are supported. Compressed formats are supported.inFlags- Reserved for future use. Pass 0.inCallbackDispatchQueue- The dispatch queue from which inCallbackBlock is to be called.inCallbackBlock- A pointer to a callback block to be called when the audio queue has finished playing a buffer.- Returns:
- An OSStatus result code.
-
AudioQueueNewInputWithDispatchQueue
public static int AudioQueueNewInputWithDispatchQueue(org.moe.natj.general.ptr.Ptr<AudioQueueRef> outAQ, AudioStreamBasicDescription inFormat, int inFlags, NSObject inCallbackDispatchQueue, AudioToolbox.Block_AudioQueueNewInputWithDispatchQueue inCallbackBlock)
[@function] AudioQueueNewInputWithDispatchQueue Creates a new audio queue for recording audio data. Outline of how to use the queue for input: - create input queue - allocate buffers - enqueue buffers (AudioQueueEnqueueBuffer, not with parameters, no packet descriptions) - the callback receives buffers and re-enqueues them- Parameters:
outAQ- On return, this variable contains a pointer to the newly created recording audio queue object.inFormat- A pointer to a structure describing the format of the audio data to be recorded. For linear PCM, only interleaved formats are supported. Compressed formats are supported.inFlags- Reserved for future use. Pass 0.inCallbackDispatchQueue- The dispatch queue from which inCallbackBlock is to be called.inCallbackBlock- A pointer to a callback block to be called when the audio queue has finished filling a buffer.- Returns:
- An OSStatus result code.
-
AudioQueueDispose
public static int AudioQueueDispose(AudioQueueRef inAQ, byte inImmediate)
[@function] AudioQueueDispose Disposes an existing audio queue. Disposing of the audio queue also disposes of all its resources, including its buffers.- Parameters:
inAQ- The audio queue you want to dispose ofinImmediate- If you pass true, the audio queue is disposed of immediately (that is, synchronously). If you pass false, disposal does not take place until all enqueued buffers are processed. Whether you call AudioQueueDispose synchronously or asynchronously, you can no longer interact with the queue, and the queue no longer invokes any callbacks to your application after the function returns. Note that if AudioQueueDispose is called from a buffer completion callback or property listener, you may receive further callbacks afterwards.- Returns:
- An OSStatus result code.
-
AudioQueueAllocateBuffer
public static int AudioQueueAllocateBuffer(AudioQueueRef inAQ, int inBufferByteSize, org.moe.natj.general.ptr.Ptr<org.moe.natj.general.ptr.Ptr<AudioQueueBuffer>> outBuffer)
[@function] AudioQueueAllocateBuffer Asks an audio queue to allocate a buffer. Once allocated, the pointer to the buffer and the buffer's size are fixed and cannot be changed. The mAudioDataByteSize field in the audio queue buffer structure, AudioQueueBuffer, is initially set to 0.- Parameters:
inAQ- The audio queue you want to allocate a buffer.inBufferByteSize- The desired size of the new buffer, in bytes. An appropriate buffer size depends on the processing you will perform on the data as well as on the audio data format.outBuffer- On return, points to the newly created audio buffer. The mAudioDataByteSize field in the audio queue buffer structure, AudioQueueBuffer, is initially set to 0.- Returns:
- An OSStatus result code.
-
AudioQueueAllocateBufferWithPacketDescriptions
public static int AudioQueueAllocateBufferWithPacketDescriptions(AudioQueueRef inAQ, int inBufferByteSize, int inNumberPacketDescriptions, org.moe.natj.general.ptr.Ptr<org.moe.natj.general.ptr.Ptr<AudioQueueBuffer>> outBuffer)
[@function] AudioQueueAllocateBufferWithPacketDescriptions Asks an audio queue to allocate a buffer with space for packet descriptions. Once allocated, the pointer to the buffer and the buffer's size are fixed and cannot be changed. The mAudioDataByteSize field in the audio queue buffer structure, AudioQueueBuffer, is initially set to 0.- Parameters:
inAQ- The audio queue you want to allocate a buffer.inBufferByteSize- The desired size of the new buffer, in bytes. An appropriate buffer size depends on the processing you will perform on the data as well as on the audio data format.inNumberPacketDescriptions- The desired capacity of the packet description array in the new buffer.outBuffer- On return, points to the newly created audio buffer. The mAudioDataByteSize field in the audio queue buffer structure, AudioQueueBuffer, is initially set to 0.- Returns:
- An OSStatus result code.
-
AudioQueueFreeBuffer
public static int AudioQueueFreeBuffer(AudioQueueRef inAQ, AudioQueueBuffer inBuffer)
[@function] AudioQueueFreeBuffer Disposes of an audio queue buffer. This function disposes of the buffer allocated by AudioQueueAllocateBuffer. Disposing of an audio queue also automatically disposes of any associated buffers and timeline objects. Call this function only if you want to dispose of a particular buffer while continuing to use an audio queue. You can dispose of buffers only when the associated queue is stopped (that is, not processing audio data).- Parameters:
inAQ- The queue from which the buffer was allocated.inBuffer- The buffer to be disposed.- Returns:
- An OSStatus result code.
-
AudioQueueEnqueueBuffer
public static int AudioQueueEnqueueBuffer(AudioQueueRef inAQ, AudioQueueBuffer inBuffer, int inNumPacketDescs, AudioStreamPacketDescription inPacketDescs)
[@function] AudioQueueEnqueueBuffer Assigns a buffer to an audio queue for recording or playback. If the buffer was allocated with AudioQueueAllocateBufferWithPacketDescriptions, the client should provide packet descriptions in the buffer's mPacketDescriptions and mPacketDescriptionCount fields rather than in inPacketDescs and inNumPacketDescs, which should be NULL and 0, respectively, in this case. For an input queue, pass 0 and NULL for inNumPacketDescs and inPacketDescs, respectively. Your callback will receive packet descriptions owned by the audio queue.- Parameters:
inAQ- The audio queue you are assigning the buffer to.inBuffer- The buffer to queue (that is, to be recorded into or played from).inNumPacketDescs- The number of packet descriptions pointed to by the inPacketDescs pointer. Applicable only for output queues and required only for variable-bit-rate (VBR) audio formats. Pass 0 for input queues (no packet descriptions are required).inPacketDescs- An array of packet descriptions. Applicable only for output queues and required only for variable-bit-rate (VBR) audio formats. Pass NULL for input queues (no packet descriptions are required).- Returns:
- An OSStatus result code.
-
AudioQueueEnqueueBufferWithParameters
public static int AudioQueueEnqueueBufferWithParameters(AudioQueueRef inAQ, AudioQueueBuffer inBuffer, int inNumPacketDescs, AudioStreamPacketDescription inPacketDescs, int inTrimFramesAtStart, int inTrimFramesAtEnd, int inNumParamValues, AudioQueueParameterEvent inParamValues, AudioTimeStamp inStartTime, AudioTimeStamp outActualStartTime)
[@function] AudioQueueEnqueueBufferWithParameters Assigns a buffer to an audio queue for playback, providing parameters and start time information. You can exert some control of the buffer queue by using this function. You can assign audio queue settings that are in effect carried by an audio queue buffer as you enqueue it. Hence, these changes only take effect when an audio queue buffer begins playing. This function queues a buffer for playback only, not for recording. Audio queues for recording have no parameters, do not support variable-bit-rate (VBR) formats (which might require trimming), and have a different way to handle timing. When queued for playback, the buffer must contain the audio data to be played back. See AudioQueueEnqueueBuffer for details on queuing a buffer for recording. If the buffer was allocated with AudioQueueAllocateBufferWithPacketDescriptions, the client should provide packet descriptions in the buffer's mPacketDescriptions and mPacketDescriptionCount fields rather than in inPacketDescs and inNumPacketDescs, which should be NULL and 0, respectively, in this case.- Parameters:
inAQ- The audio queue associated with the buffer.inBuffer- The buffer to be played from.inNumPacketDescs- The number of packet descriptions pointed to by the inPacketDescs parameter. Required only for variable-bit-rate (VBR) audio formats. Pass 0 if no packet descriptions are required.inPacketDescs- A pointer to an array of audio stream packet descriptions. Required only for VBR audio formats. Pass NULL if no packet descriptions are required.inTrimFramesAtStart- The number of priming frames to skip at the start of the buffer.inTrimFramesAtEnd- The number of frames to skip at the end of the buffer.inNumParamValues- The number of parameter values pointed to by the inParamValues parameter.inParamValues- An array of parameter values. (In macOS v10.5, there is only one parameter, kAudioQueueParam_Volume.) These values are set before buffer playback and cannot be changed while the buffer is playing. How accurately changes in parameters can be scheduled depends on the size of the buffer. If there are no parameters to set (inNumParamValues = 0), pass NULL.inStartTime- A pointer to a structure containing the desired start time for playing the buffer. If you specify the time using the mSampleTime field of the AudioTimeStamp structure, the sample time is relative to the time the queue started. If you pass NULL for the start time, the buffer starts immediately after the previously queued buffer, or as soon as possible if no buffers are queued ahead of it. Buffers are played in the order they are queued. If multiple buffers are queued, their times must be in ascending order or NULL; otherwise, an error occurs. The start time indicates when the actual audio data in the buffer is to be played (that is, the trim frames are not counted). Note: When specifying a start time for a buffer, if the buffer is not the first enqueued since AudioQueueStop or AudioQueueReset, it is normally necessary to call AudioQueueFlush before AudioQueueEnqueueBufferWithParameters.outActualStartTime- On return, points to an AudioTimeStamp structure indicating when the buffer will actually play.- Returns:
- An OSStatus result code.
-
AudioQueueStart
public static int AudioQueueStart(AudioQueueRef inAQ, AudioTimeStamp inStartTime)
[@function] AudioQueueStart Begins playing or recording audio. If the audio hardware is not already running, this function starts it.- Parameters:
inAQ- The audio queue to start.inStartTime- A pointer to the time at which the audio queue should start. If you specify the time using the mSampleTime field of the AudioTimeStamp structure, the sample time is referenced to the sample frame timeline of the associated audio device. May be NULL.- Returns:
- An OSStatus result code.
-
AudioQueuePrime
public static int AudioQueuePrime(AudioQueueRef inAQ, int inNumberOfFramesToPrepare, org.moe.natj.general.ptr.IntPtr outNumberOfFramesPrepared)
[@function] AudioQueuePrime Begins decoding buffers in preparation for playback. This function begins decoding buffers in preparation for playback. It returns when at least the number of audio sample frames are decoded and ready to play or when all enqueued buffers have been completely decoded. To ensure that a buffer has been decoded and is completely ready for playback, before playback: 1. Call AudioQueueEnqueueBuffer. 2. Call AudioQueuePrime, which waits if you pass 0 to have a default number of frames decoded. 3. Call AudioQueueStart. Calls to AudioQueuePrime following AudioQueueStart/AudioQueuePrime, and before AudioQueueReset/AudioQueueStop, will have no useful effect. In this situation, outNumberOfFramesPrepared will not have a useful return value.- Parameters:
inAQ- The audio queue to be primed.inNumberOfFramesToPrepare- The number of frames to decode before returning. Pass 0 to decode all enqueued buffers.outNumberOfFramesPrepared- If not NULL, on return, a pointer to the number of frames actually decoded and prepared for playback.- Returns:
- An OSStatus result code.
-
AudioQueueStop
public static int AudioQueueStop(AudioQueueRef inAQ, byte inImmediate)
[@function] AudioQueueStop Stops playing or recording audio. This function resets the audio queue and stops the audio hardware associated with the queue if it is not in use by other audio services. Synchronous stops occur immediately, regardless of previously buffered audio data. Asynchronous stops occur after all queued buffers have been played or recorded.- Parameters:
inAQ- The audio queue to stop.inImmediate- If you pass true, the stop request occurs immediately (that is, synchronously), and the function returns when the audio queue has stopped. Buffer callbacks are invoked during the stopping. If you pass false, the function returns immediately, but the queue does not stop until all its queued buffers are played or filled (that is, the stop occurs asynchronously). Buffer callbacks are invoked as necessary until the queue actually stops. Also, a playback audio queue callback calls this function when there is no more audio to play. Note that when stopping immediately, all pending buffer callbacks are normally invoked during the process of stopping. But if the calling thread is responding to a buffer callback, then it is possible for additional buffer callbacks to occur after AudioQueueStop returns.- Returns:
- An OSStatus result code.
-
AudioQueuePause
public static int AudioQueuePause(AudioQueueRef inAQ)
[@function] AudioQueuePause Pauses audio playback or recording. Pausing the queue does not affect buffers or reset the audio queue. To resume playback or recording using the audio queue, call AudioQueueStart.- Parameters:
inAQ- The queue to be paused.- Returns:
- An OSStatus result code.
-
AudioQueueFlush
public static int AudioQueueFlush(AudioQueueRef inAQ)
[@function] AudioQueueFlush Resets the audio queue's decoder state. After all queued buffers have been played, the function cleans up all decoder state information. You must call this function following a sequence of buffers of encoded audio; otherwise, some of the audio might not play in the next set of queued buffers. The only time it is not necessary to call AudioQueueFlush is following AudioQueueStop with inImmediate=false. (This action internally calls AudioQueueFlush.) Also, you might wish to call this function before calling AudioQueueStop depending on whether you want to stop immediately regardless of what has played or whether you want to ensure that all buffered data and all data that is in the middle of processing gets recorded or played before stopping.- Parameters:
inAQ- The audio queue to be flushed.- Returns:
- An OSStatus result code.
-
AudioQueueReset
public static int AudioQueueReset(AudioQueueRef inAQ)
[@function] AudioQueueReset Resets an audio queue. This function immediately resets an audio queue, flushes any queued buffer, removes all buffers from previously scheduled use, and resets any decoder and digital signal processing (DSP) state information. It also invokes callbacks for any flushed buffers. If you queue any buffers after calling this function, processing does not occur until the decoder and DSP state information is reset. Hence, a discontinuity (that is, a "glitch") might occur. Note that when resetting, all pending buffer callbacks are normally invoked during the process of resetting. But if the calling thread is responding to a buffer callback, then it is possible for additional buffer callbacks to occur after AudioQueueReset returns.- Parameters:
inAQ- The audio queue to reset.- Returns:
- An OSStatus result code.
-
AudioQueueGetParameter
public static int AudioQueueGetParameter(AudioQueueRef inAQ, int inParamID, org.moe.natj.general.ptr.FloatPtr outValue)
[@function] AudioQueueGetParameter Obtains an audio queue parameter value. You can access the current parameter values for an audio queue at any time with this function.- Parameters:
inAQ- The audio queue whose parameter value you want to obtain.inParamID- The ID of the parameter you want to obtain. In macOS v10.5, audio queues have one parameter available: kAudioQueueParam_Volume, which controls the queue's playback volume.outValue- On return, points to the current value of the specified parameter.- Returns:
- An OSStatus result code.
-
AudioQueueSetParameter
public static int AudioQueueSetParameter(AudioQueueRef inAQ, int inParamID, float inValue)
[@function] AudioQueueSetParameter Sets an audio queue parameter value.- Parameters:
inAQ- The audio queue whose parameter value you want to set.inParamID- The ID of the parameter you want to set.inValue- The parameter value to set.- Returns:
- An OSStatus result code.
-
AudioQueueGetProperty
public static int AudioQueueGetProperty(AudioQueueRef inAQ, int inID, org.moe.natj.general.ptr.VoidPtr outData, org.moe.natj.general.ptr.IntPtr ioDataSize)
[@function] AudioQueueGetProperty Obtains an audio queue property value.- Parameters:
inAQ- The audio queue whose property value you want to obtain.inID- The ID of the property you want to obtain. See "Audio Queue Property IDs."outData- On return, points to the desired property value.ioDataSize- A pointer to the size of the property data. On input, points to the maximum bytes of space the caller expects to receive. On return, points to the actual data size.- Returns:
- An OSStatus result code.
-
AudioQueueSetProperty
public static int AudioQueueSetProperty(AudioQueueRef inAQ, int inID, org.moe.natj.general.ptr.ConstVoidPtr inData, int inDataSize)
[@function] AudioQueueSetProperty Sets an audio queue property value.- Parameters:
inAQ- The audio queue whose property value you want to set.inID- The ID of the property you want to set. See "Audio Queue Property IDs" for the various audio queue properties.inData- A pointer to the property value to set.inDataSize- The size of the property data.- Returns:
- An OSStatus result code.
-
AudioQueueGetPropertySize
public static int AudioQueueGetPropertySize(AudioQueueRef inAQ, int inID, org.moe.natj.general.ptr.IntPtr outDataSize)
[@function] AudioQueueGetPropertySize Obtains the size of an audio queue property.- Parameters:
inAQ- The audio queue containing the property value whose size you want to obtain.inID- The ID of the property value whose size you want to obtain. See "Audio Queue Property IDs" for possible values.outDataSize- On return, points to the size of the specified property value.- Returns:
- An OSStatus result code.
-
AudioQueueAddPropertyListener
public static int AudioQueueAddPropertyListener(AudioQueueRef inAQ, int inID, AudioToolbox.Function_AudioQueueAddPropertyListener inProc, org.moe.natj.general.ptr.VoidPtr inUserData)
[@function] AudioQueueAddPropertyListener Adds a listener callback for a property. This callback is used to act upon a change in an audio queue property such as kAudioQueueProperty_IsRunning. For instance, if your application has a user interface with a Play/Stop button, and kAudioQueueProperty_IsRunning changes, you need to update your button.- Parameters:
inAQ- The audio queue that owns the property you want to assign the listener callback to.inID- The ID of the property to which you want to assign a listener callback. See "Audio Queue Property IDs".inProc- The listener callback to be called when the property value changes.inUserData- A value to be passed to the listener callback when it is called.- Returns:
- An OSStatus result code.
-
AudioQueueRemovePropertyListener
public static int AudioQueueRemovePropertyListener(AudioQueueRef inAQ, int inID, AudioToolbox.Function_AudioQueueRemovePropertyListener inProc, org.moe.natj.general.ptr.VoidPtr inUserData)
[@function] AudioQueueRemovePropertyListener Removes a listener callback for a property.- Parameters:
inAQ- The audio queue that owns the property from which you want to remove a listener.inID- The ID of the property from which you want to remove a listener.inProc- The listener being removed.inUserData- The same inUserData value that was previously passed to AudioQueueAddPropertyListener.- Returns:
- An OSStatus result code.
-
AudioQueueCreateTimeline
public static int AudioQueueCreateTimeline(AudioQueueRef inAQ, org.moe.natj.general.ptr.Ptr<AudioQueueTimelineRef> outTimeline)
[@function] AudioQueueCreateTimeline Creates a timeline object. You need to instantiate a timeline object if you want to know about any timeline discontinuities. See AudioQueueGetCurrentTime for more details.- Parameters:
inAQ- The audio queue to associate with the new timeline object.outTimeline- On return, points to the newly created timeline object.- Returns:
- An OSStatus result code.
-
AudioQueueDisposeTimeline
public static int AudioQueueDisposeTimeline(AudioQueueRef inAQ, AudioQueueTimelineRef inTimeline)
[@function] AudioQueueDisposeTimeline Disposes of a timeline object. Disposing of an audio queue automatically disposes of any associated timeline objects. Call this function only if you want to dispose of a timeline object and not the audio queue associated with it.- Parameters:
inAQ- The audio queue associated with the timeline object you want to dispose of.inTimeline- The timeline object to dispose of.- Returns:
- An OSStatus result code.
-
AudioQueueGetCurrentTime
public static int AudioQueueGetCurrentTime(AudioQueueRef inAQ, AudioQueueTimelineRef inTimeline, AudioTimeStamp outTimeStamp, org.moe.natj.general.ptr.BytePtr outTimelineDiscontinuity)
[@function] AudioQueueGetCurrentTime Obtains the current audio queue time. You must specify a timeline object if you want to be notified about any timeline discontinuities in the outTimelineDiscontinuity parameter. If you don't care about discontinuities, pass NULL in the inTimeLine and outTimelineDiscontinuity parameters.- Parameters:
inAQ- The audio queue whose current time you want to obtain.inTimeline- The audio queue timeline object to which any timeline discontinuities are reported. May be NULL.outTimeStamp- On return, points to an audio timestamp structure containing the current audio queue time. The mSampleTime field is in terms of the audio queue's sample rate, and relative to the time at which the queue has started or will start.outTimelineDiscontinuity- Can be NULL. On return, only set to true or false if the inTimeLine parameter is not NULL. Set to true if a discontinuity has occurred in the sample timeline of the audio queue. For instance, the device's sample rate changed and a gap occurred in playback or recording, or the audio queue was unable to prepare and playback in time because it was late.- Returns:
- An OSStatus result code.
-
AudioQueueDeviceGetCurrentTime
public static int AudioQueueDeviceGetCurrentTime(AudioQueueRef inAQ, AudioTimeStamp outTimeStamp)
[@function] AudioQueueDeviceGetCurrentTime Obtains the current time of the audio device associated with an audio queue. If the audio device associated with the audio queue is not running, the only valid field in the audio timestamp structure is mHostTime. This result differentiates the action of this function from that of the AudioDeviceGetCurrentTime function, (declared in AudioHardware.h) which returns an error if the audio device is not running.- Parameters:
inAQ- The audio queue whose audio device is to be queried.outTimeStamp- A pointer to a structure that, on return, contains the current time of the audio device associated with the audio queue.- Returns:
- An OSStatus result code.
-
AudioQueueDeviceTranslateTime
public static int AudioQueueDeviceTranslateTime(AudioQueueRef inAQ, AudioTimeStamp inTime, AudioTimeStamp outTime)
[@function] AudioQueueDeviceTranslateTime Converts the time in the time base of the associated audio device from one representation to another. This function converts from one time representation to another (for example, from sample time to host time or vice versa): - Sample time is the absolute sample frame time. Sample numbers are the count of the samples on the audio device. - Host time is the time base of the host machine such as the time of the bus clock on the CPU. The mSampleTime field in the AudioTimestamp structure (described in Core Audio Data Types Reference) is always in device time, not in audio queue time. Audio queue time is relative to the audio queue's start time. The associated audio device has to be running for the AudioQueueDeviceTranslateTime function to provide a result.- Parameters:
inAQ- The queue whose audio device is to perform the requested time translation.inTime- A pointer to a structure containing the time to be translated.outTime- A pointer to the the translated time.- Returns:
- An OSStatus result code.
-
AudioQueueDeviceGetNearestStartTime
public static int AudioQueueDeviceGetNearestStartTime(AudioQueueRef inAQ, AudioTimeStamp ioRequestedStartTime, int inFlags)
[@function] AudioQueueDeviceGetNearestStartTime Obtains an audio device's start time that is closest to a requested start time.- Parameters:
inAQ- The audio queue whose device's nearest start time you want to obtain.ioRequestedStartTime- On entry, points to the requested start time. On return, points to the actual start time.inFlags- Reserved for future use. Pass 0.- Returns:
- An OSStatus result code.
-
AudioQueueSetOfflineRenderFormat
public static int AudioQueueSetOfflineRenderFormat(AudioQueueRef inAQ, AudioStreamBasicDescription inFormat, AudioChannelLayout inLayout)
[@function] AudioQueueSetOfflineRenderFormat Specify an audio format to which the queue will perform subsequent offline rendering, or disable offline rendering. An output queue's audio playback can be redirected for capture to an audio file, to support an export function, for example. AudioQueueSetOfflineRenderFormat switches a queue between normal and offline rendering modes.- Parameters:
inAQ- The output queue whose offline rendering mode is to be changed.inFormat- The desired format for offline rendering. Pass NULL to disable offline rendering and return the queue to normal output to an audio device. This format must be linear PCM and (if not mono) interleaved.inLayout- The desired channel layout for offline rendering; also NULL when disabling offline rendering.- Returns:
- An OSStatus result code.
-
AudioQueueOfflineRender
public static int AudioQueueOfflineRender(AudioQueueRef inAQ, AudioTimeStamp inTimestamp, AudioQueueBuffer ioBuffer, int inNumberFrames)
[@function] AudioQueueOfflineRender Obtain a buffer of audio output from a queue in offline rendering mode.- Parameters:
inAQ- The output queue from which to obtain output.inTimestamp- The point in time corresponding to the beginning of the output buffer. Only mSampleTime is used. mFlags must include kAudioTimeStampSampleTimeValid.ioBuffer- The buffer into which the queue will render.inNumberFrames- The number of frames of audio to render. Note that fewer frames than requested may be returned. This can happen if insufficient data was enqueued.- Returns:
- An OSStatus result code.
-
AudioQueueProcessingTapNew
public static int AudioQueueProcessingTapNew(AudioQueueRef inAQ, AudioToolbox.Function_AudioQueueProcessingTapNew inCallback, org.moe.natj.general.ptr.VoidPtr inClientData, int inFlags, org.moe.natj.general.ptr.IntPtr outMaxFrames, AudioStreamBasicDescription outProcessingFormat, org.moe.natj.general.ptr.Ptr<AudioQueueProcessingTapRef> outAQTap)
[@function] AudioQueueProcessingTapNew Create a new processing tap This function creates a processing tap on a given audio queue. A processing tap can only be established (or removed) on an audio queue that is stopped (paused is not sufficient). The processing tap will then be used to process either decoded data in the case of an output queue, or input data (before it is encoded) in the case of an input queue. The processing is performed on audio either before or after any effects or other processing (varispeed, etc) is applied by the audio queue, depending on inFlags.- Parameters:
inAQ- The audio queue from which to create the processing tapinCallback- A callback which the queue will call to process the audioinClientData- Client data provided to the callbackinFlags- Flags that are used to control aspects of the processing tap. Valid flags are: - kAudioQueueProcessingTap_PreEffects: processing is done before any further effects are applied by the audio queue to the audio - kAudioQueueProcessingTap_PostEffects: processing is done after all processing is done, including that of other taps. - kAudioQueueProcessingTap_SiphonoutMaxFrames- The maximum number of sample frames that can be requested of a processing tap at any one time. Typically this will be approximately 50 msec of audio (2048 samples @ 44.1kHz)outProcessingFormat- The format in which the client will receive the audio data to be processed. This will always be the same sample rate as the client format and usually the same number of channels as the client format of the audio queue. (NOTE: the number of channels may be different in some cases if the client format has some channel count restrictions, for instance the client provides 5.1 AAC, but the decoder can only produce stereo). The channel order, if the same as the client format, will be the same as the client channel order. If the channel count is changed, it will be to either 1 (mono) or 2 (stereo, in which case the first channel is left, the second right). If the data is not in a convenient format for the client to process in, then the client should convert the data to and from that format. This is the most efficient mechanism to use (as the audio queue can chose a format that is most efficient from its playback (or recording) requirement.outAQTap- The processing tap object.- Returns:
- An OSStatus result code.
-
AudioQueueProcessingTapDispose
public static int AudioQueueProcessingTapDispose(AudioQueueProcessingTapRef inAQTap)
[@function] AudioQueueProcessingTapDispose Dispose a processing tap object As with AudioQueueProcessingTapNew(), this call can only be made on an audio queue that is stopped (paused is not sufficient)- Parameters:
inAQTap- The processing tap to dispose.- Returns:
- An OSStatus result code.
-
AudioQueueProcessingTapGetSourceAudio
public static int AudioQueueProcessingTapGetSourceAudio(AudioQueueProcessingTapRef inAQTap, int inNumberFrames, AudioTimeStamp ioTimeStamp, org.moe.natj.general.ptr.IntPtr outFlags, org.moe.natj.general.ptr.IntPtr outNumberFrames, AudioBufferList ioData)
[@function] AudioQueueProcessingTapGetSourceAudio Used by a processing tap to retrieve source audio. This function may only be called from the processing tap's callback.- Parameters:
inAQTap- the processing tapinNumberFrames- the number of frames the processing tap requires for its processingioTimeStamp- On an input audio queue, the timestamp is returned from this function. On an output audio queue, the caller must provide a continuous timestamp.outFlags- flags to describe state about the input requested, e.g. discontinuity/completeoutNumberFrames- the number of source frames that have been provided by the parent audio queue. This can be less than the number of requested frames specified in inNumberFramesioData- the audio buffer list which will contain the source data. The audio queue owns the buffer pointers if NULL pointers were provided (recommended). In this case the source buffers are only valid for the duration of the processing tap callback. If the buffer pointers are non-NULL, then they must be big enough to hold inNumberFrames, and the audio queue will copy its source data into those buffers.- Returns:
- An OSStatus result code.
-
AudioQueueProcessingTapGetQueueTime
public static int AudioQueueProcessingTapGetQueueTime(AudioQueueProcessingTapRef inAQTap, org.moe.natj.general.ptr.DoublePtr outQueueSampleTime, org.moe.natj.general.ptr.IntPtr outQueueFrameCount)
[@function] AudioQueueProcessingTapGetQueueTime Used by a processing tap to retrieve the queue's current time. This function may only be called from the processing tap's callback, and only for audio output queues. It must be called after calling AudioQueueProcessingTapGetSourceAudio().- Parameters:
inAQTap- the processing tapoutQueueSampleTime- the current sample time of the audio queue. This will appear to be stationary if the queue is paused.outQueueFrameCount- the number of sample frames of queue time corresponding to the current chunk of audio being processed by the tap. This will differ from the frame count passed to the tap if the queue's playback rate is currently other than 1.0, due to the use of time compression/expansion. The frame count can also be 0 if the queue is paused.- Returns:
- An OSStatus result code.
-
AudioSessionInitialize
@Deprecated public static int AudioSessionInitialize(CFRunLoopRef inRunLoop, CFStringRef inRunLoopMode, AudioToolbox.Function_AudioSessionInitialize inInterruptionListener, org.moe.natj.general.ptr.VoidPtr inClientData)
Deprecated.[@function] AudioSessionInitialize Initialize the AudioSession. This function has to be called once before calling any other AudioSession functions.- Parameters:
inRunLoop- A CFRunLoopRef indicating the desired run loop the interruption routine should be run on. Pass NULL to use the main run loop.inRunLoopMode- A CFStringRef indicating the run loop mode for the runloop where the completion routine will be executed. Pass NULL to use kCFRunLoopDefaultMode.inInterruptionListener- An AudioSessionInterruptionListener to be called when the AudioSession is interrupted.inClientData- The client user data to use when calling the interruption listener.
-
AudioSessionSetActive
@Deprecated public static int AudioSessionSetActive(byte active)
Deprecated.[@function] AudioSessionSetActive Activate or deactivate the AudioSession. Call this function with active set to true to activate this AudioSession (interrupt the currently active AudioSession). Call this function with active set to false to deactivate this AudioSession (allow another interrupted AudioSession to resume). When active is true this call may fail if the currently active AudioSession has a higher priority.- Parameters:
active- A Boolean indicating if you want to make this AudioSession active or inactive.
-
AudioSessionSetActiveWithFlags
@Deprecated public static int AudioSessionSetActiveWithFlags(byte active, int inFlags)Deprecated.[@function] AudioSessionSetActiveWithFlags Same functionality as AudioSessionSetActive, with an additional flags parameter for refining behavior. Call this function with active set to true to activate this AudioSession (interrupt the currently active AudioSession). Call this function with active set to false to deactivate this AudioSession (allow another interrupted AudioSession to resume). Pass in one or more flags to refine the behavior during activation or deactivation. When active is true this call may fail if the currently active AudioSession has a higher priority.- Parameters:
active- A Boolean indicating if you want to make this AudioSession active or inactive.inFlags- A bitmap containing one or more flags from the AudioSessionActivationFlags enum.
-
AudioSessionGetProperty
@Deprecated public static int AudioSessionGetProperty(int inID, org.moe.natj.general.ptr.IntPtr ioDataSize, org.moe.natj.general.ptr.VoidPtr outData)Deprecated.[@function] AudioSessionGetProperty Get the value of a property. This function can be called to get the value for a property of the AudioSession. Valid properties are listed in an enum above.- Parameters:
inID- The AudioSessionPropertyID for which we want to get the value.ioDataSize- The size of the data payload. On entry it should contain the size of the memory pointed to by outData. On exit it will contain the actual size of the data.outData- The data for the property will be copied here.- Returns:
- kAudioSessionNoError if the operation was successful. If the property is a write-only property or only available by way of property listeners, kAudioSessionUnsupportedPropertyError will be returned. Other error codes listed under AudioSession Error Constants also apply to this function.
-
AudioSessionSetProperty
@Deprecated public static int AudioSessionSetProperty(int inID, int inDataSize, org.moe.natj.general.ptr.ConstVoidPtr inData)Deprecated.[@function] AudioSessionSetProperty Set the value of a property. This function can be called to set the value for a property of the AudioSession. Valid properties are listed in an enum above.- Parameters:
inID- The AudioSessionPropertyID for which we want to set the value.inDataSize- The size of the data payload.inData- The data for the property we want to set.- Returns:
- kAudioSessionNoError if the operation was successful. If the property is a read-only property or an invalid property value is passed in, kAudioSessionUnsupportedPropertyError will be returned. Other error codes listed under AudioSession Error Constants also apply to this function.
-
AudioSessionGetPropertySize
@Deprecated public static int AudioSessionGetPropertySize(int inID, org.moe.natj.general.ptr.IntPtr outDataSize)Deprecated.[@function] AudioSessionGetPropertySize Get the size of the payload for a property. This function can be called to get the size for the payload of a property. Valid properties are listed in an enum above.- Parameters:
inID- The AudioSessionPropertyID for which we want to get the size of the payload.outDataSize- The size of the data payload will be copied here.
-
AudioSessionAddPropertyListener
@Deprecated public static int AudioSessionAddPropertyListener(int inID, AudioToolbox.Function_AudioSessionAddPropertyListener inProc, org.moe.natj.general.ptr.VoidPtr inClientData)Deprecated.[@function] AudioSessionAddPropertyListener Add a property listener. This function can be used to add a listener to be called when a property changes. If a listener and user data already exist for this property, they will be replaced. Valid properties are listed above.- Parameters:
inID- The AudioSessionPropertyID for which we want to set a listener.inProc- The listener to be called when the property changes.inClientData- The client user data to use when calling the listener.- Returns:
- kAudioSessionNoError if the operation was successful. If the property does not support listeners, kAudioSessionUnsupportedPropertyError will be returned. Other error codes listed under AudioSession Error Constants also apply to this function.
-
AudioSessionRemovePropertyListener
@Deprecated public static int AudioSessionRemovePropertyListener(int inID)
Deprecated.[@function] AudioSessionRemovePropertyListener see AudioSessionRemovePropertyListenerWithUserData see AudioSessionRemovePropertyListenerWithUserData
-
AudioSessionRemovePropertyListenerWithUserData
@Deprecated public static int AudioSessionRemovePropertyListenerWithUserData(int inID, AudioToolbox.Function_AudioSessionRemovePropertyListenerWithUserData inProc, org.moe.natj.general.ptr.VoidPtr inClientData)Deprecated.[@function] AudioSessionRemovePropertyListener Remove a property listener. This function can be called to remove the listener for a property. The caller provides the same proc and user data that was used to add the listener. This ensures that there can be more than one listener established for a given property ID, and each listener can be removed as requested. Valid properties are listed above.- Parameters:
inID- The AudioSessionPropertyID for which we want to remove the listener.inProc- The proc that was used to add the listener that needs to be removed.inClientData- The client data that was used to add the listener that needs to be removed.- Returns:
- kAudioSessionNoError if the operation was successful. If the property does not support listeners, kAudioSessionUnsupportedPropertyError will be returned. Other error codes listed under AudioSession Error Constants also apply to this function.
-
AudioServicesCreateSystemSoundID
public static int AudioServicesCreateSystemSoundID(CFURLRef inFileURL, org.moe.natj.general.ptr.IntPtr outSystemSoundID)
[@function] AudioServicesCreateSystemSoundID Allows the application to designate an audio file for playback by the System Sound server. Returned SystemSoundIDs are passed to AudioServicesPlayAlertSoundWithCompletion() and AudioServicesPlaySystemSoundWithCompletion() to be played. The maximum supported duration for a system sound is 30 secs.- Parameters:
inFileURL- A CFURLRef for an AudioFile.outSystemSoundID- Returns a SystemSoundID.
-
AudioServicesDisposeSystemSoundID
public static int AudioServicesDisposeSystemSoundID(int inSystemSoundID)
[@function] AudioServicesDisposeSystemSoundID Allows the System Sound server to dispose any resources needed for the provided SystemSoundID. Allows the application to tell the System Sound server that the resources for the associated audio file are no longer required.- Parameters:
inSystemSoundID- A SystemSoundID that the application no longer needs to use.
-
AudioServicesPlayAlertSoundWithCompletion
public static void AudioServicesPlayAlertSoundWithCompletion(int inSystemSoundID, AudioToolbox.Block_AudioServicesPlayAlertSoundWithCompletion inCompletionBlock)[@function] AudioServicesPlayAlertSoundWithCompletion Play an alert sound Play the sound designated by the provided SystemSoundID with alert sound behavior.- Parameters:
inSystemSoundID- The SystemSoundID to be played. On the desktop the kSystemSoundID_UserPreferredAlert constant can be passed in to play back the alert sound selected by the user in System Preferences. On iOS there is no preferred user alert sound.inCompletionBlock- The completion block gets executed for every attempt to play a system sound irrespective of success or failure. The callbacks are issued on a serial queue and the client is responsible for handling thread safety.
-
AudioServicesPlaySystemSoundWithCompletion
public static void AudioServicesPlaySystemSoundWithCompletion(int inSystemSoundID, AudioToolbox.Block_AudioServicesPlaySystemSoundWithCompletion inCompletionBlock)[@function] AudioServicesPlaySystemSoundWithCompletion Play a system sound Play the sound designated by the provided SystemSoundID.- Parameters:
inSystemSoundID- The SystemSoundID to be played.inCompletionBlock- The completion block gets executed for every attempt to play a system sound irrespective of success or failure. The callbacks are issued on a serial queue and the client is responsible for handling thread safety.
-
AudioServicesGetPropertyInfo
public static int AudioServicesGetPropertyInfo(int inPropertyID, int inSpecifierSize, org.moe.natj.general.ptr.ConstVoidPtr inSpecifier, org.moe.natj.general.ptr.IntPtr outPropertyDataSize, org.moe.natj.general.ptr.BytePtr outWritable)[@function] AudioServicesGetPropertyInfo Get information about the size of an AudioServices property and whether it can be set.- Parameters:
inPropertyID- a AudioServicesPropertyID constant.inSpecifierSize- The size of the specifier data.inSpecifier- A specifier is a buffer of data used as an input argument to some of the properties.outPropertyDataSize- The size in bytes of the current value of the property. In order to get the property value, you will need a buffer of this size.outWritable- Will be set to 1 if writable, or 0 if read only.- Returns:
- returns kAudioServicesNoError if successful.
-
AudioServicesGetProperty
public static int AudioServicesGetProperty(int inPropertyID, int inSpecifierSize, org.moe.natj.general.ptr.ConstVoidPtr inSpecifier, org.moe.natj.general.ptr.IntPtr ioPropertyDataSize, org.moe.natj.general.ptr.VoidPtr outPropertyData)[@function] AudioServicesGetProperty Retrieve the indicated property data- Parameters:
inPropertyID- a AudioServicesPropertyID constant.inSpecifierSize- The size of the specifier data.inSpecifier- A specifier is a buffer of data used as an input argument to some of the properties.ioPropertyDataSize- On input, the size of the outPropertyData buffer. On output the number of bytes written to the buffer.outPropertyData- The buffer in which to write the property data. May be NULL if caller only wants ioPropertyDataSize to be filled with the amount that would have been written.- Returns:
- returns kAudioServicesNoError if successful.
-
AudioServicesSetProperty
public static int AudioServicesSetProperty(int inPropertyID, int inSpecifierSize, org.moe.natj.general.ptr.ConstVoidPtr inSpecifier, int inPropertyDataSize, org.moe.natj.general.ptr.ConstVoidPtr inPropertyData)[@function] AudioServicesSetProperty Set the indicated property data- Parameters:
inPropertyID- a AudioServicesPropertyID constant.inSpecifierSize- The size of the specifier data.inSpecifier- A specifier is a buffer of data used as an input argument to some of the properties.inPropertyDataSize- The size of the inPropertyData buffer.inPropertyData- The buffer containing the property data.- Returns:
- returns kAudioServicesNoError if successful.
-
AudioServicesPlayAlertSound
public static void AudioServicesPlayAlertSound(int inSystemSoundID)
This function will be deprecated in a future release. Use AudioServicesPlayAlertSoundWithCompletion instead. [@function] AudioServicesPlayAlertSound Play an Alert Sound Play the provided SystemSoundID with AlertSound behavior.- Parameters:
inSystemSoundID- A SystemSoundID for the System Sound server to play. On the desktop you can pass the kSystemSoundID_UserPreferredAlert constant to playback the alert sound selected by the user in System Preferences. On iOS there is no preferred user alert sound.
-
AudioServicesPlaySystemSound
public static void AudioServicesPlaySystemSound(int inSystemSoundID)
This function will be deprecated in a future release. Use AudioServicesPlaySystemSoundWithCompletion instead. [@function] AudioServicesPlaySystemSound Play the sound designated by the provided SystemSoundID. A SystemSoundID indicating the desired System Sound to be played.- Parameters:
inSystemSoundID- A SystemSoundID for the System Sound server to play.
-
AudioServicesAddSystemSoundCompletion
public static int AudioServicesAddSystemSoundCompletion(int inSystemSoundID, CFRunLoopRef inRunLoop, CFStringRef inRunLoopMode, AudioToolbox.Function_AudioServicesAddSystemSoundCompletion inCompletionRoutine, org.moe.natj.general.ptr.VoidPtr inClientData)This function will be deprecated in a future release. Use AudioServicesPlayAlertSoundWithCompletion or AudioServicesPlaySystemSoundWithCompletion instead. [@function] AudioServicesAddSystemSoundCompletion Call the provided Completion Routine when provided SystemSoundID finishes playing. Once set, the System Sound server will send a message to the System Sound client indicating which SystemSoundID has finished playing.- Parameters:
inSystemSoundID- The SystemSoundID to associate with the provided completion routine.inRunLoop- A CFRunLoopRef indicating the desired run loop the completion routine should be run on. Pass NULL to use the main run loop.inRunLoopMode- A CFStringRef indicating the run loop mode for the runloop where the completion routine will be executed. Pass NULL to use kCFRunLoopDefaultMode.inCompletionRoutine- An AudioServicesSystemSoundCompletionProc to be called when the provided SystemSoundID has completed playing in the server.inClientData- A void* to pass client data to the completion routine.
-
AudioServicesRemoveSystemSoundCompletion
public static void AudioServicesRemoveSystemSoundCompletion(int inSystemSoundID)
This function will be deprecated in a future release. Use AudioServicesPlayAlertSoundWithCompletion or AudioServicesPlaySystemSoundWithCompletion instead. [@function] AudioServicesRemoveSystemSoundCompletion Disassociate any completion proc for the specified SystemSoundID Tells the SystemSound client to remove any completion proc associated with the provided SystemSoundID- Parameters:
inSystemSoundID- The SystemSoundID for which completion routines should be removed.
-
ExtAudioFileOpenURL
public static int ExtAudioFileOpenURL(CFURLRef inURL, org.moe.natj.general.ptr.Ptr<ExtAudioFileRef> outExtAudioFile)
[@function] ExtAudioFileOpenURL Opens an audio file specified by a CFURLRef. Allocates a new ExtAudioFileRef, for reading an existing audio file.- Parameters:
inURL- The audio file to read.outExtAudioFile- On exit, a newly-allocated ExtAudioFileRef.- Returns:
- An OSStatus error code.
-
ExtAudioFileWrapAudioFileID
public static int ExtAudioFileWrapAudioFileID(AudioFileID inFileID, byte inForWriting, org.moe.natj.general.ptr.Ptr<ExtAudioFileRef> outExtAudioFile)
[@function] ExtAudioFileWrapAudioFileID Wrap an AudioFileID in an ExtAudioFileRef. Allocates a new ExtAudioFileRef which wraps an existing AudioFileID. The client is responsible for keeping the AudioFileID open until the ExtAudioFileRef is disposed. Disposing the ExtAudioFileRef will not close the AudioFileID when this Wrap API call is used, so the client is also responsible for closing the AudioFileID when finished with it.- Parameters:
inFileID- The AudioFileID to wrap.inForWriting- True if the AudioFileID is a new file opened for writing.outExtAudioFile- On exit, a newly-allocated ExtAudioFileRef.- Returns:
- An OSStatus error code.
-
ExtAudioFileCreateWithURL
public static int ExtAudioFileCreateWithURL(CFURLRef inURL, int inFileType, AudioStreamBasicDescription inStreamDesc, AudioChannelLayout inChannelLayout, int inFlags, org.moe.natj.general.ptr.Ptr<ExtAudioFileRef> outExtAudioFile)
[@function] ExtAudioFileCreateWithURL Create a new audio file. Creates a new audio file. If the file to be created is in an encoded format, it is permissible for the sample rate in inStreamDesc to be 0, since in all cases, the file's encoding AudioConverter may produce audio at a different sample rate than the source. The file will be created with the audio format actually produced by the encoder.- Parameters:
inURL- The URL of the new audio file.inFileType- The type of file to create. This is a constant from AudioToolbox/AudioFile.h, e.g. kAudioFileAIFFType. Note that this is not an HFSTypeCode.inStreamDesc- The format of the audio data to be written to the file.inChannelLayout- The channel layout of the audio data. If non-null, this must be consistent with the number of channels specified by inStreamDesc.inFlags- The same flags as are used with AudioFileCreateWithURL Can use these to control whether an existing file is overwritten (or not).outExtAudioFile- On exit, a newly-allocated ExtAudioFileRef.- Returns:
- An OSStatus error code.
-
ExtAudioFileDispose
public static int ExtAudioFileDispose(ExtAudioFileRef inExtAudioFile)
[@function] ExtAudioFileDispose Close the file and dispose the object. Closes the file and deletes the object.- Parameters:
inExtAudioFile- The extended audio file object.- Returns:
- An OSStatus error code.
-
ExtAudioFileRead
public static int ExtAudioFileRead(ExtAudioFileRef inExtAudioFile, org.moe.natj.general.ptr.IntPtr ioNumberFrames, AudioBufferList ioData)
[@function] ExtAudioFileRead Perform a synchronous sequential read. If the file has a client data format, then the audio data from the file is translated from the file data format to the client format, via the ExtAudioFile's internal AudioConverter. (Note that the use of sequential reads/writes means that an ExtAudioFile must not be read on multiple threads; clients wishing to do this should use the lower-level AudioFile API set).- Parameters:
inExtAudioFile- The extended audio file object.ioNumberFrames- On entry, ioNumberFrames is the number of frames to be read from the file. On exit, it is the number of frames actually read. A number of factors may cause a fewer number of frames to be read, including the supplied buffers not being large enough, and internal optimizations. If 0 frames are returned, however, this indicates that end-of-file was reached.ioData- Buffer(s) into which the audio data is read.- Returns:
- An OSStatus error code.
-
ExtAudioFileWrite
public static int ExtAudioFileWrite(ExtAudioFileRef inExtAudioFile, int inNumberFrames, AudioBufferList ioData)
[@function] ExtAudioFileWrite Perform a synchronous sequential write. If the file has a client data format, then the audio data in ioData is translated from the client format to the file data format, via the ExtAudioFile's internal AudioConverter.- Parameters:
inExtAudioFile- The extended audio file object.inNumberFrames- The number of frames to write.ioData- The buffer(s) from which audio data is written to the file.- Returns:
- An OSStatus error code.
-
ExtAudioFileWriteAsync
public static int ExtAudioFileWriteAsync(ExtAudioFileRef inExtAudioFile, int inNumberFrames, AudioBufferList ioData)
[@function] ExtAudioFileWriteAsync Perform an asynchronous sequential write. Writes the provided buffer list to an internal ring buffer and notifies an internal thread to perform the write at a later time. The first time this is called, allocations may be performed. You can call this with 0 frames and null buffer in a non-time-critical context to initialize the asynchronous mechanism. Once initialized, subsequent calls are very efficient and do not take locks; thus this may be used to write to a file from a realtime thread. The client must not mix synchronous and asynchronous writes to the same file. Pending writes are not guaranteed to be flushed to disk until ExtAudioFileDispose is called. N.B. Errors may occur after this call has returned. Such errors may be returned from subsequent calls to this function.- Parameters:
inExtAudioFile- The extended audio file object.inNumberFrames- The number of frames to write.ioData- The buffer(s) from which audio data is written to the file.- Returns:
- An OSStatus error code.
-
ExtAudioFileSeek
public static int ExtAudioFileSeek(ExtAudioFileRef inExtAudioFile, long inFrameOffset)
[@function] ExtAudioFileSeek Seek to a specific frame position. Sets the file's read position to the specified sample frame number. The next call to ExtAudioFileRead will return samples from precisely this location, even if it is located in the middle of a packet. This function's behavior with files open for writing is currently undefined.- Parameters:
inExtAudioFile- The extended audio file object.inFrameOffset- The desired seek position, in sample frames, relative to the beginning of the file. This is specified in the sample rate and frame count of the file's format (not the client format)- Returns:
- An OSStatus error code.
-
ExtAudioFileTell
public static int ExtAudioFileTell(ExtAudioFileRef inExtAudioFile, org.moe.natj.general.ptr.LongPtr outFrameOffset)
[@function] ExtAudioFileTell Return the file's read/write position.- Parameters:
inExtAudioFile- The extended audio file object.outFrameOffset- On exit, the file's current read/write position in sample frames. This is specified in the sample rate and frame count of the file's format (not the client format)- Returns:
- An OSStatus error code.
-
ExtAudioFileGetPropertyInfo
public static int ExtAudioFileGetPropertyInfo(ExtAudioFileRef inExtAudioFile, int inPropertyID, org.moe.natj.general.ptr.IntPtr outSize, org.moe.natj.general.ptr.BytePtr outWritable)
[@function] ExtAudioFileGetPropertyInfo Get information about a property- Parameters:
inExtAudioFile- The extended audio file object.inPropertyID- The property being queried.outSize- If non-null, on exit, this is set to the size of the property's value.outWritable- If non-null, on exit, this indicates whether the property value is settable.- Returns:
- An OSStatus error code.
-
ExtAudioFileGetProperty
public static int ExtAudioFileGetProperty(ExtAudioFileRef inExtAudioFile, int inPropertyID, org.moe.natj.general.ptr.IntPtr ioPropertyDataSize, org.moe.natj.general.ptr.VoidPtr outPropertyData)
[@function] ExtAudioFileGetProperty Get a property value.- Parameters:
inExtAudioFile- The extended audio file object.inPropertyID- The property being fetched.ioPropertyDataSize- On entry, the size (in bytes) of the memory pointed to by outPropertyData. On exit, the actual size of the property data returned.outPropertyData- The value of the property is copied to the memory this points to.- Returns:
- An OSStatus error code.
-
ExtAudioFileSetProperty
public static int ExtAudioFileSetProperty(ExtAudioFileRef inExtAudioFile, int inPropertyID, int inPropertyDataSize, org.moe.natj.general.ptr.ConstVoidPtr inPropertyData)
[@function] ExtAudioFileSetProperty Set a property value.- Parameters:
inExtAudioFile- The extended audio file object.inPropertyID- The property being set.inPropertyDataSize- The size of the property data, in bytes.inPropertyData- Points to the property's new value.- Returns:
- An OSStatus error code.
-
NewMusicPlayer
public static int NewMusicPlayer(org.moe.natj.general.ptr.Ptr<MusicPlayer> outPlayer)
[@function] NewMusicPlayer Create a new music player A music player is used to play a sequence back. This call is used to create a player When a sequence is to be played by a player, it can play to either an AUGraph, a MIDI Destination or a mixture/combination of both.- Parameters:
outPlayer- the newly created player
-
DisposeMusicPlayer
public static int DisposeMusicPlayer(MusicPlayer inPlayer)
[@function] DisposeMusicPlayer Dispose a music player- Parameters:
inPlayer- the player to dispose
-
MusicPlayerSetSequence
public static int MusicPlayerSetSequence(MusicPlayer inPlayer, MusicSequence inSequence)
[@function] MusicPlayerSetSequence Set the sequence for the player to play A Sequence cannot be set on a player while it is playing. Setting a sequence will overide the currently set sequence.- Parameters:
inPlayer- the playerinSequence- the sequence for the player to play
-
MusicPlayerGetSequence
public static int MusicPlayerGetSequence(MusicPlayer inPlayer, org.moe.natj.general.ptr.Ptr<MusicSequence> outSequence)
[@function] MusicPlayerGetSequence Get the sequence attached to a player If the player does not have a sequence set, this will return the _NoSequence error- Parameters:
inPlayer- the playeroutSequence- the sequence currently set on the player
-
MusicPlayerSetTime
public static int MusicPlayerSetTime(MusicPlayer inPlayer, double inTime)
[@function] MusicPlayerSetTime Set the current time on the player The Get and Set Time calls take a specification of time as beats. This positions the player to the specified time based on the currently set sequence. No range checking on the time value is done. This can be set on a playing player (in which case playing will be resumed from the new time).- Parameters:
inPlayer- the playerinTime- the new time value
-
MusicPlayerGetTime
public static int MusicPlayerGetTime(MusicPlayer inPlayer, org.moe.natj.general.ptr.DoublePtr outTime)
[@function] MusicPlayerGetTime Get the current time of the player The Get and Set Time calls take a specification of time as beats. This retrieves the player's current time. If it is playing this time is the time of the player at the time the call was made.- Parameters:
inPlayer- the playeroutTime- the current time value
-
MusicPlayerGetHostTimeForBeats
public static int MusicPlayerGetHostTimeForBeats(MusicPlayer inPlayer, double inBeats, org.moe.natj.general.ptr.LongPtr outHostTime)
[@function] MusicPlayerGetHostTimeForBeats Returns the host time that will be (or was) played at the specified beat. This call is only valid if the player is playing and will return an error if the player is not playing or if the starting position of the player (its "starting beat") was after the specified beat. For general translation of beats to time in a sequence, see the MusicSequence calls for beat<->seconds. The call uses the player's sequence's tempo map to translate a beat time from the starting time and beat of the player.- Parameters:
inPlayer- the playerinBeats- the specified beat-time valueoutHostTime- the corresponding host time
-
MusicPlayerGetBeatsForHostTime
public static int MusicPlayerGetBeatsForHostTime(MusicPlayer inPlayer, long inHostTime, org.moe.natj.general.ptr.DoublePtr outBeats)
[@function] MusicPlayerGetBeatsForHostTime Returns the beat that will be (or was) played at the specified host time. This call is only valid if the player is playing and will return an error if the player is not playing or if the starting time of the player was after the specified host time. For general translation of beats to time in a sequence, see the MusicSequence calls for beat<->seconds. The call uses the player's sequence's tempo map to retrieve a beat time from the starting and specified host time.- Parameters:
inPlayer- the playerinHostTime- the specified host time valueoutBeats- the corresponding beat time
-
MusicPlayerPreroll
public static int MusicPlayerPreroll(MusicPlayer inPlayer)
[@function] MusicPlayerPreroll Prepare the player for playing Allows the player to prepare its state so that starting is has a lower latency. If a player is started without being prerolled, the player will pre-roll itself and then start.- Parameters:
inPlayer- the player
-
MusicPlayerStart
public static int MusicPlayerStart(MusicPlayer inPlayer)
[@function] MusicPlayerStart Start the player If the player has not been prerolled, it will pre-roll itself and then start.- Parameters:
inPlayer- the player
-
MusicPlayerStop
public static int MusicPlayerStop(MusicPlayer inPlayer)
[@function] MusicPlayerStop Stop the player- Parameters:
inPlayer- the player
-
MusicPlayerIsPlaying
public static int MusicPlayerIsPlaying(MusicPlayer inPlayer, org.moe.natj.general.ptr.BytePtr outIsPlaying)
[@function] MusicPlayerIsPlaying Returns the playing state of the player. "Is it playing?" This call returns a non-zero value in outIsPlaying if the player has been started and not stopped. It may have "played" past the events of the attached MusicSequence, but it is still considered to be playing (and its time value increasing) until it is explicitly stopped- Parameters:
inPlayer- the playeroutIsPlaying- false if not, true (non-zero) if is playing
-
MusicPlayerSetPlayRateScalar
public static int MusicPlayerSetPlayRateScalar(MusicPlayer inPlayer, double inScaleRate)
[@function] MusicPlayerSetPlayRateScalar Scale the playback rate of the player- Parameters:
inPlayer- the playerinScaleRate- a scalar that will be applied to the playback rate. If 2, playback is twice as fast, if 0.5 it is half as fast. As a scalar, the value must be greater than zero.
-
MusicPlayerGetPlayRateScalar
public static int MusicPlayerGetPlayRateScalar(MusicPlayer inPlayer, org.moe.natj.general.ptr.DoublePtr outScaleRate)
[@function] MusicPlayerGetPlayRateScalar Get the playback rate scalar of the player- Parameters:
inPlayer- the playeroutScaleRate- the current scalar being applied to the player. Default value is 1.0
-
NewMusicSequence
public static int NewMusicSequence(org.moe.natj.general.ptr.Ptr<MusicSequence> outSequence)
[@functiongroup] Music Sequence [@function] NewMusicSequence Create a new empty sequence A new music sequence will only have a tempo track (with a default tempo of 120 bpm), and the default type is beat based. When a sequence is to be played by a player, it can play to either an AUGraph, a MIDI Destination or a mixture/combination of both. See MusicSequenceSetAUGraph and MusicSequenceSetMIDIEndpoint for the generic destination assignments. Specific tracks can also be assigned nodes of a graph or a MIDI endpoint as targets for the events that they contain; see MusicTrackSetDestNode and MusicTrackSetDestMIDIEndpoint.- Parameters:
outSequence- the new sequence
-
DisposeMusicSequence
public static int DisposeMusicSequence(MusicSequence inSequence)
[@function] DisposeMusicSequence Dispose the sequence A sequence cannot be disposed while a MusicPlayer has it.- Parameters:
inSequence- the sequence
-
MusicSequenceNewTrack
public static int MusicSequenceNewTrack(MusicSequence inSequence, org.moe.natj.general.ptr.Ptr<MusicTrack> outTrack)
[@function] MusicSequenceNewTrack Add a new (empty) track to the sequence- Parameters:
inSequence- the sequenceoutTrack- the new track (it is always appended to any existing tracks)
-
MusicSequenceDisposeTrack
public static int MusicSequenceDisposeTrack(MusicSequence inSequence, MusicTrack inTrack)
[@function] MusicSequenceDisposeTrack Remove and dispose a track from a sequence- Parameters:
inSequence- the sequenceinTrack- the track to remove and dispose
-
MusicSequenceGetTrackCount
public static int MusicSequenceGetTrackCount(MusicSequence inSequence, org.moe.natj.general.ptr.IntPtr outNumberOfTracks)
[@function] MusicSequenceGetTrackCount The number of tracks in a sequence. The track count and accessors exclude the tempo track (which is treated as a special case)- Parameters:
inSequence- the sequenceoutNumberOfTracks- the number of tracks
-
MusicSequenceGetIndTrack
public static int MusicSequenceGetIndTrack(MusicSequence inSequence, int inTrackIndex, org.moe.natj.general.ptr.Ptr<MusicTrack> outTrack)
[@function] MusicSequenceGetIndTrack Get a track at the specified index Index is zero based. It will return kAudio_ParamError if index is not in the range: 0 < TrackCount The track count and accessors exclude the tempo track (which is treated as a special case)- Parameters:
inSequence- the sequenceinTrackIndex- the indexoutTrack- the track at that index
-
MusicSequenceGetTrackIndex
public static int MusicSequenceGetTrackIndex(MusicSequence inSequence, MusicTrack inTrack, org.moe.natj.general.ptr.IntPtr outTrackIndex)
[@function] MusicSequenceGetTrackIndex Get the index for a specific track Index is zero based. It will return an error if the track is not a member of the sequence. The track count and accessors exclude the tempo track (which is treated as a special case)- Parameters:
inSequence- the sequenceinTrack- the trackoutTrackIndex- the index of the track
-
MusicSequenceGetTempoTrack
public static int MusicSequenceGetTempoTrack(MusicSequence inSequence, org.moe.natj.general.ptr.Ptr<MusicTrack> outTrack)
[@function] MusicSequenceGetTempoTrack Get the tempo track of the sequence Each sequence has a single tempo track. All tempo events are placed into this tempo track (as well as other appropriate events (time sig for instance from a MIDI file). The tempo track, once retrieved can be edited and iterated upon as any other track. Non-tempo events in a tempo track are ignored.- Parameters:
inSequence- the sequenceoutTrack- the tempo track of the sequence
-
MusicSequenceSetAUGraph
public static int MusicSequenceSetAUGraph(MusicSequence inSequence, AUGraph inGraph)
[@function] MusicSequenceSetAUGraph Set the graph to be associated with the sequence A sequence can be associated with an AUGraph and this graph will be used to render the events as controlled by the sequence when it is played. By default, all of the tracks of a sequence will find the first AUNode that is an instance of an Apple MusicDevice audio unit (see MusicSequenceGetAUGraph). Specific nodes of the graph can be targeted for different tracks (see MusicTrackSetDestNode). To render a multi-track GM MIDI sequence on iOS, create a custom graph with a MIDISynth audio unit as the MusicDevice. If inGraph is set to NULL, the sequence will reset to use the default graph.- Parameters:
inSequence- the sequenceinGraph- the graph
-
MusicSequenceGetAUGraph
public static int MusicSequenceGetAUGraph(MusicSequence inSequence, org.moe.natj.general.ptr.Ptr<AUGraph> outGraph)
[@function] MusicSequenceGetAUGraph Gets the graph currently associated with a sequence By default if no graph is assigned to a sequence then the sequence will create a default graph. This default graph contains a MusicDevice and a DynamicsProcessor and all tracks will be targeted to the MusicDevice. On macOS, this MusicDevice is an instance of a software synthesizer that is compatible with the GM and GS MIDI standards. On iOS, it is an instance of a monotimbral software synthesizer designed to render events from a single MIDI channel. To render multi-track GM MIDI sequences on iOS, create a custom graph with a MIDISynth audio unit as the MusicDevice. This call will thus either return the graph as set by the user, or this default graph.- Parameters:
inSequence- the sequenceoutGraph- the graph
-
MusicSequenceSetMIDIEndpoint
public static int MusicSequenceSetMIDIEndpoint(MusicSequence inSequence, int inEndpoint)
[@function] MusicSequenceSetMIDIEndpoint Makes the target of all of the tracks in the sequence a MIDI endpoint This is a convenience function, and is equivalent to iterating through all of the tracks in a sequence and targeting each track to the MIDI endpoint- Parameters:
inSequence- the sequenceinEndpoint- the MIDI endpoint
-
MusicSequenceSetSequenceType
public static int MusicSequenceSetSequenceType(MusicSequence inSequence, int inType)
[@function] MusicSequenceSetSequenceType Set the sequence type (the default is beats) These two calls allow you to get and set a MusicSequence type; specifying kMusicSequenceType_Beats = 'beat', kMusicSequenceType_Seconds = 'secs', kMusicSequenceType_Samples = 'samp' The sequence type can be set to beats at any time. The sequence type can only be set to seconds or samples if there are NO tempo events already in the sequence. For beats - it can have as many tempo events as you want For Samples and Seconds - you should add a single tempo event after setting the type Samples - the tempo is the desired sample rate - e.g. 44100 and each "beat" in the sequence will be interpreted as a sample count at that sample rate (so beat == 44100 is a second) Seconds - the tempo should be set to 60 - a beat is a second. Beats is the default (and is the behaviour on pre 10.5 systems) A meta event of interest for Seconds based MIDI files is the SMPTE Offset meta event - stored in the tempo track. The sequence doesn't do anything with this event (except store/write it)- Parameters:
inSequence- the sequenceinType- the sequence type
-
MusicSequenceGetSequenceType
public static int MusicSequenceGetSequenceType(MusicSequence inSequence, org.moe.natj.general.ptr.IntPtr outType)
[@function] MusicSequenceGetSequenceType Get the sequence type See SetSequence for a full description- Parameters:
inSequence- the sequenceoutType- the type
-
MusicSequenceFileLoad
public static int MusicSequenceFileLoad(MusicSequence inSequence, CFURLRef inFileRef, int inFileTypeHint, int inFlags)
[@function] MusicSequenceFileLoad Load the data contained within the referenced file to the sequence This function will parse the file referenced by the URL and add the events to the sequence.- Parameters:
inSequence- the sequenceinFileRef- a file:// URL that references a fileinFileTypeHint- provides a hint to the sequence on the file type being imported. Can be zero in many cases.inFlags- flags that can control how the data is parsed in the file and laid out in the tracks that will be created and added to the sequence in this operation
-
MusicSequenceFileLoadData
public static int MusicSequenceFileLoadData(MusicSequence inSequence, CFDataRef inData, int inFileTypeHint, int inFlags)
[@function] MusicSequenceFileLoadData Load the data to the sequence This function will parse the data and add the events to the sequence. The data provided needs to be of a particular file type as specified by the fileTypeHint.- Parameters:
inSequence- the sequenceinData- the contents of a valid file loaded into a CFData objectinFileTypeHint- provides a hint to the sequence on the file type being imported. Can be zero in many cases.inFlags- flags that can control how the data is parsed in the file and laid out in the tracks that will be created and added to the sequence in this operation
-
MusicSequenceSetSMPTEResolution
public static short MusicSequenceSetSMPTEResolution(byte fps, byte ticks)[@function] MusicSequenceSetSMPTEResolution Helper function to establish the SMPTE based MIDI file resolution for the specified ticks SMPTE resolution helpers for dealing with the interpretation and creation of tick values for standard MIDI files (see MusicSequenceFileCreate)- Parameters:
fps- the frames per secondticks- the ticks per quarter note- Returns:
- the resolution that can be used when creating a MIDI file derived from the two parameters
-
MusicSequenceGetSMPTEResolution
public static void MusicSequenceGetSMPTEResolution(short inRes, org.moe.natj.general.ptr.BytePtr fps, org.moe.natj.general.ptr.BytePtr ticks)[@function] MusicSequenceGetSMPTEResolution Helper function to get the fps and ticks from their representation in a SMPTE based MIDI file SMPTE resolution helpers for dealing with the interpretation and creation of tick values for standard MIDI files (see MusicSequenceFileCreate)- Parameters:
inRes- the resolution from a MIDI filefps- the frames per secondticks- the ticks per quarter note
-
MusicSequenceFileCreate
public static int MusicSequenceFileCreate(MusicSequence inSequence, CFURLRef inFileRef, int inFileType, int inFlags, short inResolution)
[@function] MusicSequenceFileCreate Create a file from a sequence This function can be (and is most commonly) used to create a MIDI file from the events in a sequence. Only MIDI based events are used when creating the MIDI file. MIDI files are normally beat based, but can also have a SMPTE (or real-time rather than beat time) representation. inResolution is relationship between "tick" and quarter note for saving to Standard MIDI File - pass in zero to use default - this will be the value that is currently set on the tempo track - see the comments for the set track property's time resolution The different Sequence types determine the kinds of files that can be created: Beats When saving a MIDI file, it saves a beats (PPQ) based axis Seconds When saving a MIDI file, it will save it as a SMPTE resolution - so you should specify this resolution when creating the MIDI file. If zero is specified, 25 fps and 40 ticks/frame is used (a time scale of a millisecond) Samples You cannot save to a MIDI file with this sequence type The complete meaning of the 16-bit "division" field in a MIDI File's MThd chunk. If it is positive, then a tick represents 1/D quarter notes. If it negative: bits 14-8 are a signed 7-bit number representing the SMPTE format: -24, -25, -29 (drop), -30 bits 7-0 represents the number of ticks per SMPTE frame typical values: 4, 10, 80, 100 You can obtain millisecond resolution by specifying 25 frames/sec and 40 divisions/frame. 30 fps with 80 bits (ticks) per frame: 0xE250 ((char)0xE2 == -30)- Parameters:
inSequence- the sequenceinFileRef- the location of the file to createinFileType- the type of file to createinFlags- flags to control the file creationinResolution- the resolution (depending on file type and sequence type)
-
MusicSequenceFileCreateData
public static int MusicSequenceFileCreateData(MusicSequence inSequence, int inFileType, int inFlags, short inResolution, org.moe.natj.general.ptr.Ptr<CFDataRef> outData)
[@function] MusicSequenceFileCreateData Create a data object from a sequence The same basic parameters apply to this as with the MusicSequenceFileCreate function. The difference being that that function will create a file on disk, whereas this one will create a CFData object that is a file in memory. The CFData object should be released by the caller.- Parameters:
inSequence- the sequenceinFileType- the type of file to createinFlags- flags to control the file creationinResolution- the resolution (depending on file type and sequence type)outData- the resulting data object
-
MusicSequenceReverse
public static int MusicSequenceReverse(MusicSequence inSequence)
[@function] MusicSequenceReverse Reverse in time all events in a sequence, including the tempo events- Parameters:
inSequence- the sequence
-
MusicSequenceGetSecondsForBeats
public static int MusicSequenceGetSecondsForBeats(MusicSequence inSequence, double inBeats, org.moe.natj.general.ptr.DoublePtr outSeconds)
[@function] MusicSequenceGetSecondsForBeats Returns a seconds value that would correspond to the supplied beats Uses the sequence's tempo events- Parameters:
inSequence- the sequenceinBeats- the beatsoutSeconds- the seconds (time from 0 beat)
-
MusicSequenceGetBeatsForSeconds
public static int MusicSequenceGetBeatsForSeconds(MusicSequence inSequence, double inSeconds, org.moe.natj.general.ptr.DoublePtr outBeats)
[@function] MusicSequenceGetBeatsForSeconds Returns a beat value that would correspond to the supplied seconds from zero. Uses the sequence's tempo events- Parameters:
inSequence- the sequenceinSeconds- the secondsoutBeats- the corresponding beat
-
MusicSequenceSetUserCallback
public static int MusicSequenceSetUserCallback(MusicSequence inSequence, AudioToolbox.Function_MusicSequenceSetUserCallback inCallback, org.moe.natj.general.ptr.VoidPtr inClientData)
[@function] MusicSequenceSetUserCallback Establish a user callback for a sequence This call is used to register (or remove if inCallback is NULL) a callback that the MusicSequence will call for ANY UserEvents that are added to any of the tracks of the sequence. If there is a callback registered, then UserEvents will be chased when MusicPlayerSetTime is called. In that case the inStartSliceBeat and inEndSliceBeat will both be the same value and will be the beat that the player is chasing too. In normal cases, where the sequence data is being scheduled for playback, the following will apply: inStartSliceBeat <= inEventTime < inEndSliceBeat The only exception to this is if the track that owns the MusicEvent is looping. In this case the start beat will still be less than the end beat (so your callback can still determine that it is playing, and what beats are currently being scheduled), however, the inEventTime will be the original time-stamped time of the user event.- Parameters:
inSequence- the sequenceinCallback- the callbackinClientData- client (user supplied) data provided back to the callback when it is called by the sequence
-
MusicSequenceBeatsToBarBeatTime
public static int MusicSequenceBeatsToBarBeatTime(MusicSequence inSequence, double inBeats, int inSubbeatDivisor, CABarBeatTime outBarBeatTime)
[@function] MusicSequenceBeatsToBarBeatTime Convenience function to format a sequence's beat time to its bar-beat time The sequence's tempo track Time Sig events are used to to calculate the bar-beat representation. If there are no Time Sig events added to the sequence 4/4 is assumed. A Time Sig event is a MIDI Meta Event as specified for MIDI files.- Parameters:
inSequence- the sequenceinBeats- the beat which should be represented by the bar-beatinSubbeatDivisor- The denominator of the fractional number of beats.outBarBeatTime- the formatted bar/beat time
-
MusicSequenceBarBeatTimeToBeats
public static int MusicSequenceBarBeatTimeToBeats(MusicSequence inSequence, CABarBeatTime inBarBeatTime, org.moe.natj.general.ptr.DoublePtr outBeats)
[@function] MusicSequenceBarBeatTimeToBeats Convenience function to format a bar-beat time to a sequence's beat time The sequence's tempo track Time Sig events are used to to calculate the bar-beat representation. If there are no Time Sig events added to the sequence 4/4 is assumed. A Time Sig event is a MIDI Meta Event as specified for MIDI files.- Parameters:
inSequence- the sequenceinBarBeatTime- the bar-beat timeoutBeats- the sequence's beat time for that bar-beat time
-
MusicSequenceGetInfoDictionary
public static CFDictionaryRef MusicSequenceGetInfoDictionary(MusicSequence inSequence)
[@function] MusicSequenceGetInfoDictionary Returns a dictionary containing meta-data derived from a sequence The dictionary can contain one or more of the kAFInfoDictionary_* keys specified inThe caller should release the returned dictionary. If the call fails it will return NULL - Parameters:
inSequence- the sequence- Returns:
- a CFDictionary or NULL if the call fails.
-
MusicTrackGetSequence
public static int MusicTrackGetSequence(MusicTrack inTrack, org.moe.natj.general.ptr.Ptr<MusicSequence> outSequence)
[@function] MusicTrackGetSequence Gets the sequence which the track is a member of- Parameters:
inTrack- the trackoutSequence- the track's sequence
-
MusicTrackSetDestNode
public static int MusicTrackSetDestNode(MusicTrack inTrack, int inNode)
[@function] MusicTrackSetDestNode Sets the track's target to the specified AUNode The node must be a member of the graph that the track's sequence is using. When played, the track will send all of its events to that node.- Parameters:
inTrack- the trackinNode- the new node
-
MusicTrackSetDestMIDIEndpoint
public static int MusicTrackSetDestMIDIEndpoint(MusicTrack inTrack, int inEndpoint)
[@function] MusicTrackSetDestMIDIEndpoint Sets the track's target to the specified MIDI endpoint When played, the track will send all of its events to the specified MIDI Endpoint.- Parameters:
inTrack- the trackinEndpoint- the new MIDI endpoint
-
MusicTrackGetDestNode
public static int MusicTrackGetDestNode(MusicTrack inTrack, org.moe.natj.general.ptr.IntPtr outNode)
[@function] MusicTrackGetDestNode Gets the track's target if it is an AUNode Returns kAudioToolboxErr_IllegalTrackDestination if the track's target is a MIDIEndpointRef and NOT an AUNode- Parameters:
inTrack- the trackoutNode- the node target for the track
-
MusicTrackGetDestMIDIEndpoint
public static int MusicTrackGetDestMIDIEndpoint(MusicTrack inTrack, org.moe.natj.general.ptr.IntPtr outEndpoint)
[@function] MusicTrackGetDestMIDIEndpoint Gets the track's target if it is a MIDI Endpoint Returns kAudioToolboxErr_IllegalTrackDestination if the track's target is an AUNode and NOT a MIDI Endpoint- Parameters:
inTrack- the trackoutEndpoint- the MIDI Endpoint target for the track
-
MusicTrackSetProperty
public static int MusicTrackSetProperty(MusicTrack inTrack, int inPropertyID, org.moe.natj.general.ptr.VoidPtr inData, int inLength)
[@function] MusicTrackSetProperty Sets the specified property value Property values are always get and set by reference- Parameters:
inTrack- the trackinPropertyID- the property IDinData- the new property valueinLength- the size of the property value being set
-
MusicTrackGetProperty
public static int MusicTrackGetProperty(MusicTrack inTrack, int inPropertyID, org.moe.natj.general.ptr.VoidPtr outData, org.moe.natj.general.ptr.IntPtr ioLength)
[@function] MusicTrackGetProperty Gets the specified property value If outData is NULL, then the size of the data will be passed back in ioLength This allows the client to allocate a buffer of the correct size (useful for variable length properties -- currently all properties have fixed size) Property values are always get and set by reference- Parameters:
inTrack- the trackinPropertyID- the property IDoutData- if not NULL, points to data of size ioLengthioLength- on input the available size of outData, on output the size of the valid data that outData will then point too.
-
MusicTrackMoveEvents
public static int MusicTrackMoveEvents(MusicTrack inTrack, double inStartTime, double inEndTime, double inMoveTime)
[@function] MusicTrackMoveEvents Move events in a track Moves all of the events in the specified time range by the moveTime. MoveTime maybe negative to move events backwards (towards zero). All time ranges are [starttime < endtime]- Parameters:
inTrack- the trackinStartTime- the start time for the range of eventsinEndTime- the end time up to which will form the range of the events to moveinMoveTime- amount of beats to move the selected events.
-
MusicTrackClear
public static int MusicTrackClear(MusicTrack inTrack, double inStartTime, double inEndTime)
[@function] MusicTrackClear Removes all events within the specified range All time ranges are [starttime < endtime]- Parameters:
inTrack- the trackinStartTime- the start time for the range of eventsinEndTime- the end time up to which will form the range of the events to clear
-
MusicTrackCut
public static int MusicTrackCut(MusicTrack inTrack, double inStartTime, double inEndTime)
[@function] MusicTrackCut Removes all the events within the specified range Events that fall past the specified range will be moved back by the specified range time. All time ranges are [starttime < endtime]- Parameters:
inTrack- the trackinStartTime- the start time for the range of eventsinEndTime- the end time up to which will form the range of the events to cut out
-
MusicTrackCopyInsert
public static int MusicTrackCopyInsert(MusicTrack inSourceTrack, double inSourceStartTime, double inSourceEndTime, MusicTrack inDestTrack, double inDestInsertTime)
[@function] MusicTrackCopyInsert Copies events from one track and inserts them into another Copies all of the events with the specified time range of the source track. It then inserts those events into the destination track. All events at and after inDestInsertTime in inDestTrack are moved forward by the range's duration All time ranges are [starttime < endtime]- Parameters:
inSourceTrack- the source trackinSourceStartTime- the start time for the range of eventsinSourceEndTime- the end time up to which will form the range of the events to copy from the source trackinDestTrack- the destination track to copy tooinDestInsertTime- the time at which the copied events will be inserted.
-
MusicTrackMerge
public static int MusicTrackMerge(MusicTrack inSourceTrack, double inSourceStartTime, double inSourceEndTime, MusicTrack inDestTrack, double inDestInsertTime)
[@function] MusicTrackMerge Copies events from one track and merges them into another Copies all of the events with the specified time range of the source track. It then merges those events into the destination track starting at inDestInsertTime. All time ranges are [starttime < endtime]- Parameters:
inSourceTrack- the source trackinSourceStartTime- the start time for the range of eventsinSourceEndTime- the end time up to which will form the range of the events to copy from the source trackinDestTrack- the destination track to copy tooinDestInsertTime- the time at which the copied events will be merged.
-
MusicTrackNewMIDINoteEvent
public static int MusicTrackNewMIDINoteEvent(MusicTrack inTrack, double inTimeStamp, MIDINoteMessage inMessage)
[@function] MusicTrackNewMIDINoteEvent Adds a MIDINoteMessage event to a track The event is added at the specified time stamp. The time stamp should not be less than zero.- Parameters:
inTrack- the trackinTimeStamp- the time stampinMessage- the event
-
MusicTrackNewMIDIChannelEvent
public static int MusicTrackNewMIDIChannelEvent(MusicTrack inTrack, double inTimeStamp, MIDIChannelMessage inMessage)
[@function] MusicTrackNewMIDIChannelEvent Adds a MIDIChannelMessage event to a track The event is added at the specified time stamp. The time stamp should not be less than zero.- Parameters:
inTrack- the trackinTimeStamp- the time stampinMessage- the event
-
MusicTrackNewMIDIRawDataEvent
public static int MusicTrackNewMIDIRawDataEvent(MusicTrack inTrack, double inTimeStamp, MIDIRawData inRawData)
[@function] MusicTrackNewMIDIRawDataEvent Adds a MIDIRawData event to a track The event is added at the specified time stamp. The time stamp should not be less than zero.- Parameters:
inTrack- the trackinTimeStamp- the time stampinRawData- the event
-
MusicTrackNewExtendedNoteEvent
public static int MusicTrackNewExtendedNoteEvent(MusicTrack inTrack, double inTimeStamp, ExtendedNoteOnEvent inInfo)
[@function] MusicTrackNewExtendedNoteEvent Adds a ExtendedNoteOnEvent to a track The event is added at the specified time stamp. The time stamp should not be less than zero.- Parameters:
inTrack- the trackinTimeStamp- the time stampinInfo- the event
-
MusicTrackNewParameterEvent
public static int MusicTrackNewParameterEvent(MusicTrack inTrack, double inTimeStamp, ParameterEvent inInfo)
[@function] MusicTrackNewParameterEvent Adds a ParameterEvent to a track The event is added at the specified time stamp. The time stamp should not be less than zero.- Parameters:
inTrack- the trackinTimeStamp- the time stampinInfo- the event
-
MusicTrackNewExtendedTempoEvent
public static int MusicTrackNewExtendedTempoEvent(MusicTrack inTrack, double inTimeStamp, double inBPM)
[@function] MusicTrackNewExtendedTempoEvent Adds a tempo event to a track The event is added at the specified time stamp. The time stamp should not be less than zero.- Parameters:
inTrack- the trackinTimeStamp- the time stampinBPM- the event
-
MusicTrackNewMetaEvent
public static int MusicTrackNewMetaEvent(MusicTrack inTrack, double inTimeStamp, MIDIMetaEvent inMetaEvent)
[@function] MusicTrackNewMetaEvent Adds a MIDIMetaEvent to a track The event is added at the specified time stamp. The time stamp should not be less than zero.- Parameters:
inTrack- the trackinTimeStamp- the time stampinMetaEvent- the event
-
MusicTrackNewUserEvent
public static int MusicTrackNewUserEvent(MusicTrack inTrack, double inTimeStamp, MusicEventUserData inUserData)
[@function] MusicEventUserData Adds a MusicEventUserData event to a track The event is added at the specified time stamp. The time stamp should not be less than zero.- Parameters:
inTrack- the trackinTimeStamp- the time stampinUserData- the event
-
MusicTrackNewAUPresetEvent
public static int MusicTrackNewAUPresetEvent(MusicTrack inTrack, double inTimeStamp, AUPresetEvent inPresetEvent)
[@function] MusicTrackNewAUPresetEvent Adds a AUPresetEvent to a track The event is added at the specified time stamp. The time stamp should not be less than zero.- Parameters:
inTrack- the trackinTimeStamp- the time stampinPresetEvent- the event
-
NewMusicEventIterator
public static int NewMusicEventIterator(MusicTrack inTrack, org.moe.natj.general.ptr.Ptr<MusicEventIterator> outIterator)
[@function] NewMusicEventIterator Creates an iterator to iterator over a track's events The iterator should be considered invalid if a track is edited. In that case you should create a new iterator and seek it to the desired position.- Parameters:
inTrack- the track upon which to iterateoutIterator- the new iterator
-
DisposeMusicEventIterator
public static int DisposeMusicEventIterator(MusicEventIterator inIterator)
[@function] DisposeMusicEventIterator Dispose an iterator- Parameters:
inIterator- the iterator
-
MusicEventIteratorSeek
public static int MusicEventIteratorSeek(MusicEventIterator inIterator, double inTimeStamp)
[@function] MusicEventIteratorSeek Move the iterator to an event at the specified time If there is no event at the specified time, the iterator will point to the first event after that time. By specifying kMusicTimeStamp_EndOfTrack you will position the iterator to the end of track (which is pointing to the space just AFTER the last event). You can use MusicEventIteratorPreviousEvent to backup to the last event. By specifying 0, you will position the iterator at the first event- Parameters:
inIterator- the iteratorinTimeStamp- the time stamp to seek too
-
MusicEventIteratorNextEvent
public static int MusicEventIteratorNextEvent(MusicEventIterator inIterator)
[@function] MusicEventIteratorNextEvent Move the iterator to the next event If the iterator was at the last event, then it will move past the last event and will no longer point to an event. You can use check MusicEventIteratorHasCurrentEvent to see if there is an event at the iterator's current position. See also MusicEventIteratorHasNextEvent. Typically this call is used to move the iterator forwards through the track's events.- Parameters:
inIterator- the iterator
-
MusicEventIteratorPreviousEvent
public static int MusicEventIteratorPreviousEvent(MusicEventIterator inIterator)
[@function] MusicEventIteratorPreviousEvent Move the iterator to the previous event If the iterator was at the first event, then it will leave the iterator unchanged and return an error. See also MusicEventIteratorHasPreviousEvent Typically this call is used to move the iterator backwards through the track's events.- Parameters:
inIterator- the iterator
-
MusicEventIteratorGetEventInfo
public static int MusicEventIteratorGetEventInfo(MusicEventIterator inIterator, org.moe.natj.general.ptr.DoublePtr outTimeStamp, org.moe.natj.general.ptr.IntPtr outEventType, org.moe.natj.general.ptr.Ptr<org.moe.natj.general.ptr.ConstVoidPtr> outEventData, org.moe.natj.general.ptr.IntPtr outEventDataSize)
[@function] MusicEventIteratorGetEventInfo Retrieves the event data at the iterator. Retrieves the event and other information from the iterator's current position. If you do not want specific information (eg, the time stamp) pass in NULL for that parameter.- Parameters:
inIterator- the iteratoroutTimeStamp- the time stamp of the eventoutEventType- one of kMusicEventType_XXX that indicates what kind of event type the iterator is currently pointing toooutEventData- a reference to the event data. The type of data is described by the eventType. This data is read only and should not be edited in place.outEventDataSize- the size of the data referenced by outEventData
-
MusicEventIteratorSetEventInfo
public static int MusicEventIteratorSetEventInfo(MusicEventIterator inIterator, int inEventType, org.moe.natj.general.ptr.ConstVoidPtr inEventData)
[@function] MusicEventIteratorSetEventInfo Changes the type or value of an event Allows you to change either the event type, or the values of the event data, that the iterator is currently pointing too. You cannot change the event's time (to do that you should use MusicEventIteratorSetEventTime).- Parameters:
inIterator- the iteratorinEventType- the new (or existing) type of the event you are changinginEventData- the new event data. The size and type of this event data must match the inEventType
-
MusicEventIteratorSetEventTime
public static int MusicEventIteratorSetEventTime(MusicEventIterator inIterator, double inTimeStamp)
[@function] MusicEventIteratorSetEventTime Set a new time for an event The iterator will still be pointing to the same event, but as the event will have moved, it may or may not have a next or previous event now (depending of course on the time you moved it too).- Parameters:
inIterator- the iteratorinTimeStamp- the new time stamp of the event
-
MusicEventIteratorDeleteEvent
public static int MusicEventIteratorDeleteEvent(MusicEventIterator inIterator)
[@function] MusicEventIteratorDeleteEvent Deletes the event pointed to by the iterator The iterator will reference the next event after the event has been deleted.- Parameters:
inIterator- the iterator
-
MusicEventIteratorHasPreviousEvent
public static int MusicEventIteratorHasPreviousEvent(MusicEventIterator inIterator, org.moe.natj.general.ptr.BytePtr outHasPrevEvent)
[@function] MusicEventIteratorHasPreviousEvent Does the track have an event previous to the event the iterator is pointing to? To use the iterator going backwards through a track: iter = New Iterator (points at first event) MusicEventIteratorSeek (iter, kMusicTimeStamp_EndOfTrack) // will point it past the last event bool hasPreviousEvent; MusicEventIteratorHasPreviousEvent (iter, &hasPreviousEvent) while (hasPreviousEvent) { MusicEventIteratorPreviousEvent (iter) // do work... MusicEventIteratorGetEventInfo (iter, ... MusicEventIteratorHasPreviousEvent (iter, &hasPreviousEvent); }- Parameters:
inIterator- the iteratoroutHasPrevEvent- true if there is a previous event, false if not
-
MusicEventIteratorHasNextEvent
public static int MusicEventIteratorHasNextEvent(MusicEventIterator inIterator, org.moe.natj.general.ptr.BytePtr outHasNextEvent)
[@function] MusicEventIteratorHasNextEvent Does the track have an event past the event the iterator is pointing too? To use the iterator going forwards through a track: iter = New Iterator (points at first event) bool hasCurrentEvent; MusicEventIteratorHasCurrentEvent(iter, &hasCurrentEvent); while (hasCurrentEvent) { // do work... MusicEventIteratorGetEventInfo (iter, ... MusicEventIteratorNextEvent (iter) MusicEventIteratorHasCurrentEvent(iter, &hasCurrentEvent); }- Parameters:
inIterator- the iteratoroutHasNextEvent- true if there is a next event, false if not
-
MusicEventIteratorHasCurrentEvent
public static int MusicEventIteratorHasCurrentEvent(MusicEventIterator inIterator, org.moe.natj.general.ptr.BytePtr outHasCurEvent)
[@function] MusicEventIteratorHasCurrentEvent Is there an event at the iterator's current position?- Parameters:
inIterator- the iteratoroutHasCurEvent- true if there is an event, false if not
-
CAShow
public static void CAShow(org.moe.natj.general.ptr.VoidPtr inObject)
Print the internal state of an object to os_log.
-
CAShowFile
public static void CAShowFile(org.moe.natj.general.ptr.VoidPtr inObject, FILE inFile)Print the internal state of an object to the supplied FILE*.
-
CopyNameFromSoundBank
public static int CopyNameFromSoundBank(CFURLRef inURL, org.moe.natj.general.ptr.Ptr<CFStringRef> outName)
[@function] CopyNameFromSoundBank This will return the name of a sound bank from a DLS or SF2 bank. The name should be released by the caller.- Parameters:
inURL- The URL for the sound bank.outName- A pointer to a CFStringRef to be created and returned by the function.- Returns:
- returns noErr if successful.
-
CopyInstrumentInfoFromSoundBank
public static int CopyInstrumentInfoFromSoundBank(CFURLRef inURL, org.moe.natj.general.ptr.Ptr<CFArrayRef> outInstrumentInfo)
[@function] CopyInstrumentInfoFromSoundBank This will return a CFArray of CFDictionaries, one per instrument found in the DLS or SF2 bank. Each dictionary will contain four items accessed via CFStringRef versions of the keys kInstrumentInfoKey_MSB, kInstrumentInfoKey_LSB, kInstrumentInfoKey_Program, and kInstrumentInfoKey_Name. MSB: An NSNumberRef for the most-significant byte of the bank number. GM melodic banks will return 120 (0x78). GM percussion banks will return 121 (0x79). Custom banks will return their literal value. LSB: An NSNumberRef for the least-significant byte of the bank number. All GM banks will return the bank variation number (0-127). Program Number: An NSNumberRef for the program number (0-127) of an instrument within a particular bank. Name: A CFStringRef containing the name of the instrument. Using these MSB, LSB, and Program values will guarantee that the correct instrument is loaded by the DLS synth or Sampler Audio Unit. The CFArray should be released by the caller.- Parameters:
inURL- The URL for the sound bank.outInstrumentInfo- A pointer to a CFArrayRef to be created and returned by the function.- Returns:
- returns noErr if successful.
-
kAudioComponentRegistrationsChangedNotification
public static CFStringRef kAudioComponentRegistrationsChangedNotification()
[@constant] kAudioComponentRegistrationsChangedNotification Notification generated when the set of available AudioComponents changes. Register for this notification name with `[NSNotificationCenter defaultCenter]` or `CFNotificationCenterGetLocalCenter()`, using an object of NULL.
-
kAudioComponentInstanceInvalidationNotification
public static CFStringRef kAudioComponentInstanceInvalidationNotification()
[@constant] kAudioComponentInstanceInvalidationNotification Notification generated when an audio unit extension process exits abnormally. Register for this notification name with `[NSNotificationCenter defaultCenter]` or `CFNotificationCenterGetLocalCenter()`. The "object" refers to an AUAudioUnit instance to be observed, or can be nil to observe all instances. The notification's userInfo dictionary contains a key, "audioUnit", an NSValue whose pointerValue is the AudioUnit or AudioComponentInstance which is wrapping the AUAudioUnit communicating with the extension process. (This may be null if there is no such component instance.) For example: ``` [[NSNotificationCenter defaultCenter] addObserverForName:(NSString *)kAudioComponentInstanceInvalidationNotification object:nil queue:nil usingBlock:^(NSNotification *note) { AUAudioUnit *auAudioUnit = (AUAudioUnit *)note.object; NSValue *val = note.userInfo[@"audioUnit"]; AudioUnit audioUnit = (AudioUnit)val.pointerValue; NSLog(@"Received kAudioComponentInstanceInvalidationNotification: auAudioUnit %@, audioUnit %p", auAudioUnit, audioUnit); }]; ```
-
kAudioSession_RouteChangeKey_Reason
public static CFStringRef kAudioSession_RouteChangeKey_Reason()
CFString version of kAudioSession_AudioRouteChangeKey_Reason. This is more convenient to use than the raw string version. Available in iOS 5.0 or greater
-
kAudioSession_AudioRouteChangeKey_PreviousRouteDescription
public static CFStringRef kAudioSession_AudioRouteChangeKey_PreviousRouteDescription()
CFDictionary keys for kAudioSessionProperty_AudioRouteChange Available in iOS 5.0 or greater
-
kAudioSession_AudioRouteChangeKey_CurrentRouteDescription
public static CFStringRef kAudioSession_AudioRouteChangeKey_CurrentRouteDescription()
-
kAudioSession_AudioRouteKey_Inputs
public static CFStringRef kAudioSession_AudioRouteKey_Inputs()
CFDictionary keys for kAudioSessionProperty_AudioRouteDescription Available in iOS 5.0 or greater
-
kAudioSession_AudioRouteKey_Outputs
public static CFStringRef kAudioSession_AudioRouteKey_Outputs()
-
kAudioSession_AudioRouteKey_Type
public static CFStringRef kAudioSession_AudioRouteKey_Type()
key(s) for the CFDictionary associated with each entry of the CFArrays returned by kAudioSession_AudioRouteKey_Inputs and kAudioSession_AudioRouteKey_Outputs. Available in iOS 5.0 or greater
-
kAudioSessionInputRoute_LineIn
public static CFStringRef kAudioSessionInputRoute_LineIn()
[@enum] AudioSession route input types These are the strings used with the kAudioSession_AudioRouteKey_Type key for the CFDictionary associated with kAudioSession_AudioRouteKey_Inputs. Available in iOS 5.0 or greater [@constant] kAudioSessionInputRoute_LineIn A line in input [@constant] kAudioSessionInputRoute_BuiltInMic A built-in microphone input. (Note that some devices like early iPods do not have this input) [@constant] kAudioSessionInputRoute_HeadsetMic A microphone that is part of a headset (combined microphone and headphones) [@constant] kAudioSessionInputRoute_BluetoothHFP A microphone that is part of a Bluetooth Hands-Free Profile device [@constant] kAudioSessionInputRoute_USBAudio A Universal Serial Bus input
-
kAudioSessionInputRoute_BuiltInMic
public static CFStringRef kAudioSessionInputRoute_BuiltInMic()
-
kAudioSessionInputRoute_HeadsetMic
public static CFStringRef kAudioSessionInputRoute_HeadsetMic()
-
kAudioSessionInputRoute_BluetoothHFP
public static CFStringRef kAudioSessionInputRoute_BluetoothHFP()
-
kAudioSessionInputRoute_USBAudio
public static CFStringRef kAudioSessionInputRoute_USBAudio()
-
kAudioSessionOutputRoute_LineOut
public static CFStringRef kAudioSessionOutputRoute_LineOut()
[@enum] AudioSession route output types These are strings used with the kAudioSession_AudioRouteKey_Type key for the CFDictionary associated with kAudioSession_AudioRouteKey_Outputs. Available in iOS 5.0 or greater [@constant] kAudioSessionOutputRoute_LineOut A line out output [@constant] kAudioSessionOutputRoute_Headphones Speakers in a headset (mic and headphones) or simple headphones [@constant] kAudioSessionOutputRoute_BluetoothHFP Speakers that are part of a Bluetooth Hands-Free Profile device [@constant] kAudioSessionOutputRoute_BluetoothA2DP Speakers in a Bluetooth A2DP device [@constant] kAudioSessionOutputRoute_BuiltInReceiver The speaker you hold to your ear when on a phone call [@constant] kAudioSessionOutputRoute_BuiltInSpeaker The built-in speaker [@constant] kAudioSessionOutputRoute_USBAudio Speaker(s) in a Universal Serial Bus device [@constant] kAudioSessionOutputRoute_HDMI Output via High-Definition Multimedia Interface [@constant] kAudioSessionOutputRoute_AirPlay Output on a remote Air Play device
-
kAudioSessionOutputRoute_Headphones
public static CFStringRef kAudioSessionOutputRoute_Headphones()
-
kAudioSessionOutputRoute_BluetoothHFP
public static CFStringRef kAudioSessionOutputRoute_BluetoothHFP()
-
kAudioSessionOutputRoute_BluetoothA2DP
public static CFStringRef kAudioSessionOutputRoute_BluetoothA2DP()
-
kAudioSessionOutputRoute_BuiltInReceiver
public static CFStringRef kAudioSessionOutputRoute_BuiltInReceiver()
-
kAudioSessionOutputRoute_BuiltInSpeaker
public static CFStringRef kAudioSessionOutputRoute_BuiltInSpeaker()
-
kAudioSessionOutputRoute_USBAudio
public static CFStringRef kAudioSessionOutputRoute_USBAudio()
-
kAudioSessionOutputRoute_HDMI
public static CFStringRef kAudioSessionOutputRoute_HDMI()
-
kAudioSessionOutputRoute_AirPlay
public static CFStringRef kAudioSessionOutputRoute_AirPlay()
-
kAudioSession_InputSourceKey_ID
public static CFStringRef kAudioSession_InputSourceKey_ID()
CFDictionary keys for kAudioSessionProperty_InputSources
-
kAudioSession_InputSourceKey_Description
public static CFStringRef kAudioSession_InputSourceKey_Description()
-
kAudioSession_OutputDestinationKey_ID
public static CFStringRef kAudioSession_OutputDestinationKey_ID()
CFDictionary keys for kAudioSessionProperty_OutputDestinations
-
kAudioSession_OutputDestinationKey_Description
public static CFStringRef kAudioSession_OutputDestinationKey_Description()
-
AudioUnitExtensionSetComponentList
public static int AudioUnitExtensionSetComponentList(CFStringRef extensionIdentifier, CFArrayRef audioComponentInfo)
[@function] AudioUnitExtensionSetComponentList Allows the implementor of an audio unit extension to dynamically modify the list of component registrations for the extension. Note that the bundle ID of the process calling this API must prefix (or match) the provided extension identifier.- Parameters:
extensionIdentifier- The bundle ID of the audio unit extension.audioComponentInfo- An array of dictionaries, one for each component, in the same format as described in AudioComponent.h for the Info.plist key "AudioComponents".- Returns:
- An OSStatus result code.
-
AudioUnitExtensionCopyComponentList
public static CFArrayRef AudioUnitExtensionCopyComponentList(CFStringRef extensionIdentifier)
[@function] AudioUnitExtensionCopyComponentList Returns the component registrations for a given audio unit extension.- Parameters:
extensionIdentifier- The bundle ID of the audio unit extension.- Returns:
- An array of dictionaries, one for each component, in the same format as described in AudioComponent.h for the Info.plist key "AudioComponents". The caller should release this value when done with it.
-
AudioCodecGetPropertyInfo
public static int AudioCodecGetPropertyInfo(AudioComponentInstance inCodec, int inPropertyID, org.moe.natj.general.ptr.IntPtr outSize, org.moe.natj.general.ptr.BytePtr outWritable)
[@function] AudioCodecGetPropertyInfo Retrieve information about the given property. The outSize argument will return the size in bytes of the current value of the property. The outWritable argument will return whether or not the property in question can be changed.- Parameters:
inCodec- An AudioCodec instanceinPropertyID- Property ID whose value should be readoutSize- Size in bytes of the propertyoutWritable- Flag indicating wether the underlying property can be modified or not- Returns:
- The OSStatus value
-
AudioCodecGetProperty
public static int AudioCodecGetProperty(AudioComponentInstance inCodec, int inPropertyID, org.moe.natj.general.ptr.IntPtr ioPropertyDataSize, org.moe.natj.general.ptr.VoidPtr outPropertyData)
[@function] AudioCodecGetProperty Retrieve the indicated property data. On input, ioDataSize has the size of the data pointed to by outPropertyData. On output, ioDataSize will contain the amount written.- Parameters:
inCodec- An AudioCodec instanceinPropertyID- Property ID whose value should be readioPropertyDataSize- Size in bytes of the property dataoutPropertyData- Pointer to the property data buffer- Returns:
- The OSStatus value
-
AudioCodecSetProperty
public static int AudioCodecSetProperty(AudioComponentInstance inCodec, int inPropertyID, int inPropertyDataSize, org.moe.natj.general.ptr.ConstVoidPtr inPropertyData)
[@function] AudioCodecSetProperty Set the indicated property data.- Parameters:
inCodec- An AudioCodec instanceinPropertyID- Property ID whose value should be changedinPropertyDataSize- Size in bytes of the property datainPropertyData- Pointer to the property data buffer- Returns:
- The OSStatus value
-
AudioCodecInitialize
public static int AudioCodecInitialize(AudioComponentInstance inCodec, AudioStreamBasicDescription inInputFormat, AudioStreamBasicDescription inOutputFormat, org.moe.natj.general.ptr.ConstVoidPtr inMagicCookie, int inMagicCookieByteSize)
[@function] AudioCodecInitialize This call will allocate any buffers needed and otherwise set the codec up to perform the indicated translation. If an argument is NULL, any previously set properties will be used for preparing the codec for work. Note that this routine will also validate the format information as useable.- Parameters:
inCodec- An AudioCodec instanceinInputFormat- Pointer to an input format structureinOutputFormat- Pointer to an output format structureinMagicCookie- Pointer to the magic cookieinMagicCookieByteSize- Size in bytes of the magic cookie- Returns:
- The OSStatus value
-
AudioCodecUninitialize
public static int AudioCodecUninitialize(AudioComponentInstance inCodec)
[@function] AudioCodecUninitialize This call will move the codec from the initialized state back to the uninitialized state. The codec will release any resources it allocated or claimed in AudioCodecInitialize.- Parameters:
inCodec- An AudioCodec instance- Returns:
- The OSStatus value
-
AudioCodecAppendInputData
public static int AudioCodecAppendInputData(AudioComponentInstance inCodec, org.moe.natj.general.ptr.ConstVoidPtr inInputData, org.moe.natj.general.ptr.IntPtr ioInputDataByteSize, org.moe.natj.general.ptr.IntPtr ioNumberPackets, AudioStreamPacketDescription inPacketDescription)
[@function] AudioCodecAppendInputData Append as much of the given data in inInputData to the codec's input buffer as possible and return in ioInputDataByteSize the amount of data used. The inPacketDescription argument is an array of AudioStreamPacketDescription structs that describes the packet layout. The number of elements in this array is indicated on input by ioNumberPackets. On return, this number indicates the number of packets consumed. Note also in this case that it is an error to supply less than a full packet of data at a time.- Parameters:
inCodec- An AudioCodec instanceinInputData- A const pointer to the input dataioInputDataByteSize- The size in bytes of the input data in inInputData on input, the number of bytes consumed on outputioNumberPackets- The number of packetsinPacketDescription- The packet description pointer- Returns:
- The OSStatus value
-
AudioCodecProduceOutputPackets
public static int AudioCodecProduceOutputPackets(AudioComponentInstance inCodec, org.moe.natj.general.ptr.VoidPtr outOutputData, org.moe.natj.general.ptr.IntPtr ioOutputDataByteSize, org.moe.natj.general.ptr.IntPtr ioNumberPackets, AudioStreamPacketDescription outPacketDescription, org.moe.natj.general.ptr.IntPtr outStatus)
[@function] AudioCodecProduceOutputPackets Produce as many output packets as requested and the amount of input data allows for. The outStatus argument returns information about the codec's status to allow for proper data management. See the constants above for the possible values that can be returned. The outPacketDescription argument is an array of AudioStreamPacketDescription structs that describes the packet layout returned in outOutputData. This argument is optional. Pass NULL if this information is not to be returned. Note that this information is only provided when the output format isn't linear PCM. Note that decoders will always only produce linear PCM data in multiples of the number frames in a packet of the encoded format (as returned by kAudioCodecPropertyPacketFrameSize). Encoders will consume this many frames of linear PCM data to produce a packet of their format.- Parameters:
inCodec- The AudioCodec instanceoutOutputData- Pointer to the output data bufferioOutputDataByteSize- A pointer to the sizeioNumberPackets- number of input/output packets- Returns:
- The OSStatus value
-
AudioCodecAppendInputBufferList
public static int AudioCodecAppendInputBufferList(AudioComponentInstance inCodec, AudioBufferList inBufferList, org.moe.natj.general.ptr.IntPtr ioNumberPackets, AudioStreamPacketDescription inPacketDescription, org.moe.natj.general.ptr.IntPtr outBytesConsumed)
-
AudioCodecProduceOutputBufferList
public static int AudioCodecProduceOutputBufferList(AudioComponentInstance inCodec, AudioBufferList ioBufferList, org.moe.natj.general.ptr.IntPtr ioNumberPackets, AudioStreamPacketDescription outPacketDescription, org.moe.natj.general.ptr.IntPtr outStatus)
-
AudioCodecReset
public static int AudioCodecReset(AudioComponentInstance inCodec)
[@function] AudioCodecReset Flushes all the data in the codec and clears the input buffer. Note that the formats, and magic cookie will be retained so they won't need to be set up again to decode the same data.- Parameters:
inCodec- The audio codec descriptor- Returns:
- the OSStatus value
-
AudioComponentCopyIcon
public static UIImage AudioComponentCopyIcon(AudioComponent comp)
[@function] AudioComponentCopyIcon Fetches an icon representing the component. For a component originating in an app extension, the returned icon will be that of the application containing the extension. For components loaded from bundles, the icon will be that of the bundle. The caller is responsible to release this value when done with it.- Parameters:
comp- The component whose icon data is to be retrieved.- Returns:
- A retained UIImage object.
-
AudioWorkIntervalCreate
public static OS_os_workgroup AudioWorkIntervalCreate(java.lang.String name, int clock, os_workgroup_attr_opaque_s attr)
[@fn] AudioWorkIntervalCreate Create an OS workgroup interval for use with audio realtime threads.- Parameters:
name- A name for the created work interval.clock- The clockid in which interval timestamps are specified, e.g. `OS_CLOCK_MACH_ABSOLUTE_TIME` from. attr- This field is currently not used and should be NULL.- Returns:
- A new os_workgroup_interval_t. The client should call `os_workgroup_interval_start()` and `os_workgroup_interval_finish()` to notify the system of the beginning and ending of each work duty cycle. The caller is responsible for releasing this object when finished with it (if not using automatic reference counting).
-
-