diff --git a/src/Main.kt b/src/Main.kt index 1cb5d27..ff903ae 100644 --- a/src/Main.kt +++ b/src/Main.kt @@ -12,22 +12,12 @@ fun main() = runBlocking { } delay(1000) Client.main(emptyArray()) - -// val ss = ByteArrayOutputStream() -// val o = ObjectOutputStream(ss) -// o.writeObject(DataPack(0, ByteArray(10) { 5 })) -// val i = ObjectInputStream(ByteArrayInputStream(ss.toByteArray())) -// val aa = i.readObject() as DataPack -// println(aa) } -//private val buffer = ThreadLocal() - fun OpusEncoder.encode( pcm: ByteArray, opusBuffer: ByteArray = ByteArray(pcm.size) ): DataPack { -// val pcm1 = Program.BytesToShorts(pcm, 0, pcm.size) val bytesEncoded = encode(pcm, 0, PACKET_SAMPLES, opusBuffer, 0, opusBuffer.size) return DataPack(System.currentTimeMillis(), opusBuffer.sliceArray(0..