WZAudioSink
IntroductionWZAudioSink defines a protocol for callbacks that occur when audio frames are captured, or audio level changes. Methods
audioFrameWasCaptured:size:time:sampleRate:@optional ParametersDiscussionCalled for each frame of audio recorded by an audio device. The format of the data is uninteresting to the protocol adopter; this protocol should be used for timing information only. If you wish to access raw audio data, please implement the audioPCMFrameWasCaptured protocol method instead of this one. audioLevelDidChange:@optional ParametersDiscussionCalled whenever the audio level value changes. audioPCMFrameWasCaptured:bufferList:time:sampleRate:@optional ParametersDiscussionCalled for each frame of audio recorded by an audio device. Clients implementing this protocol should be aware that doing so causes the SDK to go through a PCM to AAC audio conversion process before broadcasting. Thus, please DO NOT IMPLEMENT THIS PROTOCOL UNLESS YOU HAVE A SPECIFIC NEED FOR THE UN-ENCODED AUDIO DATA. If you implement this protocol, the audioFrameWasCaptured protocol method will never be called. Note that implementing this protocol doesn't guarentee that it will be called. If the audio converter is unable for any reason to convert from PCM to AAC, then the capture hardware will fall back to capturing AAC directly; in which case the audioFrameWasCaptured protocol above will be called instead. canConvertStreamWithDescription:@optional ParametersReturn ValueTrue if the format can be converted from; otherwise false DiscussionTest whether or not the audio sink adopting this protocol can convert from the specified format description. It would be very unusual for a client to implement this protocol; it is implemented by the WZAACEncoder class. |