...
   2) When I grab these 24 bits and put them into a integer value,  
   should it be INT32 or UINT32? I imagine that it should be INT32,  
   because it is signed. Correct?
        ...

Since it is signed, you'll want Int32.  Don't forget to sign extend.

        dim i as Int32
        i = ...     ' put the 24 bits into the low-order bits of i
        if bitwise.bitand(i, &h800000) <> 0 then
                i = bitwise.bitor(i, &hff000000)
        else
                i = bitwise.bitand(i, &h00ffffff)  ' never assume that 
unspecified bits are 0
        end

   3) If i wanted to convert the 24bit data into floats, what is the  
   proper means of doing this? Casting the integer value as a float?

Get it to an int, then assign to a float:

        dim f as Double
        f = i    ' i from above

Craig
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to