[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] SF.net SVN: supercollider: [7392] trunk/build/SCClassLibrary/Common/Audio/ SynthDesc.sc



Revision: 7392
          http://svn.sourceforge.net/supercollider/?rev=7392&view=rev
Author:   cruxxial
Date:     2008-02-29 12:19:52 -0800 (Fri, 29 Feb 2008)

Log Message:
-----------
SynthDesc-defNameFromBytes parse the def name out of the bytes sent with /d_recv

Modified Paths:
--------------
    trunk/build/SCClassLibrary/Common/Audio/SynthDesc.sc

Modified: trunk/build/SCClassLibrary/Common/Audio/SynthDesc.sc
===================================================================
--- trunk/build/SCClassLibrary/Common/Audio/SynthDesc.sc	2008-02-29 20:18:25 UTC (rev 7391)
+++ trunk/build/SCClassLibrary/Common/Audio/SynthDesc.sc	2008-02-29 20:19:52 UTC (rev 7392)
@@ -252,7 +252,22 @@
 		};
 		msgFunc = string.compile.value;
 	}
+	// parse the def name out of the bytes array sent with /d_recv
+	*defNameFromBytes { arg int8Array;
+		var s,n,numDefs,size;	
+		s = CollStream(int8Array);
 	
+		s.getInt32;
+		s.getInt32;
+		numDefs = s.getInt16;
+		size = s.getInt8;
+		n = String.newClear(size);
+		^Array.fill(size,{
+		  s.getChar.asAscii
+		}).as(String)
+	}
+	
+
 }
 
 SynthDescLib {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.