hai all,
I'm trying to implement a Streaming music Player using iphone sdk, based on the sample code by Matt Gallagher ( http://cocoawithlove.com/2008/09/streaming-and-playing-live-mp3-stream.html)
now i would like to know how can i get the number of bytes available in the CFReadStreamRef .
After a long search i got the code to find the total size of the file
float audioFileSize = 0.0;
CFHTTPMessageRef myResponse = (CFHTTPMessageRef)CFReadStreamCopyProperty(stream, kCFStreamPropertyHTTPResponseHeader);
audioFileSize = [(NSString*)CFHTTPMessageCopyHeaderFieldValue(myResponse, (CFStringRef)@"Content-Length") floatValue];
CFRelease(myResponse);
I hope there will be some similar code to find the size of bytes available.
and also like to know how we can get duration of the music file in the stream and how long its played
thanks in advance