◆ initWithSampleRate:frameSize:maxFramesToBuffer:audioFormat:()
- (id) initWithSampleRate: |
|
(NSInteger) |
sampleRate |
frameSize: |
|
(NSInteger) |
frameSize |
maxFramesToBuffer: |
|
(NSInteger) |
maxFramesToBuffer |
audioFormat: |
|
(AudioPlayerFormat) |
audioFormat |
|
|
| |
Initializes the CjAudioPlayer class.
- Parameters
-
sampleRate | Sample rate of the audio being played. |
frameSize | Size of the audio frame. For example if we expect to receive 20 ms of audio at 48KHz, the corresponding frame size is 960. |
maxFramesToBuffer | Maximum 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. |
audioFormat | Format of the audio to be played. |
◆ 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
-
audioFrames | The audio frames to add to the queue. |
The documentation for this class was generated from the following file: