• 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: Play from Audio CD
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Play from Audio CD


  • Subject: Re: Play from Audio CD
  • From: Brian Willoughby <email@hidden>
  • Date: Fri, 11 Jun 2010 17:53:11 -0700


On Jun 11, 2010, at 08:24, John Johnson wrote:
ExtAudioFile definitely does not support simultaneous reading and writing.

AudioFile does, I believe.

OK, so it looks like the process is going to go a bit like this:
Rip some audio data from the disc.
Convert the audio data using a converter.
Write the audio data to a file using AudioFileWriteBytes (or callbacks??).
I'm with you up to here.


In a separate thread that will be playing the data, use AudioFileReadBytes (or callbacks??) to read the data from the file.

Seems reasonable, and likely to be correct.

You already have the audio data in your process space, as well as the converted audio data, so why would you want to read it back from a file? I understand that you might have some handy code which plays an audio file, and you might want to keep that for simplicity. However, CoreAudio also allows playback of audio directly from memory. Since you're already going to the trouble of ripping the audio data into memory and converting it into memory, why not just play back from memory, too?


As others have pointed out, your attempt to play an audio file which has not been completely written to disc is just asking for trouble. You'll note that iTunes will not allow the user to play a ripped track until it has been completely ripped and the file has been closed for writing. If you want to allow playback before the file has been written, then I suggest playback from memory.

There are plenty of CoreAudio samples for playing audio from buffers.

Brian Willoughby
Sound Consulting

_______________________________________________
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


  • Follow-Ups:
    • Re: Play from Audio CD
      • From: John Johnson <email@hidden>
    • Re: Play from Audio CD
      • From: John Johnson <email@hidden>
References: 
 >Play from Audio CD (From: John Johnson <email@hidden>)
 >Re: Play from Audio CD (From: Brian Willoughby <email@hidden>)
 >Re: Play from Audio CD (From: John Johnson <email@hidden>)
 >Re: Play from Audio CD (From: Doug Wyatt <email@hidden>)
 >Re: Play from Audio CD (From: John Johnson <email@hidden>)

  • Prev by Date: Re: AU Cocoa UIs that open further windows
  • Next by Date: Re: Play from Audio CD
  • Previous by thread: Re: Play from Audio CD
  • Next by thread: Re: Play from Audio CD
  • Index(es):
    • Date
    • Thread