From 7d20b9c8418327dd3774f6365afe15855ba85bcf Mon Sep 17 00:00:00 2001 From: loliball <26589867+loliball@users.noreply.github.com> Date: Sat, 31 Aug 2024 14:51:16 +0800 Subject: [PATCH] nb2 --- src/Main.kt | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) 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..