• 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: Inconsistencies with large WAV file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inconsistencies with large WAV file


  • Subject: Re: Inconsistencies with large WAV file
  • From: Brian Willoughby <email@hidden>
  • Date: Tue, 1 Dec 2009 00:33:47 -0800

It actually seems rather strange to me that kExtAudioFileProperty_FileLengthFrames is defined as SInt64 when there are so many UInt32 properties. I would think that it is impossible for a file to have negative length, and thus I would have expected UInt64 instead. I'm curious whether you get the right value if you use UInt64, although clearly that is at odds with the documentation. I also wonder whether QuickTime and the ExtAudioFile internals are using UInt64. But I have no way to answer your questions - I merely agree that this is a confusing API.

Brian Willoughby
Sound Consulting


On Nov 30, 2009, at 23:59, tahome izwah wrote:

Hi all,

I am looking at a strange problem and don't know what I might be doing
wrong. I am currently on 10.5.8 dealing with a 5 channel 16 bit signed
int WAV file that is 3.52 GB in size, which was (successfully) created
by our app using the ExtAudioFile API. The file plays fine in
QuickTime and the Finder preview.

Now if I do...

	SInt64 nf=0;
	propSize = sizeof(SInt64);
	err = ExtAudioFileGetProperty(xafref,
kExtAudioFileProperty_FileLengthFrames, &propSize, &nf);
	if (err) {
      NSLog(@"error in ExtAudioFileGetProperty, %d", err);
		ExtAudioFileDispose(xafref);
		return err;
	}

...to get the number of available frames in that file I am getting
back a value of -60672553 in nf, with no error. This causes my app to
refuse playing the file because it has an invalid length.

If I write the same content to a CAF file everything works fine.

How come that QuickTime can play the file, ExtAudioFile can create and
write to it but that property reports back an incorrect file size?
That doesn't make any sense - is there another API call that I should
be using instead??

Thanks, I'm really pulling my hair out over this.
--th

_______________________________________________
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: Inconsistencies with large WAV file
      • From: tahome izwah <email@hidden>
  • Next by Date: Detecting file completion of AUAudioFilePlayer playback
  • Next by thread: Re: Inconsistencies with large WAV file
  • Index(es):
    • Date
    • Thread