Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

...

  • Loading branch information...
commit dd9739d49addb7832123b6712bbdb4eb2a6b32f0 1 parent 1e0546d
@Sciss authored
View
2  build.sbt
@@ -1,6 +1,6 @@
name := "scalaosc"
-version := "0.24-SNAPSHOT"
+version := "0.30-SNAPSHOT"
organization := "de.sciss"
View
2  src/main/scala/de/sciss/osc/Packet.scala
@@ -418,7 +418,7 @@ object Packet {
/**
* Encodes an `Packet` as OSC blob (tag `b`)
*/
- object Packet extends Encoder[OSCPacket] {
+ object PacketAsBlob extends Encoder[OSCPacket] {
def encode( c: PacketCodec, v: OSCPacket, tb: ByteBuffer, db: ByteBuffer ) {
tb.put( 0x62.toByte ) // 'b'
val pos = db.position
View
12 src/main/scala/de/sciss/osc/PacketCodec.scala
@@ -365,7 +365,7 @@ object PacketCodec {
(if( booleanToInt ) Atom.BooleanAsInt else Atom.Boolean).encode( codec, b, tb, db )
// case c: Char if( useChars ) =>
case blob: ByteBuffer => Atom.Blob.encode( codec, blob, tb, db )
- case p: Packet if( usePackets ) => Atom.Packet.encode( codec, p, tb, db )
+ case p: Packet if( usePackets ) => Atom.PacketAsBlob.encode( codec, p, tb, db )
case None if( useNone ) => Atom.None.encode( codec, None, tb, db )
case u: Unit if( useImpulse ) => Atom.Impulse.encode( codec, u, tb, db )
case t: Timetag if( useTimetags ) => Atom.Timetag.encode( codec, t, tb, db )
@@ -378,7 +378,7 @@ object PacketCodec {
}
}
- @inline private def getDecoder( tag: Byte ) : Atom[_] = {
+ @inline private def getDecoder( tag: Byte ) : Atom.Decoder[_] = {
(tag.toInt: @switch) match {
case 0x69 => Atom.Int
case 0x66 => Atom.Float
@@ -393,7 +393,7 @@ object PacketCodec {
case 0x49 if( useImpulse ) => Atom.Impulse
case 0x74 if( useTimetags ) => Atom.Timetag
case 0x53 if( useSymbols ) => Atom.Symbol
- case _ => Atom.Unsupported
+ case ti => customDec.getOrElse( ti, Atom.Unsupported )
}
}
@@ -415,11 +415,11 @@ object PacketCodec {
case blob: ByteBuffer =>
Atom.Blob.printTextOn( codec, blob, stream, nestCount )
case p: Packet if( usePackets ) =>
- Atom.Packet.printTextOn( codec, p, stream, nestCount )
+ Atom.PacketAsBlob.printTextOn( codec, p, stream, nestCount )
case None if( useNone ) =>
Atom.None.printTextOn( codec, None, stream, nestCount )
- case () if( useImpulse ) =>
- Atom.Impulse.printTextOn( codec, (), stream, nestCount )
+ case u: Unit if( useImpulse ) =>
+ Atom.Impulse.printTextOn( codec, u, stream, nestCount )
case t: Timetag if( useTimetags ) =>
Atom.Timetag.printTextOn( codec, t, stream, nestCount )
case s: Symbol if( useSymbols ) => Atom.Symbol
View
2  src/main/scala/de/sciss/osc/ScalaOSC.scala
@@ -27,7 +27,7 @@ package de.sciss.osc
object ScalaOSC {
val name = "ScalaOSC"
- val version = 0.24
+ val version = 0.30
val copyright = "(C)opyright 2008-2011 Hanns Holger Rutz"
val isSnapshot = true
Please sign in to comment.
Something went wrong with that request. Please try again.