Protocol YSKAudioSourceListener

Protocol of an audio source listener.

This protocol should be implemented by a class that wants to get data from the audio source. To subscribe a listener to an audio source, use the subscribeListener: method; to unsubscribe a listener, use the unsubscribeListener: method.

Instance Methods

-audioSource:didFailWithError:

Called if errors occurred during the operation of the audio source.

-audioSource:didReceiveData:

Called during data transmission.

-audioSourceDidStart:

Called when the audio source is ready to transmit data.

-audioSourceDidStop:

Called when the audio source finished transmitting data.

Method Detail

-audioSource:didFailWithError:

- (void)audioSource:(id< YSKAudioSource >)audioSource
   didFailWithError:(NSError *)error 

Called if errors occurred during the operation of the audio source.

Possible error codes are listed in YSKErrorCode.
Parameters:
audioSource

Link to the object of the YSKAudioSource class that invoked the method.

error

An error that occurred while the audio source was running.

-audioSource:didReceiveData:

- (void)audioSource:(id< YSKAudioSource >)audioSource
     didReceiveData:(YSKSoundBuffer *)soundBuffer 

Called during data transmission.

This method can be called multiple times, depending on the amount of data transmitted by the audio source, with intervals equal to bufferCaptureTimeout.
Parameters:
audioSource

Link to the object of the YSKAudioSource class that invoked the method.

soundBuffer

Data buffer.

-audioSourceDidStart:

- (void)audioSourceDidStart:(id< YSKAudioSource >)audioSource 

Called when the audio source is ready to transmit data.

Parameters:
audioSource

Link to the object of the YSKAudioSource class that invoked the method.

-audioSourceDidStop:

- (void)audioSourceDidStop:(id< YSKAudioSource >)audioSource 

Called when the audio source finished transmitting data.

Parameters:
audioSource

Link to the object of the YSKAudioSource class that invoked the method.