I want to reverse bytes of NSMutableData
.
I am generating nsmutabledata object from a audio file. and playing it using data. my purpose is play audio reverse.
If I can reverse the NSMutableData
I will be success.
Here is my code
NSString *inputVideoPath = [[NSBundle mainBundle] pathForResource:@"chalne" ofType:@"mp3"];
NSMutableData *wave=[NSMutableData dataWithContentsOfURL:[NSURL fileURLWithPath:inputVideoPath]];
avPlayer = [[AVAudioPlayer alloc] initWithData:wave error:nil ];
[avPlayer prepareToPlay];
[avPlayer play];