• 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
AudioFileReadBytes() byte-swapping on iPhone OS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AudioFileReadBytes() byte-swapping on iPhone OS


  • Subject: AudioFileReadBytes() byte-swapping on iPhone OS
  • From: Brad Garton <email@hidden>
  • Date: Tue, 5 Jan 2010 21:25:42 -0500

Hey CoreAudio-folks --

I'm reading stereo aiff files (16-bit) into a buffer using AudioFileReadBytes(), it works fine BUT I notice that I have to do CFSwapInt16() on each short int in the buffer to get intelligible values (same also using AudioFileReadPackets()).  I'm using byte and packet offsets of 0, so I don't think I'm misaligning my read.  I tried it with aiff files from three independent sources thinking that maybe there was some header weirdness, but seems the same in all cases.

Is this 'nornal'?

IPhone SDK 3.0, developing using XCode 3.2.1 on OSX 10.6.2.

brad
http://music.columbia.edu/~brad

 _______________________________________________
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: AudioFileReadBytes() byte-swapping on iPhone OS
      • From: Doug Wyatt <email@hidden>
  • Prev by Date: Re: normalize AVAudioRecorder iPhone
  • Next by Date: IO Cycle for Audio Playthrough
  • Previous by thread: Re: Trouble downloading Core Audio SDK
  • Next by thread: Re: AudioFileReadBytes() byte-swapping on iPhone OS
  • Index(es):
    • Date
    • Thread