CjAudioPlayer
Instance Methods | Properties | List of all members
CjAudioPlayer Class Reference
Inheritance diagram for CjAudioPlayer:

Instance Methods

(id) - initWithSampleRate:frameSize:maxFramesToBuffer:audioFormat:
 Initializes the CjAudioPlayer class. More...
 
(void) - start
 Start the audio player.
 
(void) - stop
 Stop the audio player.
 
(void) - mute
 Mute the audio player.
 
(void) - unmute
 Unmute the audio player.
 
(BOOL) - isMute
 Check if the audio player is mute. More...
 
(void) - queueAudioFrames:
 Queue next audio frames to be processed and played. More...
 

Properties

id< CjAudioPlayerDelegatedelegate
 

Method Documentation

◆ initWithSampleRate:frameSize:maxFramesToBuffer:audioFormat:()

- (id) initWithSampleRate: (NSInteger)  sampleRate
frameSize: (NSInteger)  frameSize
maxFramesToBuffer: (NSInteger)  maxFramesToBuffer
audioFormat: (AudioPlayerFormat audioFormat 

Initializes the CjAudioPlayer class.

Parameters
sampleRateSample rate of the audio being played.
frameSizeSize of the audio frame. For example if we expect to receive 20 ms of audio at 48KHz, the corresponding frame size is 960.
maxFramesToBufferMaximum number of audio frames to buffer. Less frames means less lag but can cause audio cutouts if audio packets are not queued in proper time intervals due to network jitter. More frames means more consistent audio, but increases the lag. Recommended values are 8 for 20 ms audio frames, 5 for 40 ms audio frames.
audioFormatFormat of the audio to be played.

◆ isMute()

- (BOOL) isMute

Check if the audio player is mute.

Returns
YES if mute, NO otherwise.

◆ queueAudioFrames:()

- (void) queueAudioFrames: (NSData *)  audioFrames

Queue next audio frames to be processed and played.

Parameters
audioFramesThe audio frames to add to the queue.

The documentation for this class was generated from the following file: