Sha256: 2773b296d0a78440d7da783282002bee617eec5e044dd189f07c5a09b30a321b
Contents?: true
Size: 545 Bytes
Versions: 2
Compression:
Stored size: 545 Bytes
Contents
require File.join( File.dirname( __FILE__ ), "osc_argument" ) module OSC class OSCInt32 < OSCArgument def tag() 'i' end def encode() [@val].pack('N') end end class OSCFloat32 < OSCArgument def tag() 'f' end def encode() [@val].pack('g') end # fake - why fake? end class OSCString < OSCArgument def tag() 's' end def encode() padding(@val.sub(/\000.*\z/, '') + "\000") end end class OSCBlob < OSCArgument def tag() 'b' end def encode() padding([@val.size].pack('N') + @val) end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
aberant-osc-ruby-0.2.0 | lib/osc-ruby/osc_types.rb |
osc-ruby-0.2.0 | lib/osc-ruby/osc_types.rb |