!7 module TransmitAudio > DynPrintLog { S sendTo; bool enabled; transient Q q; start { q = dm_startQ(); dm_addAudioListener(voidfunc(short[] data) { if (empty(sendTo)) ret; dm_privateChat_send(sendTo, "audio:" + base64(byteArrayFromShorts_littleEndian(data))); } } visualize { ret centerAndSouthWithMargins(super.visualize(), centerAndEast(withLabel("Send to:", dm_fieldTextField('sendTo)), dm_fieldCheckBox('enabled))); } }