hosc-0.14: Haskell Open Sound Control

Safe HaskellNone

Sound.OSC.Coding.Byte

Description

Byte-level coding utility functions.

Synopsis

Documentation

encode_i8 :: Int -> ByteStringSource

Encode a signed 8-bit integer.

encode_i16 :: Int -> ByteStringSource

Encode a signed 16-bit integer.

encode_i32 :: Int -> ByteStringSource

Encode a signed 32-bit integer.

encode_u32 :: Int -> ByteStringSource

Encode an unsigned 16-bit integer.

encode_i64 :: Int64 -> ByteStringSource

Encode a signed 64-bit integer.

encode_u64 :: Word64 -> ByteStringSource

Encode an unsigned 64-bit integer.

encode_f32 :: Float -> ByteStringSource

Encode a 32-bit IEEE floating point number.

encode_f64 :: Double -> ByteStringSource

Encode a 64-bit IEEE floating point number.

encode_str :: ASCII -> ByteStringSource

Encode an ASCII string.

decode_i8 :: ByteString -> IntSource

Decode a signed 8-bit integer.

decode_i16 :: ByteString -> IntSource

Decode a signed 16-bit integer.

decode_i32 :: ByteString -> IntSource

Decode a signed 32-bit integer.

decode_u32 :: ByteString -> IntSource

Decode an unsigned 32-bit integer.

decode_i64 :: ByteString -> Int64Source

Decode a signed 64-bit integer.

decode_u64 :: ByteString -> Word64Source

Decode an unsigned 64-bit integer.

decode_f32 :: ByteString -> FloatSource

Decode a 32-bit IEEE floating point number.

decode_f64 :: ByteString -> DoubleSource

Decode a 64-bit IEEE floating point number.

decode_str :: ByteString -> ASCIISource

Decode an ASCII string.

bundleHeader_strict :: ByteStringSource

Bundle header as a (strict) ByteString.

bundleHeader :: ByteStringSource

Bundle header as a lazy ByteString.

align :: (Num i, Bits i) => i -> iSource

The number of bytes required to align an OSC value to the next 4-byte boundary.

 map align [0::Int .. 7] == [0,3,2,1,0,3,2,1]