Getting an AudioStreamBasicDescription from a stream, not a file
Getting an AudioStreamBasicDescription from a stream, not a file
- Subject: Getting an AudioStreamBasicDescription from a stream, not a file
- From: Chris Adamson <email@hidden>
- Date: Wed, 2 Apr 2008 11:42:53 -0400
I'm adapting the sample code from the Audio Queue Services Programming
Guide that plays an arbitrary file, so that it works with a stream
instead, replacing all the file-specific stuff with Audio File Stream
Services (and CFNetwork) calls.
I have a dumped MP3 -- yes, from a Shoutcast stream -- that works when
played with the aqtest sample code. So I've got known-good data to
play with. What I'm trying to do now is to play that audio with
stream APIs only, no file.
First blocker is how to provide the AudioQueueNewOutput with a
suitable AudioStreamBasicDescription, since the guide's code gets this
from
AudioFileGetProperty (..., kAudioFilePropertyDataFormat, ..., ...).
I'd hoped that maybe I could just set up my AudioFileStream and get
that property in a callback to my property-handilng method, but I
didn't get any property callbacks, at least not in the first 4 KB of
the stream.
Ideas? Am I just not getting it? Do I have to parse the stream and
build the AudioStreamBasicDescription myself?
--Chris
_______________________________________________
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