Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

...

  • Loading branch information...
commit dd9739d49addb7832123b6712bbdb4eb2a6b32f0 1 parent 1e0546d
authored
2  build.sbt
... ... @@ -1,6 +1,6 @@
1 1 name := "scalaosc"
2 2
3   -version := "0.24-SNAPSHOT"
  3 +version := "0.30-SNAPSHOT"
4 4
5 5 organization := "de.sciss"
6 6
2  src/main/scala/de/sciss/osc/Packet.scala
@@ -418,7 +418,7 @@ object Packet {
418 418 /**
419 419 * Encodes an `Packet` as OSC blob (tag `b`)
420 420 */
421   - object Packet extends Encoder[OSCPacket] {
  421 + object PacketAsBlob extends Encoder[OSCPacket] {
422 422 def encode( c: PacketCodec, v: OSCPacket, tb: ByteBuffer, db: ByteBuffer ) {
423 423 tb.put( 0x62.toByte ) // 'b'
424 424 val pos = db.position
12 src/main/scala/de/sciss/osc/PacketCodec.scala
@@ -365,7 +365,7 @@ object PacketCodec {
365 365 (if( booleanToInt ) Atom.BooleanAsInt else Atom.Boolean).encode( codec, b, tb, db )
366 366 // case c: Char if( useChars ) =>
367 367 case blob: ByteBuffer => Atom.Blob.encode( codec, blob, tb, db )
368   - case p: Packet if( usePackets ) => Atom.Packet.encode( codec, p, tb, db )
  368 + case p: Packet if( usePackets ) => Atom.PacketAsBlob.encode( codec, p, tb, db )
369 369 case None if( useNone ) => Atom.None.encode( codec, None, tb, db )
370 370 case u: Unit if( useImpulse ) => Atom.Impulse.encode( codec, u, tb, db )
371 371 case t: Timetag if( useTimetags ) => Atom.Timetag.encode( codec, t, tb, db )
@@ -378,7 +378,7 @@ object PacketCodec {
378 378 }
379 379 }
380 380
381   - @inline private def getDecoder( tag: Byte ) : Atom[_] = {
  381 + @inline private def getDecoder( tag: Byte ) : Atom.Decoder[_] = {
382 382 (tag.toInt: @switch) match {
383 383 case 0x69 => Atom.Int
384 384 case 0x66 => Atom.Float
@@ -393,7 +393,7 @@ object PacketCodec {
393 393 case 0x49 if( useImpulse ) => Atom.Impulse
394 394 case 0x74 if( useTimetags ) => Atom.Timetag
395 395 case 0x53 if( useSymbols ) => Atom.Symbol
396   - case _ => Atom.Unsupported
  396 + case ti => customDec.getOrElse( ti, Atom.Unsupported )
397 397 }
398 398 }
399 399
@@ -415,11 +415,11 @@ object PacketCodec {
415 415 case blob: ByteBuffer =>
416 416 Atom.Blob.printTextOn( codec, blob, stream, nestCount )
417 417 case p: Packet if( usePackets ) =>
418   - Atom.Packet.printTextOn( codec, p, stream, nestCount )
  418 + Atom.PacketAsBlob.printTextOn( codec, p, stream, nestCount )
419 419 case None if( useNone ) =>
420 420 Atom.None.printTextOn( codec, None, stream, nestCount )
421   - case () if( useImpulse ) =>
422   - Atom.Impulse.printTextOn( codec, (), stream, nestCount )
  421 + case u: Unit if( useImpulse ) =>
  422 + Atom.Impulse.printTextOn( codec, u, stream, nestCount )
423 423 case t: Timetag if( useTimetags ) =>
424 424 Atom.Timetag.printTextOn( codec, t, stream, nestCount )
425 425 case s: Symbol if( useSymbols ) => Atom.Symbol
2  src/main/scala/de/sciss/osc/ScalaOSC.scala
@@ -27,7 +27,7 @@ package de.sciss.osc
27 27
28 28 object ScalaOSC {
29 29 val name = "ScalaOSC"
30   - val version = 0.24
  30 + val version = 0.30
31 31 val copyright = "(C)opyright 2008-2011 Hanns Holger Rutz"
32 32 val isSnapshot = true
33 33

0 comments on commit dd9739d

Please sign in to comment.
Something went wrong with that request. Please try again.