Re: are outOutputData mData float buffers always zeroed?
Re: are outOutputData mData float buffers always zeroed?
- Subject: Re: are outOutputData mData float buffers always zeroed?
- From: Brian Willoughby <email@hidden>
- Date: Sat, 13 Jul 2002 16:53:44 -0700
From: Bill Stewart <email@hidden>
[ The buffers cleared by the HAL before it is given out to clients.
[ So yes, you can just return and do nothing else
From: Jeff Moore <email@hidden>
[ The HAL does indeed zero out the output buffers prior to calling
[ your IO proc. If you don't want to supply any data for that cycle,
[ all you have to do is return.
One thing I'm interested in having clarified is whether the buffer is cleared
to integer "0" or float "0.0"
One general issue to be aware of in cross-platform coding is that not all
floating point representations recognize integer "0" as the same thing as float
"0.0" in the raw storage format. This probably isn't an issue for the
PowerPC, but is the HAL code doing a type-specific clear/zero? For integer
sample formats, calloc() would produce the right values, but for float sample
formats the safest cross-platform code would store float "0.0" values
programmatically.
Yes, I'm being pedantic, but it would be great if the documentation spelled
this out precisely, for those of us who are used to considering all the
warnings about floats and cross-platform coding.
Brian Willoughby
Sound Consulting
_______________________________________________
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.