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.

Était-ce utile?

La 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
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top