View Full Version : How to get stream of mp3 file and play

Jul 21, 2008, 11:50 PM
Hi all,

I want to get a stream of mp3 file [Ex: www.abc.com/audiofile.mp3].
my code snippet:

NSMutableURLRequest *urlRequest = [[[NSMutableURLRequest alloc] init] autorelease];
[urlRequest setHTTPShouldHandleCookies:YES];

[urlRequest setURL:[NSURL URLWithString:@"http://www.abc.com/audiofile.mp3"]];
[urlRequest setHTTPMethod:@"POST"];
[urlRequest setHTTPBody:postData];

NSData *requestedData = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:&urlResponse error:&theError];

and I am trying to feed the response data to AudioFileStreamParseBytes

Is It the right method ?

Canany one suggest the proper way and any sample codes.I am very new to this area.......