• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to identify Streaming Audio Data Format - iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to identify Streaming Audio Data Format - iOS


  • Subject: Re: How to identify Streaming Audio Data Format - iOS
  • From: Chris Adamson <email@hidden>
  • Date: Sat, 27 Apr 2013 11:22:11 -0400

Maybe you should look at the response you get in your networking code. For example, if you're using Foundation's URL Loading System, in -[NSURLConnectionDelegate connection:didReceiveResponse:] you could look at the MIMEType property of the response to see if it's "audio/mpeg" (for MP3) or something else.

For these two stations:
//#define STATION_URL_STRING @"http://1661.live.streamtheworld.com:80/CBC_R3_WEB_SC"
//#define STATION_URL_STRING @"http://armitunes.com:8010/"

The first has MIME type "audio/mpeg", so the hint should be kAudioFileMP3Type.

The second has MIME type "application/octet-stream", and the hint kAudioFileAAC_ADTSType seems to work (though I don't feel good about getting such a generic MIME type)

Hope this helps.

--Chris

On Apr 25, 2013, at 9:30 PM, Sasikumar JP <email@hidden> wrote:

Hi,
  
    I would like to know how to identify the stream data format using Core Audio API. 

I am using AudioFileStreamOpen API with hint as 0, expecting that it would return property notification with property id = kAudioFileStreamProperty_DataFormat.

If i use AudioFileStreamOpen API with hint as 0. Parsing fails with typ? error code.

If i specify the hint as kAudioFileMP3Type, everything works fine for MP3 stream.

what is the best way to identify the audio stream data format using CoreAudio API?

My application will have to handle AAC/MP3 audio stream formats. i will not know in advance what data format for each stream.i will like the Core audio API detects the data format.

Any help is highly appreciated.

Thank you
Sasikumar JP
Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >How to identify Streaming Audio Data Format - iOS (From: Sasikumar JP <email@hidden>)

  • Prev by Date: How to identify Streaming Audio Data Format - iOS
  • Next by Date: Multi-channel loop software: Audio Unit vs. Host?
  • Previous by thread: How to identify Streaming Audio Data Format - iOS
  • Next by thread: Multi-channel loop software: Audio Unit vs. Host?
  • Index(es):
    • Date
    • Thread