• 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
mp3 file making CAAudioFile spin in BasicRead()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mp3 file making CAAudioFile spin in BasicRead()


  • Subject: mp3 file making CAAudioFile spin in BasicRead()
  • From: Brian Whitman <email@hidden>
  • Date: Wed, 14 Dec 2005 01:08:21 -0500

While testing my app (it uses CAAudioFile as a simple "anything to PCM" converter) on my iTunes library, I found one mp3 file (linked below) that completely hangs the program. On investigation the same file hangs any app I could find that uses CAAudioFile during the file- >open call. It plays fine in iTunes and QT, I don't remember the provenance of the file but iTunes claims it was encoded with iTunes 4.9.

It's frustrating as I don't want malformed songs to hang my app, there seems to be no way of getting out of the loop or detecting if it will happen. Looking a debug trace shows:

CAAudioFile::GetExistingFileInfo
CAAudioFile::InitFileMaxPacketSize
AudioFileProperty
MP3AudioFile::GetProperty
MP3AudioFile::UpdatePacketTable
MP3AudioFile::GetFPosForNextSyncWord
Cached_DataSource::ReadBytes
MacFile_DataSource::ReadBytes
FSReadFork
PBReadForkSync
BasicRead (which spins and eats up all CPU)

How to replicate: build the AudioFileTools.

cd /Developer/Examples/CoreAudio/Services/AudioFileTools/build...
curl -O http://variogr.am/clarity.mp3
./afinfo clarity.mp3

_______________________________________________
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: mp3 file making CAAudioFile spin in BasicRead()
      • From: Doug Wyatt <email@hidden>
    • Re: mp3 file making CAAudioFile spin in BasicRead()
      • From: Jeff Moore <email@hidden>
  • Prev by Date: Re: Link problem trying to use audiofloat library in my kext
  • Next by Date: Re: How to play a waveform?
  • Previous by thread: didFinishPlaying problem
  • Next by thread: Re: mp3 file making CAAudioFile spin in BasicRead()
  • Index(es):
    • Date
    • Thread