How to get stream of mp3 file and play

Discussion in 'iOS Programming' started by mathan, Jul 21, 2008.

  1. macrumors newbie

    Jul 21, 2008
    Hi all,

    I want to get a stream of mp3 file [Ex:].
    my code snippet:

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

    [urlRequest setURL:[NSURL URLWithString:mad:""]];
    [urlRequest setHTTPMethod:mad:"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.......

Share This Page