I am using AVQueuePlayer
for playing multiple audio which are saved locally.
For reference please check below code,
for (int j = 0; j < arrPlayData.count; j++) {
path =[[NSBundle mainBundle] pathForResource:[[arrPlayData objectAtIndex:j] valueForKey:AUDIO_NAME] ofType:@"wav"];
item = [[AVPlayerItem alloc] initWithURL:[NSURL fileURLWithPath:path]];
if (_queuePlayer == nil) {
_queuePlayer = [[AVQueuePlayer alloc] initWithPlayerItem:item];
} else{
[_queuePlayer insertItem:item afterItem:nil];
}
}
[_queuePlayer setVolume:1.0];
[_queuePlayer play];
This is working fine,
Now I want to apply tempo for generated audio between 0 to 240 as shown in below image.
I am aware about the setRate:
property and applied it as below,
[_queuePlayer setRate:sldValue/240.0];
Here, sldValue is selected value from above slider. Here if I select 240 from slider then rate becomes 1(Which plays audio in normal form - Original one). And as I select down value from slider then it will slow down the audio speed.
My query is how to increase audio speed then normal play. Or how this tempo exactly working?
Any help is really appreciated. Thanks in advance!