AudioFileStreamOpen(_:_:_:_:_:)
Creates and opens a new audio file stream parser.
Declaration
func AudioFileStreamOpen(_ inClientData: UnsafeMutableRawPointer?, _ inPropertyListenerProc: AudioFileStream_PropertyListenerProc, _ inPacketsProc: AudioFileStream_PacketsProc, _ inFileTypeHint: AudioFileTypeID, _ outAudioFileStream: UnsafeMutablePointer<AudioFileStreamID?>) -> OSStatusParameters
- inClientData:
A pointer to a value or structure to be passed to your callback functions.
- inPropertyListenerProc:
Your property-listener callback. Whenever the parser finds the value of a property in the data stream, it calls your property listener with the property ID. You can then call the Audiofilestreamgetpropertyinfo(_:_:_:_:) and Audiofilestreamgetproperty(_:_:_:_:) functions to get the value of the property.
- inPacketsProc:
Your audio-data callback. Whenever the parser finds audio data packets in the data stream, it passes the data to your audio-data callback.
- inFileTypeHint:
An audio file type hint. If the audio file stream that you intend to pass to the parser is of a type that the parser cannot easily or uniquely determine from the data (such as ADTS or AC3), you can use this parameter to indicate the type. Possible values are listed in the Audiofiletypeid enumeration in Audio File Services.
If you do not know the audio file type, pass
0. - outAudioFileStream:
On output, an opaque object representing the audio file stream parser. This object is referred to in this document as the audio file stream parser ID. You need to pass this ID in to other functions in the Audio File Stream API.
Return Value
A result code. See Result Codes.