News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

More fpu questions

Started by normcook, August 09, 2009, 06:06:10 PM

Previous topic - Next topic

dedndave

you can't represent 0.5 with an integer

normcook

Thanks for all the great responses.  For info, here's the protos from BASS.INC

BASS_SetVolume                     PROTO :DWORD                              ;sets the sound card volume
BASS_ChannelSetAttribute        PROTO :DWORD,:DWORD,:DWORD    ;sets the channel volume (and other things)

In both cases, Bass expects a value from 0 to 1.  For the VB declares, the setting is a Single
which is 32 bits.

Again, many thanks to all.

GregL

If you ask me, the prototypes should be

  BASS_SetVolume PROTO :REAL4
  BASS_ChannelSetAttribute PROTO :DWORD,:DWORD,:REAL4

it's a whole lot clearer what the function expects that way.

And it matches the C declarations

  BOOL BASS_SetVolume( float volume );
  BOOL BASS_ChannelSetAttribute( DWORD handle, DWORD attrib, float value );

GregL

QuoteHe should thus be OK if he includes windows.inc in his header.

Yep.  I should have said, "You should get in the habit of using REAL4 instead of FLOAT."