|
|
@@ -288,45 +288,45 @@ const
|
|
|
kAudioFile3GPType = FourCharCode('3gpp');
|
|
|
kAudioFile3GP2Type = FourCharCode('3gp2');
|
|
|
kAudioFileAMRType = FourCharCode('amrf');
|
|
|
- kAudioFileFLACType = FourCharCode('flac');
|
|
|
+ kAudioFileFLACType = FourCharCode('flac');
|
|
|
|
|
|
{!
|
|
|
@enum AudioFile error codes
|
|
|
@abstract These are the error codes returned from the AudioFile API.
|
|
|
- @constant kAudioFileUnspecifiedError
|
|
|
+ @constant kAudioFileUnspecifiedError
|
|
|
An unspecified error has occurred.
|
|
|
- @constant kAudioFileUnsupportedFileTypeError
|
|
|
+ @constant kAudioFileUnsupportedFileTypeError
|
|
|
The file type is not supported.
|
|
|
- @constant kAudioFileUnsupportedDataFormatError
|
|
|
+ @constant kAudioFileUnsupportedDataFormatError
|
|
|
The data format is not supported by this file type.
|
|
|
- @constant kAudioFileUnsupportedPropertyError
|
|
|
+ @constant kAudioFileUnsupportedPropertyError
|
|
|
The property is not supported.
|
|
|
- @constant kAudioFileBadPropertySizeError
|
|
|
+ @constant kAudioFileBadPropertySizeError
|
|
|
The size of the property data was not correct.
|
|
|
- @constant kAudioFilePermissionsError
|
|
|
+ @constant kAudioFilePermissionsError
|
|
|
The operation violated the file permissions. For example, trying to write to a file opened with kAudioFileReadPermission.
|
|
|
- @constant kAudioFileNotOptimizedError
|
|
|
- There are chunks following the audio data chunk that prevent extending the audio data chunk.
|
|
|
+ @constant kAudioFileNotOptimizedError
|
|
|
+ There are chunks following the audio data chunk that prevent extending the audio data chunk.
|
|
|
The file must be optimized in order to write more audio data.
|
|
|
- @constant kAudioFileInvalidChunkError
|
|
|
- The chunk does not exist in the file or is not supported by the file.
|
|
|
- @constant kAudioFileDoesNotAllow64BitDataSizeError
|
|
|
- The a file offset was too large for the file type. AIFF and WAVE have a 32 bit file size limit.
|
|
|
- @constant kAudioFileInvalidPacketOffsetError
|
|
|
- A packet offset was past the end of the file, or not at the end of the file when writing a VBR format,
|
|
|
- or a corrupt packet size was read when building the packet table.
|
|
|
- @constant kAudioFileInvalidFileError
|
|
|
- The file is malformed, or otherwise not a valid instance of an audio file of its type.
|
|
|
- @constant kAudioFileOperationNotSupportedError
|
|
|
- The operation cannot be performed. For example, setting kAudioFilePropertyAudioDataByteCount to increase
|
|
|
+ @constant kAudioFileInvalidChunkError
|
|
|
+ The chunk does not exist in the file or is not supported by the file.
|
|
|
+ @constant kAudioFileDoesNotAllow64BitDataSizeError
|
|
|
+ The a file offset was too large for the file type. AIFF and WAVE have a 32 bit file size limit.
|
|
|
+ @constant kAudioFileInvalidPacketOffsetError
|
|
|
+ A packet offset was past the end of the file, or not at the end of the file when writing a VBR format,
|
|
|
+ or a corrupt packet size was read when building the packet table.
|
|
|
+ @constant kAudioFileInvalidFileError
|
|
|
+ The file is malformed, or otherwise not a valid instance of an audio file of its type.
|
|
|
+ @constant kAudioFileOperationNotSupportedError
|
|
|
+ The operation cannot be performed. For example, setting kAudioFilePropertyAudioDataByteCount to increase
|
|
|
the size of the audio data in a file is not a supported operation. Write the data instead.
|
|
|
- @constant kAudioFileNotOpenError
|
|
|
+ @constant kAudioFileNotOpenError
|
|
|
The file is closed.
|
|
|
- @constant kAudioFileEndOfFileError
|
|
|
+ @constant kAudioFileEndOfFileError
|
|
|
End of file.
|
|
|
- @constant kAudioFilePositionError
|
|
|
+ @constant kAudioFilePositionError
|
|
|
Invalid file position.
|
|
|
- @constant kAudioFileFileNotFoundError
|
|
|
+ @constant kAudioFileFileNotFoundError
|
|
|
File not found.
|
|
|
}
|
|
|
const
|
|
|
@@ -347,31 +347,31 @@ const
|
|
|
kAudioFileNotOpenError = -38;
|
|
|
kAudioFileEndOfFileError = -39;
|
|
|
kAudioFilePositionError = -40;
|
|
|
- kAudioFileFileNotFoundError = -43;
|
|
|
+ kAudioFileFileNotFoundError = -43;
|
|
|
|
|
|
{!
|
|
|
@enum AudioFileFlags
|
|
|
@abstract These are flags that can be used with the CreateURL API call
|
|
|
- @constant kAudioFileFlags_EraseFile
|
|
|
+ @constant kAudioFileFlags_EraseFile
|
|
|
If set, then the CreateURL call will erase the contents of an existing file
|
|
|
If not set, then the CreateURL call will fail if the file already exists
|
|
|
- @constant kAudioFileFlags_DontPageAlignAudioData
|
|
|
- Normally, newly created and optimized files will have padding added in order to page align
|
|
|
- the data to 4KB boundaries. This makes reading the data more efficient.
|
|
|
+ @constant kAudioFileFlags_DontPageAlignAudioData
|
|
|
+ Normally, newly created and optimized files will have padding added in order to page align
|
|
|
+ the data to 4KB boundaries. This makes reading the data more efficient.
|
|
|
When disk space is a concern, this flag can be set so that the padding will not be added.
|
|
|
}
|
|
|
type
|
|
|
AudioFileFlags = UInt32;
|
|
|
const
|
|
|
kAudioFileFlags_EraseFile = 1;
|
|
|
- kAudioFileFlags_DontPageAlignAudioData = 2;
|
|
|
+ kAudioFileFlags_DontPageAlignAudioData = 2;
|
|
|
|
|
|
type
|
|
|
AudioFilePermissions = SInt8;
|
|
|
const
|
|
|
kAudioFileReadPermission = $01;
|
|
|
kAudioFileWritePermission = $02;
|
|
|
- kAudioFileReadWritePermission = $03;
|
|
|
+ kAudioFileReadWritePermission = $03;
|
|
|
|
|
|
//=============================================================================
|
|
|
// Types specific to the Audio File API
|
|
|
@@ -407,7 +407,7 @@ const
|
|
|
kAudioFileLoopDirection_NoLooping = 0;
|
|
|
kAudioFileLoopDirection_Forward = 1;
|
|
|
kAudioFileLoopDirection_ForwardAndBackward = 2;
|
|
|
- kAudioFileLoopDirection_Backward = 3;
|
|
|
+ kAudioFileLoopDirection_Backward = 3;
|
|
|
|
|
|
//=============================================================================
|
|
|
// Markers, Regions
|
|
|
@@ -439,7 +439,7 @@ type
|
|
|
@constant kAudioFileMarkerType_Generic A generic marker. See CAFFile.h for marker types specific to CAF files.
|
|
|
}
|
|
|
const
|
|
|
- kAudioFileMarkerType_Generic = 0;
|
|
|
+ kAudioFileMarkerType_Generic = 0;
|
|
|
|
|
|
|
|
|
{!
|
|
|
@@ -457,7 +457,7 @@ const
|
|
|
type
|
|
|
AudioFileMarker = record
|
|
|
mFramePosition: Float64;
|
|
|
-
|
|
|
+
|
|
|
mName: CFStringRef {__nullable};
|
|
|
mMarkerID: SInt32;
|
|
|
|
|
|
@@ -489,9 +489,9 @@ type
|
|
|
{!
|
|
|
@function NumBytesToNumAudioFileMarkers
|
|
|
@abstract Converts a size in bytes to the number of AudioFileMarkers that can be contained in that number of bytes.
|
|
|
- @discussion This can be used for the kAudioFilePropertyMarkerList property when calculating the number of
|
|
|
- markers that will be returned.
|
|
|
- @param inNumBytes
|
|
|
+ @discussion This can be used for the kAudioFilePropertyMarkerList property when calculating the number of
|
|
|
+ markers that will be returned.
|
|
|
+ @param inNumBytes
|
|
|
a number of bytes.
|
|
|
@result the number of AudioFileMarkers that can be contained in that number of bytes.
|
|
|
}
|
|
|
@@ -504,9 +504,9 @@ inline;
|
|
|
{!
|
|
|
@function NumAudioFileMarkersToNumBytes
|
|
|
@abstract Converts a number of AudioFileMarkers to a size in bytes.
|
|
|
- @discussion This can be used for the kAudioFilePropertyMarkerList property when calculating the size required to
|
|
|
- contain a number of AudioFileMarkers.
|
|
|
- @param inNumMarkers
|
|
|
+ @discussion This can be used for the kAudioFilePropertyMarkerList property when calculating the size required to
|
|
|
+ contain a number of AudioFileMarkers.
|
|
|
+ @param inNumMarkers
|
|
|
a number of AudioFileMarkers.
|
|
|
@result the size in bytes required to contain that number of AudioFileMarkers.
|
|
|
}
|
|
|
@@ -519,8 +519,8 @@ inline;
|
|
|
{!
|
|
|
@enum AudioFileRegionFlags
|
|
|
@abstract These are flags for an AudioFileRegion that specify a playback direction.
|
|
|
- @discussion One or multiple of these flags can be set. For example, if both kAudioFileRegionFlag_LoopEnable and
|
|
|
- kAudioFileRegionFlag_PlayForward are set, then the region will play as a forward loop. If only
|
|
|
+ @discussion One or multiple of these flags can be set. For example, if both kAudioFileRegionFlag_LoopEnable and
|
|
|
+ kAudioFileRegionFlag_PlayForward are set, then the region will play as a forward loop. If only
|
|
|
kAudioFileRegionFlag_PlayForward is set, then the region will be played forward once.
|
|
|
@constant kAudioFileRegionFlag_LoopEnable
|
|
|
If this flag is set, the region will be looped. One or both of the following must also be set.
|
|
|
@@ -534,22 +534,22 @@ type
|
|
|
const
|
|
|
kAudioFileRegionFlag_LoopEnable = 1;
|
|
|
kAudioFileRegionFlag_PlayForward = 2;
|
|
|
- kAudioFileRegionFlag_PlayBackward = 4;
|
|
|
+ kAudioFileRegionFlag_PlayBackward = 4;
|
|
|
|
|
|
{!
|
|
|
@struct AudioFileRegion
|
|
|
@abstract An AudioFileRegion specifies a segment of audio data.
|
|
|
@discussion Generally a region consists of at least two markers marking the beginning and end of the segment.
|
|
|
There may also be other markers defining other meta information such as sync point.
|
|
|
- @field mRegionID
|
|
|
+ @field mRegionID
|
|
|
each region must have a unique ID.
|
|
|
- @field mName
|
|
|
+ @field mName
|
|
|
The name of the region.
|
|
|
- @field mFlags
|
|
|
+ @field mFlags
|
|
|
AudioFileRegionFlags.
|
|
|
- @field mNumberMarkers
|
|
|
+ @field mNumberMarkers
|
|
|
The number of markers in the mMarkers array.
|
|
|
- @field mMarkers
|
|
|
+ @field mMarkers
|
|
|
A variable length array of AudioFileMarkers.
|
|
|
}
|
|
|
type
|
|
|
@@ -572,7 +572,7 @@ type
|
|
|
@field mNumberRegions
|
|
|
The number of regions in the mRegions list.
|
|
|
@field mRegions
|
|
|
- A list of AudioFileRegions. Note that AudioFileMarkers are variable length, so this list cannot
|
|
|
+ A list of AudioFileRegions. Note that AudioFileMarkers are variable length, so this list cannot
|
|
|
be accessed as an array. Use the NextAudioFileRegion macro for traversing the list instead.
|
|
|
}
|
|
|
type
|
|
|
@@ -586,11 +586,11 @@ type
|
|
|
{!
|
|
|
@function NextAudioFileRegion
|
|
|
@abstract convenience macro for traversing the region list.
|
|
|
- @discussion because AudioFileRegions are variable length, you cannot access them as an array. Use NextAudioFileRegion
|
|
|
+ @discussion because AudioFileRegions are variable length, you cannot access them as an array. Use NextAudioFileRegion
|
|
|
to walk the list.
|
|
|
- @param inAFRegionPtr
|
|
|
+ @param inAFRegionPtr
|
|
|
a pointer to the current region.
|
|
|
- @result a pointer to the region after the current region. This does not protect you from walking off the end of the list,
|
|
|
+ @result a pointer to the region after the current region. This does not protect you from walking off the end of the list,
|
|
|
so obey mNumberRegions.
|
|
|
}
|
|
|
|
|
|
@@ -618,17 +618,17 @@ type
|
|
|
|
|
|
{!
|
|
|
@enum AudioBytePacketTranslation Flags
|
|
|
-
|
|
|
+
|
|
|
@abstract flags for the AudioBytePacketTranslation mFlags field
|
|
|
@discussion There is currently only one flag.
|
|
|
-
|
|
|
+
|
|
|
@constant kBytePacketTranslationFlag_IsEstimate
|
|
|
If the set then the result value is an estimate.
|
|
|
}
|
|
|
type
|
|
|
AudioBytePacketTranslationFlags = UInt32;
|
|
|
const
|
|
|
- kBytePacketTranslationFlag_IsEstimate = 1;
|
|
|
+ kBytePacketTranslationFlag_IsEstimate = 1;
|
|
|
|
|
|
{!
|
|
|
@struct AudioBytePacketTranslation
|
|
|
@@ -652,12 +652,12 @@ type
|
|
|
{!
|
|
|
@struct AudioFilePacketTableInfo
|
|
|
@abstract This contains information about the number of valid frames in a file and where they begin and end.
|
|
|
- @discussion Some data formats may have packets whose contents are not completely valid, but represent priming or remainder
|
|
|
+ @discussion Some data formats may have packets whose contents are not completely valid, but represent priming or remainder
|
|
|
frames that are not meant to be played. For example a file with 100 packets of AAC is nominally 1024 * 100 = 102400 frames
|
|
|
- of data. However the first 2112 frames of that may be priming frames and there may be some
|
|
|
- number of remainder frames added to pad out to a full packet of 1024 frames. The priming and remainder frames should be
|
|
|
- discarded. The total number of packets in the file times the frames per packet (or counting each packet's frames
|
|
|
- individually for a variable frames per packet format) minus mPrimingFrames, minus mRemainderFrames, should
|
|
|
+ of data. However the first 2112 frames of that may be priming frames and there may be some
|
|
|
+ number of remainder frames added to pad out to a full packet of 1024 frames. The priming and remainder frames should be
|
|
|
+ discarded. The total number of packets in the file times the frames per packet (or counting each packet's frames
|
|
|
+ individually for a variable frames per packet format) minus mPrimingFrames, minus mRemainderFrames, should
|
|
|
equal mNumberValidFrames.
|
|
|
@field mNumberValidFrames the number of valid frames in the file.
|
|
|
@field mPrimingFrames the number of invalid frames at the beginning of the file.
|
|
|
@@ -730,13 +730,13 @@ const
|
|
|
@function AudioFileCreateWithURL
|
|
|
@abstract creates a new audio file (or initialises an existing file)
|
|
|
@discussion 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
|
|
|
+ Upon success, an AudioFileID is returned which can be used for subsequent calls
|
|
|
to the AudioFile APIs.
|
|
|
@param inFileRef an CFURLRef fully specifying the path of the file to create/initialise
|
|
|
@param inFileType an AudioFileTypeID indicating the type of audio file to create.
|
|
|
@param inFormat an AudioStreamBasicDescription describing the data format that will be
|
|
|
added to the audio file.
|
|
|
- @param inFlags relevant flags for creating/opening the file.
|
|
|
+ @param 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 file
|
|
|
@param outAudioFile if successful, an AudioFileID that can be used for subsequent AudioFile calls.
|
|
|
@@ -752,7 +752,7 @@ function AudioFileCreateWithURL( inFileRef: CFURLRef; inFileType: AudioFileTypeI
|
|
|
@param inFileRef the CFURLRef of an existing audio file.
|
|
|
@param inPermissions use the permission constants
|
|
|
@param 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.
|
|
|
+ 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.
|
|
|
@param outAudioFile upon success, an AudioFileID that can be used for subsequent
|
|
|
@@ -789,11 +789,11 @@ type
|
|
|
}
|
|
|
type
|
|
|
AudioFile_WriteProc = function( inClientData: UnivPtr; inPosition: SInt64; requestCount: UInt32; buffer: {const} UnivPtr; var actualCount: UInt32 ): OSStatus;
|
|
|
-
|
|
|
+
|
|
|
{!
|
|
|
@typedef AudioFile_GetSizeProc
|
|
|
@abstract A callback for getting the size of the file data. used with AudioFileOpenWithCallbacks or AudioFileInitializeWithCallbacks.
|
|
|
- @discussion a function that will be called when AudioFile needs to determine the size of the file data. This size is for all of the
|
|
|
+ @discussion a function that will be called when AudioFile needs to determine the size of the file data. This size is for all of the
|
|
|
data in the file, not just the audio data.
|
|
|
@param inClientData A pointer to the client data as set in the inClientData parameter to AudioFileXXXWithCallbacks.
|
|
|
@result The callback should return the size of the data.
|
|
|
@@ -804,7 +804,7 @@ type
|
|
|
{!
|
|
|
@typedef AudioFile_SetSizeProc
|
|
|
@abstract A callback for setting the size of the file data. used with AudioFileOpenWithCallbacks or AudioFileInitializeWithCallbacks.
|
|
|
- @discussion a function that will be called when AudioFile needs to set the size of the file data. This size is for all of the
|
|
|
+ @discussion a function that will be called when AudioFile needs to set the size of the file data. This size is for all of the
|
|
|
data in the file, not just the audio data. This will only be called if the file is written to.
|
|
|
@param inClientData A pointer to the client data as set in the inClientData parameter to AudioFileXXXWithCallbacks.
|
|
|
@result The callback should return the size of the data.
|
|
|
@@ -821,8 +821,8 @@ type
|
|
|
@param inWriteFunc a function that will be called when AudioFile needs to write data.
|
|
|
@param inGetSizeFunc a function that will be called when AudioFile needs to know the file size.
|
|
|
@param inSetSizeFunc a function that will be called when AudioFile needs to set the file size.
|
|
|
-
|
|
|
- @param inFileType an AudioFileTypeID indicating the type of audio file to which to initialize the file.
|
|
|
+
|
|
|
+ @param inFileType an AudioFileTypeID indicating the type of audio file to which to initialize the file.
|
|
|
@param inFormat an AudioStreamBasicDescription describing the data format that will be
|
|
|
added to the audio file.
|
|
|
@param inFlags flags for creating/opening the file. Currently zero.
|
|
|
@@ -843,9 +843,9 @@ function AudioFileInitializeWithCallbacks( inClientData: UnivPtr; inReadFunc: Au
|
|
|
@param inWriteFunc a function that will be called when AudioFile needs to write data.
|
|
|
@param inGetSizeFunc a function that will be called when AudioFile needs to know the total file size.
|
|
|
@param inSetSizeFunc a function that will be called when AudioFile needs to set the file size.
|
|
|
-
|
|
|
+
|
|
|
@param 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.
|
|
|
+ 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.
|
|
|
@param outAudioFile upon success, an AudioFileID that can be used for subsequent
|
|
|
@@ -854,7 +854,7 @@ function AudioFileInitializeWithCallbacks( inClientData: UnivPtr; inReadFunc: Au
|
|
|
}
|
|
|
function AudioFileOpenWithCallbacks( inClientData: UnivPtr; inReadFunc: AudioFile_ReadProc; inWriteFunc: AudioFile_WriteProc {__nullable}; inGetSizeFunc: AudioFile_GetSizeProc; inSetSizeFunc: AudioFile_SetSizeProc {__nullable}; inFileTypeHint: AudioFileTypeID; var outAudioFile: AudioFileID {__nullable * __nonnull} ): OSStatus; external name '_AudioFileOpenWithCallbacks';
|
|
|
(* API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0)) *)
|
|
|
-
|
|
|
+
|
|
|
|
|
|
{!
|
|
|
@function AudioFileClose
|
|
|
@@ -868,12 +868,12 @@ function AudioFileClose( inAudioFile: AudioFileID ): OSStatus; external name '_A
|
|
|
{!
|
|
|
@function AudioFileOptimize
|
|
|
@abstract Move the audio data to the end of the file and other internal optimizations of the file structure.
|
|
|
- @discussion 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
|
|
|
+ @discussion 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.
|
|
|
@param inAudioFile an AudioFileID.
|
|
|
@result returns noErr if successful.
|
|
|
@@ -883,15 +883,15 @@ function AudioFileOptimize( inAudioFile: AudioFileID ): OSStatus; external name
|
|
|
|
|
|
{!
|
|
|
@function AudioFileReadBytes
|
|
|
- @abstract Read bytes of audio data from the audio file.
|
|
|
-
|
|
|
+ @abstract Read bytes of audio data from the audio file.
|
|
|
+
|
|
|
@discussion Returns kAudioFileEndOfFileError when read encounters end of file.
|
|
|
@param inAudioFile an AudioFileID.
|
|
|
@param inUseCache true if it is desired to cache the data upon read, else false
|
|
|
@param inStartingByte the byte offset of the audio data desired to be returned
|
|
|
@param ioNumBytes on input, the number of bytes to read, on output, the number of
|
|
|
bytes actually read.
|
|
|
- @param outBuffer outBuffer should be a void * to user allocated memory large enough for the requested bytes.
|
|
|
+ @param outBuffer outBuffer should be a void * to user allocated memory large enough for the requested bytes.
|
|
|
@result returns noErr if successful.
|
|
|
}
|
|
|
function AudioFileReadBytes( inAudioFile: AudioFileID; inUseCache: Boolean; inStartingByte: SInt64; var ioNumBytes: UInt32; outBuffer: UnivPtr ): OSStatus; external name '_AudioFileReadBytes';
|
|
|
@@ -905,7 +905,7 @@ function AudioFileReadBytes( inAudioFile: AudioFileID; inUseCache: Boolean; inSt
|
|
|
@param inStartingByte the byte offset where the audio data should be written
|
|
|
@param ioNumBytes on input, the number of bytes to write, on output, the number of
|
|
|
bytes actually written.
|
|
|
- @param inBuffer inBuffer should be a void * containing the bytes to be written
|
|
|
+ @param inBuffer inBuffer should be a void * containing the bytes to be written
|
|
|
@result returns noErr if successful.
|
|
|
}
|
|
|
function AudioFileWriteBytes( inAudioFile: AudioFileID; inUseCache: Boolean; inStartingByte: SInt64; var ioNumBytes: UInt32; inBuffer: {const} UnivPtr ): OSStatus; external name '_AudioFileWriteBytes';
|
|
|
@@ -917,22 +917,22 @@ function AudioFileWriteBytes( inAudioFile: AudioFileID; inUseCache: Boolean; inS
|
|
|
@discussion 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
|
|
|
+ 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
|
|
|
+ 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.
|
|
|
|
|
|
@param inAudioFile an AudioFileID.
|
|
|
@param inUseCache true if it is desired to cache the data upon read, else false
|
|
|
- @param ioNumBytes on input the size of outBuffer in bytes.
|
|
|
+ @param ioNumBytes on input the size of outBuffer in bytes.
|
|
|
on output, the number of bytes actually returned.
|
|
|
- @param 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.
|
|
|
+ @param 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.
|
|
|
+ Packet descriptions are ignored for CBR data.
|
|
|
@param inStartingPacket The packet index of the first packet desired to be returned
|
|
|
@param ioNumPackets on input, the number of packets to read, on output, the number of
|
|
|
packets actually read.
|
|
|
@@ -949,19 +949,19 @@ function AudioFileReadPacketData( inAudioFile: AudioFileID; inUseCache: Boolean;
|
|
|
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
|
|
|
+ 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.
|
|
|
-
|
|
|
+
|
|
|
@param inAudioFile an AudioFileID.
|
|
|
@param inUseCache true if it is desired to cache the data upon read, else false
|
|
|
@param outNumBytes on output, the number of bytes actually returned
|
|
|
@param outPacketDescriptions 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.
|
|
|
+ parameter. Nothing will be returned for linear pcm data.
|
|
|
@param inStartingPacket the packet index of the first packet desired to be returned
|
|
|
@param ioNumPackets on input, the number of packets to read, on output, the number of
|
|
|
packets actually read.
|
|
|
- @param outBuffer outBuffer should be a pointer to user allocated memory of size:
|
|
|
+ @param 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.
|
|
|
@result returns noErr if successful.
|
|
|
@@ -977,9 +977,9 @@ function AudioFileReadPackets ( inAudioFile: AudioFileID; inUseCache: Boolean; v
|
|
|
@param inAudioFile an AudioFileID.
|
|
|
@param inUseCache true if it is desired to cache the data upon write, else false
|
|
|
@param inNumBytes the number of bytes being provided for write
|
|
|
- @param inPacketDescriptions 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.
|
|
|
+ @param inPacketDescriptions 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.
|
|
|
@param inStartingPacket the packet index of where the first packet provided should be placed.
|
|
|
@param ioNumPackets on input, the number of packets to write, on output, the number of
|
|
|
packets actually written.
|
|
|
@@ -993,7 +993,7 @@ function AudioFileWritePackets( inAudioFile: AudioFileID; inUseCache: Boolean; i
|
|
|
{!
|
|
|
@function AudioFileCountUserData
|
|
|
@abstract Get the number of user data items with a certain ID in the file
|
|
|
- @discussion "User Data" refers to chunks in AIFF, CAF and WAVE files, or resources
|
|
|
+ @discussion "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".
|
|
|
@param inAudioFile an AudioFileID.
|
|
|
@@ -1022,7 +1022,7 @@ function AudioFileGetUserDataSize( inAudioFile: AudioFileID; inUserDataID: UInt3
|
|
|
@param inAudioFile an AudioFileID.
|
|
|
@param inUserDataID the four AnsiChar code of the chunk.
|
|
|
@param inIndex an index specifying which chunk if there are more than one.
|
|
|
- @param ioUserDataSize the size of the buffer on input, size of bytes copied to buffer on output
|
|
|
+ @param ioUserDataSize the size of the buffer on input, size of bytes copied to buffer on output
|
|
|
@param outUserData a pointer to a buffer in which to copy the chunk data.
|
|
|
@result returns noErr if successful.
|
|
|
}
|
|
|
@@ -1035,8 +1035,8 @@ function AudioFileGetUserData( inAudioFile: AudioFileID; inUserDataID: UInt32; i
|
|
|
@param inAudioFile an AudioFileID.
|
|
|
@param inUserDataID the four AnsiChar code of the chunk.
|
|
|
@param inIndex an index specifying which chunk if there are more than one.
|
|
|
- @param inUserDataSize on input the size of the data to copy, on output, size of bytes copied from the buffer
|
|
|
- @param inUserData a pointer to a buffer from which to copy the chunk data
|
|
|
+ @param inUserDataSize on input the size of the data to copy, on output, size of bytes copied from the buffer
|
|
|
+ @param inUserData a pointer to a buffer from which to copy the chunk data
|
|
|
(only the contents of the chunk, not including the chunk header).
|
|
|
@result returns noErr if successful.
|
|
|
}
|
|
|
@@ -1064,72 +1064,72 @@ function AudioFileRemoveUserData( inAudioFile: AudioFileID; inUserDataID: UInt32
|
|
|
{!
|
|
|
@enum Audio File Properties
|
|
|
@abstract constants for AudioFile get/set property calls
|
|
|
- @constant kAudioFilePropertyFileFormat
|
|
|
+ @constant kAudioFilePropertyFileFormat
|
|
|
An AudioFileTypeID that identifies the format of the file
|
|
|
- @constant kAudioFilePropertyDataFormat
|
|
|
+ @constant kAudioFilePropertyDataFormat
|
|
|
An AudioStreamBasicDescription describing the format of the audio data
|
|
|
- @constant kAudioFilePropertyFormatList
|
|
|
- In order to support formats such as AAC SBR where an encoded data stream can be decoded to
|
|
|
+ @constant kAudioFilePropertyFormatList
|
|
|
+ In order to support formats such as AAC SBR where an encoded data stream can be decoded to
|
|
|
multiple destination formats, this property returns an array of AudioFormatListItems (see AudioFormat.h) of those formats.
|
|
|
- The default behavior is to return the an AudioFormatListItem that has the same AudioStreamBasicDescription
|
|
|
+ The default behavior is to return the an AudioFormatListItem that has the same AudioStreamBasicDescription
|
|
|
that kAudioFilePropertyDataFormat returns.
|
|
|
- @constant kAudioFilePropertyIsOptimized
|
|
|
+ @constant kAudioFilePropertyIsOptimized
|
|
|
A UInt32 indicating whether an Audio File has been optimized.
|
|
|
- Optimized means it is ready to start having sound data written to it.
|
|
|
+ Optimized means it is ready to start having sound data written to it.
|
|
|
A value of 0 indicates the file needs to be optimized.
|
|
|
A value of 1 indicates the file is currently optimized.
|
|
|
- @constant kAudioFilePropertyMagicCookieData
|
|
|
+ @constant kAudioFilePropertyMagicCookieData
|
|
|
A void * pointing to memory set up by the caller.
|
|
|
Some file types require that a magic cookie be provided before packets can be written
|
|
|
- to the file, so this property should be set before calling
|
|
|
+ to the file, so this property should be set before calling
|
|
|
AudioFileWriteBytes()/AudioFileWritePackets() if a magic cookie exists.
|
|
|
- @constant kAudioFilePropertyAudioDataByteCount
|
|
|
+ @constant kAudioFilePropertyAudioDataByteCount
|
|
|
a UInt64 that indicates the number of bytes of audio data contained in the file
|
|
|
- @constant kAudioFilePropertyAudioDataPacketCount
|
|
|
+ @constant kAudioFilePropertyAudioDataPacketCount
|
|
|
a UInt64 that indicates the number of packets of audio data contained in the file
|
|
|
- @constant kAudioFilePropertyMaximumPacketSize
|
|
|
+ @constant kAudioFilePropertyMaximumPacketSize
|
|
|
a UInt32 that indicates the maximum size of a packet for the data contained in the file
|
|
|
- @constant kAudioFilePropertyDataOffset
|
|
|
+ @constant kAudioFilePropertyDataOffset
|
|
|
a SInt64 that indicates the byte offset in the file of the audio data.
|
|
|
- @constant kAudioFilePropertyChannelLayout
|
|
|
+ @constant kAudioFilePropertyChannelLayout
|
|
|
An AudioChannelLayout struct.
|
|
|
- @constant kAudioFilePropertyDeferSizeUpdates
|
|
|
- A UInt32. If 1, then updating the files sizes in the header is not done for every write,
|
|
|
+ @constant kAudioFilePropertyDeferSizeUpdates
|
|
|
+ A UInt32. If 1, then updating the files sizes in the header is not done for every write,
|
|
|
but deferred until the file is read, optimized or closed. This is more efficient, but less safe
|
|
|
since, if the application crashes before the size is updated, the file may not be readable.
|
|
|
The default value is one, it doesn't update the header.
|
|
|
- @constant kAudioFilePropertyDataFormatName
|
|
|
+ @constant kAudioFilePropertyDataFormatName
|
|
|
This is deprecated. Use kAudioFormatProperty_FormatName in AudioFormat.h instead.
|
|
|
- @constant kAudioFilePropertyMarkerList
|
|
|
+ @constant kAudioFilePropertyMarkerList
|
|
|
access the list of markers defined in the file. returns an AudioFileMarkerList.
|
|
|
The CFStringRefs in the returned structs must be released by the client.
|
|
|
(available in 10.2.4 and later)
|
|
|
- @constant kAudioFilePropertyRegionList
|
|
|
+ @constant kAudioFilePropertyRegionList
|
|
|
access the list of regions defined in the file. returns an Array of AudioFileRegions.
|
|
|
The CFStringRefs in the returned structs must be released by the client.
|
|
|
(available in 10.2.4 and later)
|
|
|
- @constant kAudioFilePropertyPacketToFrame
|
|
|
+ @constant kAudioFilePropertyPacketToFrame
|
|
|
pass a AudioFramePacketTranslation with mPacket filled out and get mFrame back. mFrameOffsetInPacket is ignored.
|
|
|
- @constant kAudioFilePropertyFrameToPacket
|
|
|
+ @constant kAudioFilePropertyFrameToPacket
|
|
|
pass a AudioFramePacketTranslation with mFrame filled out and get mPacket and mFrameOffsetInPacket back.
|
|
|
-
|
|
|
+
|
|
|
@constant kAudioFilePropertyPacketToByte
|
|
|
pass an AudioBytePacketTranslation struct with mPacket filled out and get mByte back.
|
|
|
- mByteOffsetInPacket is ignored. If the mByte value is an estimate then
|
|
|
+ mByteOffsetInPacket is ignored. If the mByte value is an estimate then
|
|
|
kBytePacketTranslationFlag_IsEstimate will be set in the mFlags field.
|
|
|
@constant kAudioFilePropertyByteToPacket
|
|
|
pass an AudioBytePacketTranslation struct with mByte filled out and get mPacket and
|
|
|
- mByteOffsetInPacket back. If the mPacket value is an estimate then
|
|
|
+ mByteOffsetInPacket back. If the mPacket value is an estimate then
|
|
|
kBytePacketTranslationFlag_IsEstimate will be set in the mFlags field.
|
|
|
-
|
|
|
- @constant kAudioFilePropertyChunkIDs
|
|
|
+
|
|
|
+ @constant kAudioFilePropertyChunkIDs
|
|
|
returns an array of OSType four AnsiChar codes for each kind of chunk in the file.
|
|
|
- @constant kAudioFilePropertyInfoDictionary
|
|
|
- returns a CFDictionary filled with information about the data contained in the file.
|
|
|
- See dictionary key constants already defined for info string types.
|
|
|
+ @constant kAudioFilePropertyInfoDictionary
|
|
|
+ returns a CFDictionary filled with information about the data contained in the file.
|
|
|
+ See dictionary key constants already defined for info string types.
|
|
|
AudioFileComponents are free to add keys to the dictionaries that they return for this property...
|
|
|
caller is responsible for releasing the CFObject
|
|
|
- @constant kAudioFilePropertyPacketTableInfo
|
|
|
+ @constant kAudioFilePropertyPacketTableInfo
|
|
|
Gets or sets an AudioFilePacketTableInfo struct for the file types that support it.
|
|
|
When setting, the sum of mNumberValidFrames, mPrimingFrames and mRemainderFrames must be the same as the total
|
|
|
number of frames in all packets. If not you will get a kAudio_ParamError. The best way to ensure this is to get the value of
|
|
|
@@ -1139,23 +1139,23 @@ function AudioFileRemoveUserData( inAudioFile: AudioFileID; inUserDataID: UInt32
|
|
|
the whole file to find the largest packet, as may happen with kAudioFilePropertyMaximumPacketSize).
|
|
|
@constant kAudioFilePropertyReserveDuration
|
|
|
The value is a Float64 of the duration in seconds of data that is expected to be written.
|
|
|
- Setting this property before any data has been written reserves space in the file header for a packet table
|
|
|
- and/or other information so that it can appear before the audio data. Otherwise the packet table may get written at the
|
|
|
+ Setting this property before any data has been written reserves space in the file header for a packet table
|
|
|
+ and/or other information so that it can appear before the audio data. Otherwise the packet table may get written at the
|
|
|
end of the file, preventing the file from being streamable.
|
|
|
@constant kAudioFilePropertyEstimatedDuration
|
|
|
The value is a Float64 representing an estimated duration in seconds. If duration can be calculated without scanning the entire file,
|
|
|
- or all the audio data packets have been scanned, the value will accurately reflect the duration of the audio data.
|
|
|
+ or all the audio data packets have been scanned, the value will accurately reflect the duration of the audio data.
|
|
|
@constant kAudioFilePropertyBitRate
|
|
|
Returns the bit rate for the audio data as a UInt32. For some formats this will be approximate.
|
|
|
@constant kAudioFilePropertyID3Tag
|
|
|
A void * pointing to memory set up by the caller to contain a fully formatted ID3 tag (get/set v2.2, v2.3, or v2.4, v1 get only).
|
|
|
- The ID3 tag is not manipulated in anyway either for read or write.
|
|
|
+ The ID3 tag is not manipulated in anyway either for read or write.
|
|
|
When setting, this property must be called before calling AudioFileWritePackets.
|
|
|
@constant kAudioFilePropertySourceBitDepth
|
|
|
For encoded data this property returns the bit depth of the source as an SInt32, if known.
|
|
|
The bit depth is expressed as a negative number if the source was floating point, e.g. -32 for float, -64 for double.
|
|
|
@constant kAudioFilePropertyAlbumArtwork
|
|
|
- returns a CFDataRef filled with the Album Art or NULL.
|
|
|
+ returns a CFDataRef filled with the Album Art or NULL.
|
|
|
The caller is responsible for releasing a non-NULL CFDataRef.
|
|
|
In order to parse the contents of the data, CGImageSourceCreateWithData may be used.
|
|
|
@constant kAudioFilePropertyAudioTrackCount
|
|
|
@@ -1193,7 +1193,7 @@ const
|
|
|
kAudioFilePropertySourceBitDepth = FourCharCode('sbtd');
|
|
|
kAudioFilePropertyAlbumArtwork = FourCharCode('aart');
|
|
|
kAudioFilePropertyAudioTrackCount = FourCharCode('atct');
|
|
|
- kAudioFilePropertyUseAudioTrack = FourCharCode('uatk');
|
|
|
+ kAudioFilePropertyUseAudioTrack = FourCharCode('uatk');
|
|
|
|
|
|
|
|
|
{!
|
|
|
@@ -1201,14 +1201,14 @@ const
|
|
|
@abstract Get information about the size of a property of an AudioFile and whether it can be set.
|
|
|
@param inAudioFile an AudioFileID.
|
|
|
@param inPropertyID an AudioFileProperty constant.
|
|
|
- @param outDataSize the size in bytes of the current value of the property. In order to get the property value,
|
|
|
+ @param 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.
|
|
|
@param isWritable will be set to 1 if writable, or 0 if read only.
|
|
|
@result returns noErr if successful.
|
|
|
}
|
|
|
function AudioFileGetPropertyInfo( inAudioFile: AudioFileID; inPropertyID: AudioFilePropertyID; outDataSize: UInt32Ptr {__nullable}; isWritable: UInt32Ptr {__nullable} ): OSStatus; external name '_AudioFileGetPropertyInfo';
|
|
|
(* API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0)) *)
|
|
|
-
|
|
|
+
|
|
|
{!
|
|
|
@function AudioFileGetProperty
|
|
|
@abstract Copies the value for a property of an AudioFile into a buffer.
|
|
|
@@ -1220,7 +1220,7 @@ function AudioFileGetPropertyInfo( inAudioFile: AudioFileID; inPropertyID: Audio
|
|
|
}
|
|
|
function AudioFileGetProperty( inAudioFile: AudioFileID; inPropertyID: AudioFilePropertyID; var ioDataSize: UInt32; outPropertyData: UnivPtr ): OSStatus; external name '_AudioFileGetProperty';
|
|
|
(* API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0)) *)
|
|
|
-
|
|
|
+
|
|
|
{!
|
|
|
@function AudioFileSetProperty
|
|
|
@abstract Sets the value for a property of an AudioFile .
|
|
|
@@ -1243,29 +1243,29 @@ function AudioFileSetProperty( inAudioFile: AudioFileID; inPropertyID: AudioFile
|
|
|
@abstract constants for AudioFileGetGlobalInfo properties
|
|
|
@constant kAudioFileGlobalInfo_ReadableTypes
|
|
|
No specifier needed. Must be set to NULL.
|
|
|
- Returns an array of UInt32 containing the file types
|
|
|
+ Returns an array of UInt32 containing the file types
|
|
|
(i.e. AIFF, WAVE, etc) that can be opened for reading.
|
|
|
@constant kAudioFileGlobalInfo_WritableTypes
|
|
|
No specifier needed. Must be set to NULL.
|
|
|
- Returns an array of UInt32 containing the file types
|
|
|
+ Returns an array of UInt32 containing the file types
|
|
|
(i.e. AIFF, WAVE, etc) that can be opened for writing.
|
|
|
@constant kAudioFileGlobalInfo_FileTypeName
|
|
|
Specifier is a pointer to a AudioFileTypeID containing a file type.
|
|
|
- Returns a CFString containing the name for the file type.
|
|
|
+ Returns a CFString containing the name for the file type.
|
|
|
@constant kAudioFileGlobalInfo_AvailableFormatIDs
|
|
|
Specifier is a pointer to a AudioFileTypeID containing a file type.
|
|
|
- Returns a array of format IDs for formats that can be read.
|
|
|
+ Returns a array of format IDs for formats that can be read.
|
|
|
@constant kAudioFileGlobalInfo_AvailableStreamDescriptionsForFormat
|
|
|
Specifier is a pointer to a AudioFileTypeAndFormatID struct defined below.
|
|
|
- Returns an array of AudioStreamBasicDescriptions which have all of the
|
|
|
+ Returns an array of AudioStreamBasicDescriptions which have all of the
|
|
|
formats for a particular file type and format ID. The AudioStreamBasicDescriptions
|
|
|
have the following fields filled in: mFormatID, mFormatFlags, mBitsPerChannel
|
|
|
writing new files.
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
@constant kAudioFileGlobalInfo_AllExtensions
|
|
|
No specifier needed. Must be set to NULL.
|
|
|
- Returns a CFArray of CFStrings containing all file extensions
|
|
|
+ Returns a CFArray of CFStrings containing all file extensions
|
|
|
that are recognized. The array be used when creating an NSOpenPanel.
|
|
|
|
|
|
@constant kAudioFileGlobalInfo_AllHFSTypeCodes
|
|
|
@@ -1276,20 +1276,20 @@ function AudioFileSetProperty( inAudioFile: AudioFileID; inPropertyID: AudioFile
|
|
|
@constant kAudioFileGlobalInfo_AllUTIs
|
|
|
No specifier needed. Must be set to NULL.
|
|
|
Returns a CFArray of CFString of all Universal Type Identifiers
|
|
|
- that are recognized by AudioFile.
|
|
|
+ that are recognized by AudioFile.
|
|
|
The caller is responsible for releasing the CFArray.
|
|
|
|
|
|
@constant kAudioFileGlobalInfo_AllMIMETypes
|
|
|
No specifier needed. Must be set to NULL.
|
|
|
Returns a CFArray of CFString of all MIME types
|
|
|
- that are recognized by AudioFile.
|
|
|
+ that are recognized by AudioFile.
|
|
|
The caller is responsible for releasing the CFArray.
|
|
|
|
|
|
|
|
|
@constant kAudioFileGlobalInfo_ExtensionsForType
|
|
|
Specifier is a pointer to a AudioFileTypeID containing a file type.
|
|
|
- Returns a CFArray of CFStrings containing the file extensions
|
|
|
- that are recognized for this file type.
|
|
|
+ Returns a CFArray of CFStrings containing the file extensions
|
|
|
+ that are recognized for this file type.
|
|
|
|
|
|
@constant kAudioFileGlobalInfo_HFSTypeCodesForType
|
|
|
Specifier is a pointer to an AudioFileTypeID.
|
|
|
@@ -1299,32 +1299,32 @@ function AudioFileSetProperty( inAudioFile: AudioFileID; inPropertyID: AudioFile
|
|
|
@constant kAudioFileGlobalInfo_UTIsForType
|
|
|
Specifier is a pointer to an AudioFileTypeID.
|
|
|
Returns a CFArray of CFString of all Universal Type Identifiers
|
|
|
- that are recognized by the file type.
|
|
|
+ that are recognized by the file type.
|
|
|
The caller is responsible for releasing the CFArray.
|
|
|
|
|
|
@constant kAudioFileGlobalInfo_MIMETypesForType
|
|
|
Specifier is a pointer to an AudioFileTypeID.
|
|
|
Returns a CFArray of CFString of all MIME types
|
|
|
- that are recognized by the file type.
|
|
|
+ that are recognized by the file type.
|
|
|
The caller is responsible for releasing the CFArray.
|
|
|
|
|
|
these are inverses of the above:
|
|
|
|
|
|
@constant kAudioFileGlobalInfo_TypesForExtension
|
|
|
Specifier is a CFStringRef containing a file extension.
|
|
|
- Returns an array of all AudioFileTypeIDs that support the extension.
|
|
|
-
|
|
|
+ Returns an array of all AudioFileTypeIDs that support the extension.
|
|
|
+
|
|
|
@constant kAudioFileGlobalInfo_TypesForHFSTypeCode
|
|
|
Specifier is an HFSTypeCode.
|
|
|
- Returns an array of all AudioFileTypeIDs that support the HFSTypeCode.
|
|
|
+ Returns an array of all AudioFileTypeIDs that support the HFSTypeCode.
|
|
|
|
|
|
@constant kAudioFileGlobalInfo_TypesForUTI
|
|
|
Specifier is a CFStringRef containing a Universal Type Identifier.
|
|
|
- Returns an array of all AudioFileTypeIDs that support the UTI.
|
|
|
+ Returns an array of all AudioFileTypeIDs that support the UTI.
|
|
|
|
|
|
@constant kAudioFileGlobalInfo_TypesForMIMEType
|
|
|
Specifier is a CFStringRef containing a MIME Type.
|
|
|
- Returns an array of all AudioFileTypeIDs that support the MIME type.
|
|
|
+ Returns an array of all AudioFileTypeIDs that support the MIME type.
|
|
|
|
|
|
}
|
|
|
const
|
|
|
@@ -1344,7 +1344,7 @@ const
|
|
|
kAudioFileGlobalInfo_TypesForMIMEType = FourCharCode('tmim');
|
|
|
kAudioFileGlobalInfo_TypesForUTI = FourCharCode('tuti');
|
|
|
kAudioFileGlobalInfo_TypesForHFSTypeCode = FourCharCode('thfs');
|
|
|
- kAudioFileGlobalInfo_TypesForExtension = FourCharCode('text');
|
|
|
+ kAudioFileGlobalInfo_TypesForExtension = FourCharCode('text');
|
|
|
|
|
|
|
|
|
{!
|
|
|
@@ -1370,13 +1370,13 @@ type
|
|
|
@param inPropertyID an AudioFileGlobalInfo property constant.
|
|
|
@param inSpecifierSize The size of the specifier data.
|
|
|
@param inSpecifier A specifier is a buffer of data used as an input argument to some of the global info properties.
|
|
|
- @param outDataSize the size in bytes of the current value of the property. In order to get the property value,
|
|
|
+ @param 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.
|
|
|
@result returns noErr if successful.
|
|
|
}
|
|
|
function AudioFileGetGlobalInfoSize( inPropertyID: AudioFilePropertyID; inSpecifierSize: UInt32; inSpecifier: UnivPtr {__nullable}; var outDataSize: UInt32 ): OSStatus; external name '_AudioFileGetGlobalInfoSize';
|
|
|
(* API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0)) *)
|
|
|
-
|
|
|
+
|
|
|
{!
|
|
|
@function AudioFileGetGlobalInfo
|
|
|
@abstract Copies the value for a global property into a buffer.
|
|
|
@@ -1392,12 +1392,12 @@ function AudioFileGetGlobalInfo( inPropertyID: AudioFilePropertyID; inSpecifierS
|
|
|
|
|
|
//#pragma mark - Deprecated
|
|
|
|
|
|
-(*
|
|
|
+(*
|
|
|
struct FSRef;
|
|
|
{!
|
|
|
@function AudioFileCreate
|
|
|
@abstract creates a new audio file
|
|
|
- @discussion creates a new audio file located in the parent directory
|
|
|
+ @discussion creates a new audio file located in the parent directory
|
|
|
provided. Upon success, an AudioFileID is returned which can
|
|
|
be used for subsequent calls to the AudioFile APIs.
|
|
|
@param inParentRef an FSRef to the directory where the new file should be created.
|
|
|
@@ -1405,14 +1405,14 @@ struct FSRef;
|
|
|
@param inFileType an AudioFileTypeID indicating the type of audio file to create.
|
|
|
@param inFormat an AudioStreamBasicDescription describing the data format that will be
|
|
|
added to the audio file.
|
|
|
- @param inFlags relevant flags for creating/opening the file.
|
|
|
+ @param inFlags relevant flags for creating/opening the file.
|
|
|
@param outNewFileRef if successful, the FSRef of the newly created file.
|
|
|
@param outAudioFile if successful, an AudioFileID that can be used for subsequent AudioFile calls.
|
|
|
@result returns noErr if successful.
|
|
|
@deprecated in Mac OS X 10.6, see AudioFileCreateWithURL
|
|
|
}
|
|
|
-extern OSStatus
|
|
|
-AudioFileCreate ( const struct FSRef *inParentRef,
|
|
|
+extern OSStatus
|
|
|
+AudioFileCreate ( const struct FSRef *inParentRef,
|
|
|
CFStringRef inFileName,
|
|
|
AudioFileTypeID inFileType,
|
|
|
const AudioStreamBasicDescription *inFormat,
|
|
|
@@ -1426,7 +1426,7 @@ AudioFileCreate ( const struct FSRef *inParentRef,
|
|
|
@discussion Use AudioFileInitialize to wipe clean an existing audio file
|
|
|
and prepare it to be populated with new data.
|
|
|
@param inFileRef the FSRef of an existing audio file.
|
|
|
- @param inFileType an AudioFileTypeID indicating the type of audio file to initialize the file to.
|
|
|
+ @param inFileType an AudioFileTypeID indicating the type of audio file to initialize the file to.
|
|
|
@param inFormat an AudioStreamBasicDescription describing the data format that will be
|
|
|
added to the audio file.
|
|
|
@param inFlags flags for creating/opening the file. Currently zero.
|
|
|
@@ -1435,7 +1435,7 @@ AudioFileCreate ( const struct FSRef *inParentRef,
|
|
|
@result returns noErr if successful.
|
|
|
@deprecated in Mac OS X 10.6, see AudioFileCreateWithURL
|
|
|
}
|
|
|
-extern OSStatus
|
|
|
+extern OSStatus
|
|
|
AudioFileInitialize ( const struct FSRef *inFileRef,
|
|
|
AudioFileTypeID inFileType,
|
|
|
const AudioStreamBasicDescription *inFormat,
|
|
|
@@ -1449,7 +1449,7 @@ AudioFileInitialize ( const struct FSRef *inFileRef,
|
|
|
@param inFileRef the FSRef of an existing audio file.
|
|
|
@param inPermissions use the permission constants
|
|
|
@param 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.
|
|
|
+ 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.
|
|
|
@param outAudioFile upon success, an AudioFileID that can be used for subsequent
|
|
|
@@ -1457,13 +1457,13 @@ AudioFileInitialize ( const struct FSRef *inFileRef,
|
|
|
@result returns noErr if successful.
|
|
|
@deprecated in Mac OS X 10.6, see AudioFileOpenURL
|
|
|
}
|
|
|
-extern OSStatus
|
|
|
+extern OSStatus
|
|
|
AudioFileOpen ( const struct FSRef *inFileRef,
|
|
|
AudioFilePermissions inPermissions,
|
|
|
AudioFileTypeID inFileTypeHint,
|
|
|
AudioFileID __nullable * __nonnull outAudioFile) API_DEPRECATED("no longer supported", macos(10.2, 10.6)) API_UNAVAILABLE(ios, watchos, tvos);
|
|
|
|
|
|
-
|
|
|
+
|
|
|
*)
|
|
|
//CF_ASSUME_NONNULL_END
|
|
|
|