hosc-0.17: Haskell Open Sound Control

Safe Haskell | None
Language | Haskell98

Sound.OSC.Coding.Decode.Binary

Description

Optimised decode function for OSC packets.

Synopsis

- get_packet :: Get Packet
- decodeMessage :: ByteString -> Message
- decodeBundle :: ByteString -> Bundle
- decodePacket :: ByteString -> Packet
- decodePacket_strict :: ByteString -> Packet

# Documentation

get_packet :: Get Packet Source #

Get an OSC `Packet`.

decodeMessage :: ByteString -> Message Source #

Decode an OSC `Message` from a lazy ByteString.

    let b = B.pack [47,103,95,102,114,101,101,0,44,105,0,0,0,0,0,0]
    decodeMessage b == Message "/g_free" [Int32 0]

decodeBundle :: ByteString -> Bundle Source #

Decode an OSC `Bundle` from a lazy ByteString.

decodePacket :: ByteString -> Packet Source #

Decode an OSC packet from a lazy ByteString.

    let b = B.pack [47,103,95,102,114,101,101,0,44,105,0,0,0,0,0,0]
    decodePacket b == Packet_Message (Message "/g_free" [Int32 0])

decodePacket_strict :: ByteString -> Packet Source #

Decode an OSC packet from a strict ByteString.