سؤال

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.

هل كانت مفيدة؟

المحلول

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
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top