PlanetKitAudioSpkPlayDelegate
@objc
public protocol PlanetKitAudioSpkPlayDelegate
A delegate protocol for handling audio playback in PlanetKit.
-
Called before audio playback starts.
Declaration
Swift
func willPlay(frameCnt: UInt32, channels: UInt32, sampleRate: UInt32, sampleType: PlanetKitAudioSampleType, timestamp: AudioTimeStamp, playBuf: UnsafeMutableRawPointer!, playBufSize: UInt32) -> Int32
Parameters
frameCnt
The number of frames in the audio buffer.
channels
The number of audio channels.
sampleRate
The sample rate of the audio.
sampleType
The sample type of the audio.
timestamp
The timestamp of the audio.
playBuf
The buffer containing the audio data to be played.
playBufSize
The size of the audio buffer.
Return Value
An integer value indicating the result of the operation.