• 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: Reading bytes from an audio file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading bytes from an audio file


  • Subject: Re: Reading bytes from an audio file
  • From: Bill Stewart <email@hidden>
  • Date: Mon, 22 Sep 2003 15:23:40 -0700

In the SDK in PublicUtility there's code there that will read the entire file into an allocated buffer - its in the constructor for AudioFileData (its using the ReadPackets call, but that is similar enough (gives you the same result in this case) as the ReadBytes call with the appropriate modifications of course)

Bill

On Monday, September 22, 2003, at 02:15 PM, B&L wrote:

Hello

I am trying to load the audio bytes from a WAV file.

I am doing this by first reading the size property of the audio file using the function AudioFileGetProperty().

Using this size I try to read the audio bytes using the function AudioFileReadBytes, into an array of the same size, which is allocated through malloc(sizeof(char) * theAudioDataSize).

This keeps giving an kAudioFileUnspecifiedError! If I just try to read in 1024 bytes there is no error!

Anybody out there who knows if and what I am doing wrong?

The functions and error codes are all declared in the header file AudioFile.h.

Thanks

Brian
_______________________________________________
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.
References: 
 >Reading bytes from an audio file (From: B&L <email@hidden>)

  • Prev by Date: Reading bytes from an audio file
  • Next by Date: Re: Reading bytes from an audio file
  • Previous by thread: Reading bytes from an audio file
  • Next by thread: Re: Reading bytes from an audio file
  • Index(es):
    • Date
    • Thread