Re: Play from Audio CD
Re: Play from Audio CD
- Subject: Re: Play from Audio CD
- From: Doug Wyatt <email@hidden>
- Date: Fri, 11 Jun 2010 08:10:10 -0700
ExtAudioFile definitely does not support simultaneous reading and writing.
AudioFile does, I believe. # sent from my iPhone
On Jun 10, 2010, at 13:46, John Johnson < email@hidden> wrote: Thanks for your response. I could not find AudioFileDispose in the headers. Perhaps there is an example in the CoreAudio archives of how to flush a file to disk while it is being written.
Oops, I meant ExtAudioFileDispose. Where can I find the archives?
It's certainly possible to play the data directly, while writing it to a file in parallel. However, you would need a multi-threaded design so that the audio does not glitch while you're ripping or writing. The ripping thread should basically write to a memory queue, while a playback thread plays from that queue without access any files or the disk. While you're at it, you might as well separate the file writing code into another thread unless it works out easily to keep it in the ripping thread.
I think this is what I'm doing. I use an NSOperation / NSOperationQueue combo to do the ripping. Do you know of any sample code that takes the approach you mention? Or if anyone knows of some code that may illustrate how to read from an AudioFile / ExtAudioFile as it's also being written to, that'd be a great help.
_______________________________________________
|
_______________________________________________
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