Re: Playing wave file data
Re: Playing wave file data
- Subject: Re: Playing wave file data
- From: john <email@hidden>
- Date: Wed, 15 Oct 2003 17:34:47 -0400
Just to add an unlikely possibility to look for...
I don't use the AudioFile API and rather implemented reading with my
own methods. However, I ran into a bug of accessing the audio data not
on the correct offset which made it massively distorted. However, as
Steve mentioned it's amazing how much you can "mangle" the data and
still make sense of it!
-- John
--- You don't mention anything about reading the header. You should
read the header to determine whether the WAV file is 8-bit or 16-bit,
mono or stereo. That could make a difference in sound quality.
--- Do you know that it's 16 bit sound?
--- I've never seen offset-binary used in a 16-bit WAV file (8-bits
sometimes, yes).
--- IIRC, you use 16-bit WAV data as is (without arithmetic)
--- There *-IS-* some math behind this - don't just make up a number.
If it's 16-bit sound, it has a range of -32768..+32767. So divide
(using floating-point arithmetic) the sound integers by 32767 to get
+/- 1.00000.
--- It's amazing how badly you can mangle the data and still hear what
you're expecting (ears and brains are wonderful things - everybody
should have some!).
That's symptomatic of high-bit-inversion. In your case, I'd bet on
the high-bit being incorrectly inverted.
----------------------------------------------------------------
Steve Bird
_______________________________________________
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.