Re: Play from Audio CD
Re: Play from Audio CD
- Subject: Re: Play from Audio CD
- From: John Johnson <email@hidden>
- Date: Thu, 10 Jun 2010 16:43:45 -0500
> The API you want is the AudioFileStreaming API. That exposes the parsers for audio files to you via callbacks that you can implement to provide access to the data as it gets ripped. There is a project in our sample code called "AudioFileStreamExample" that illustrates this. Note that it was the demo code for a WWDC session from a few years ago. So you can go look up the session in the WWDC archives and see the talk that went with the code.
Hmm I did look through this very example. The problem is that a drive rips audio faster than it needs to be played so it would have to be buffered somehow, and this route doesn't allow for effective seeking within the data. Unless I'm missing something obvious? For example, my ripper is writing data in a separate thread using ExtAudioFileWrite. Is there a way to flush the file so that I can read from it in another thread?
Perhaps instead of the ripper providing ripped data to the delegate and the delegate just passively dealing with it, I should instead take an active approach and ask the ripper for specific frames. I'm just afraid this may end up being too slow and seeking would get ugly. Ideally I'd like to write it to a file and play at the same time.
> That said, audio CDs on the system are available to you as regular old audio files. You can the AudioFile or ExtendedAudioFile API to open and access the audio data on the disk directly.
Yeah, except if you noticed from my sample code, I also need access to the subchannel data. Can only get this from ripping. _______________________________________________
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