Module: FMOD::Convert
- Defined in:
- lib/fmod/convert.rb
Class Method Summary collapse
-
.int32_to_64(hi32, lo32) ⇒ Object
since ruby will automatically convert to a Bignum if needed, this should work fine even on 32-bit platforms.
- .int64_to_32(int64) ⇒ Object
- .ms_to_samples(ms, opts = {}) ⇒ Object
- .samples_to_ms(samples, opts = {}) ⇒ Object
Class Method Details
.int32_to_64(hi32, lo32) ⇒ Object
since ruby will automatically convert to a Bignum if needed, this should work fine even on 32-bit platforms
6 7 8 |
# File 'lib/fmod/convert.rb', line 6 def self.int32_to_64(hi32, lo32) (hi32 << 32) | lo32 end |
.int64_to_32(int64) ⇒ Object
10 11 12 |
# File 'lib/fmod/convert.rb', line 10 def self.int64_to_32(int64) [(int64 & 0xFFFFFFFF00000000) >> 32, int64 & 0xFFFFFFFF] end |