FROM : Olivier Lanctôt
DATE : Tue Apr 19 23:48:01 2005
Hello,
I'm using this method
ComponentResult SGGetChannelVolume (
SGChannel c,
short *volume );
the problem is that volume isn't a normal short int. The doc says it is
"A pointer to an integer that is to receive the volume setting of the
channel represented as a 16-bit, fixed-point number. The high-order 8
bits contain the integer part of the value; the low-order 8 bits
contain the fractional part. Volume values range from –1.0 to 1.0.
Negative values play no sound but preserve the absolute value of the
volume setting."
I'm a bit rusty in C... what would be that data type? how do I change
this to a float, and why don,t they use a float if it's -1.0 to 1.0?!
Thanks!
--
Olivier
DATE : Tue Apr 19 23:48:01 2005
Hello,
I'm using this method
ComponentResult SGGetChannelVolume (
SGChannel c,
short *volume );
the problem is that volume isn't a normal short int. The doc says it is
"A pointer to an integer that is to receive the volume setting of the
channel represented as a 16-bit, fixed-point number. The high-order 8
bits contain the integer part of the value; the low-order 8 bits
contain the fractional part. Volume values range from –1.0 to 1.0.
Negative values play no sound but preserve the absolute value of the
volume setting."
I'm a bit rusty in C... what would be that data type? how do I change
this to a float, and why don,t they use a float if it's -1.0 to 1.0?!
Thanks!
--
Olivier
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

