PAGAudioReader Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | PAGAudioReader.h |
+ MakeWithSampleRate:sampleCount:channels:volume:
Creates a PAGAudioReader to read audio frame
+ (instancetype)MakeWithSampleRate:(NSInteger)sampleRate sampleCount:(NSInteger)sampleCount channels:(NSInteger)channels volume:(CGFloat)volumeParameters
sampleRate |
the sample rate of output audio frame |
|---|---|
sampleCount |
the sample count of output audio frame |
channels |
the channel count of output audio frame |
volume |
the volume of output audio frame which is usually in the range [0 - 1.0]. |
Declared In
PAGAudioReader.h
– setComposition:
Sets a new PAGComposition for PAGAudioReader to play as content. Note: If the composition is already added to another PAGAudioReader, it will be removed from the previous PAGAudioReader.
- (void)setComposition:(PAGComposition *)newCompositionDeclared In
PAGAudioReader.h
– seek:
Seeks to the specified target time.
- (void)seek:(NSInteger)timeDeclared In
PAGAudioReader.h
– readNextSample
Read the next audio frame. output format: PCM Signed 16 if channels == 1, channel layout is MONO if channels == 2, channel layout is STEREO
- (PAGAudioSample *)readNextSampleDeclared In
PAGAudioReader.h