• 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 doesn't Honor AIFF block-align offset
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioFile doesn't Honor AIFF block-align offset


  • Subject: Re: AudioFile doesn't Honor AIFF block-align offset
  • From: William Stewart <email@hidden>
  • Date: Fri, 1 Jul 2005 18:16:51 -0700

That's not entirely unexpected behaviour - I'm presuming that you mean:

AudioFileReadBytes (    AudioFileID      inAudioFile,
                        Boolean            inUseCache,
                        SInt64            inStartingByte,
                        UInt32            *ioNumBytes,
                        void            *outBuffer)

This is a basic routine where the purpose is to read raw bytes from the data chunk of an audio file.

AudioFileReadPackets however should definitely only give you back Audio Data, so we should check that call with the example files you've posted

Thanks

Bill

On 01/07/2005, at 5:44 PM, Art Gillespie wrote:

Given an AIFF with the SSND chunk's offset field set to something other than 0, AudioFileGetBytes returns the entire WaveFormData field with all of the initial pad bytes. Depending on the offset, the effects when played back run from undetectable to monitor- destroying.

I've worked around this by reading in the offset myself and passing it to AudioFileGetBytes' inStartingByte parameter (and subtracting the offset from the value returned by kAudioFilePropertyAudioDataByteCount).

I've posted two real-world files which demonstrate this (i.e., both have SSND.offset > 0):

http://art.bitshiftaudio.com/download/34snare1.aif
http://art.bitshiftaudio.com/download/34snare2.aif

What I'm wondering if there's a property I should be using instead to get the proper offset to pass to AudioFileGetBytes or if this is an oversight in the AudioFile implementation.

Best,

Art
Glaresoft, Inc.
520.245.7839








_______________________________________________ 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

--
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
________________________________________________________________________ __


_______________________________________________
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


References: 
 >AudioFile doesn't Honor AIFF block-align offset (From: Art Gillespie <email@hidden>)

  • Prev by Date: AudioFile doesn't Honor AIFF block-align offset
  • Next by Date: No CoreMIDI patchbay functionality
  • Previous by thread: AudioFile doesn't Honor AIFF block-align offset
  • Next by thread: No CoreMIDI patchbay functionality
  • Index(es):
    • Date
    • Thread