Question

someone know idea regarding to fetching sound data from webservice? I used simple play, pause, stop sound to access application resources folder. Now i want to update this. plz, having some idea. thanks in advance.

Was it helpful?

Solution

This is for downloading audio file from server

NSData *soundData = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"SoundURL"]];

after downloading

AVAudioPlayer has a method for playing sound from NSData object .
You can use

- (id)initWithData:(NSData *)data error:(NSError **)outError method of AVAudioPlayer
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top