• 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: AudioFile.h
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioFile.h


  • Subject: Re: AudioFile.h
  • From: matt ingalls <email@hidden>
  • Date: Wed, 23 Apr 2003 15:19:44 -0700

this is what i am seeing.

BUT
i am STILL not able to get aiff and wav files to work:

AudioFileOpen returns no error

but then AudioFileGetProperty() calls for
kAudioFilePropertyDataFormat,
kAudioFilePropertyAudioDataByteCount,
and kAudioFilePropertyAudioDataPacketCount
all set the propertyData to zero.

Sd2 files work fine. Any idea why this may be happening?
[i am running 10.2.5 with a macho carbon codewarrior 8.3 proj]

thanks,
Matt;
________________________
matt ingalls
http://sonomatics.com/matt.html

On Wednesday, April 23, 2003, at 10:06 AM, Chris Reed wrote:

I almost forgot to post the results of my "experimentation".

I discovered that in 10.2.5, AudioFileOpen will indeed succeed in opening an mp3 file. Unless I really wasn't paying attention, it used to fail for mp3s prior to 10.2.5.

The AudioStreamBasicDescription that you get out of it has the mFormatID set to 'mp3 '. The sample rate was set to 44100.0 for the files I looked at. And mBytesPerPacket was set to 1152. All other fields were zeroed out (I think--going from memory here).

The upshot of this is that if you had code using the AudioFile API and weren't checking the format ID, people will be able to "open" mp3s with your code, undoubtedly causing unpleasantness like crashes.

-chris

On Tuesday, Apr 22, 2003, at 14:11 US/Central, Bill Stewart wrote:

The AudioFile code will currently only deal with non-compressed data reliably and AIF/WAVE/SD2 should all work the same. We are doing some more work in this area that we'll be going over in some detail at >> WWDC

We did fix the bug in 10.2.5 for the CD files (it was a mismatch on the resource if I remember correctly).

Bill

On Monday, April 21, 2003, at 08:23 PM, Chris Reed wrote:

Matt,

Something is wrong with either the audio files you are using or your use of the AudioFile API. AIFF and WAV files work just fine with all other software I've seen using the AudioFile calls (including my own). There were some reports of a bug with AudioFile and aifc files in CD audio format (can't remember which endian that is, little?), though.

But what's weird is that as far as I knew (And John, that's why he asked I would guess), mp3 files are *not* supported. Nor is any other compressed format.

So.. what OS version are you using? 10.2.5?

CA team: was support for mp3 and/or other compressed audio formats added to the AudioFile API?

Guess it's time to do some experimenting... :)

-chris

On Monday, Apr 21, 2003, at 21:41 US/Central, matt ingalls wrote:

Hey Matt, the AudioFile API works with MP3? Does it do the decompression itself?


it returns a buffer in 'mp3 ' stream format - maybe you can pass it
through an AudioConverter routine?- but i haven't tried --- im more
interested in aiff and wav file support at the moment - but for those
formats, kAudioFilePropertyDataFormat returns an empty stream
description and AudioFileReadPackets() does not return any frames.

AudioFileReadBytes() appears to work, but all the header info is
in there - so its not much use...

Matt;
________________________
matt ingalls
http://sonomatics.com/matt.html
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.


-- mailto:email@hidden
tel: +1 408 974 4056

______________________________________________________________________ ____
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
______________________________________________________________________ ____
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: AudioFile.h
      • From: James McCartney <email@hidden>
References: 
 >Re: AudioFile.h (From: Chris Reed <email@hidden>)

  • Prev by Date: Re: Audio delay when using CoreAudio outputs with QuickTime under 10.2
  • Next by Date: Clock Sources
  • Previous by thread: Re: AudioFile.h
  • Next by thread: Re: AudioFile.h
  • Index(es):
    • Date
    • Thread