Skip to content

Instantly share code, notes, and snippets.

View Aleksandr-Melekhin's full-sized avatar

Aleksandr-Melekhin

View GitHub Profile
@niusounds
niusounds / AudioInputStream.kt
Last active March 31, 2024 17:22
AudioInputStream and AudioOutputStream for Android. These wrap AudioRecord and AudioTrack.
import android.media.AudioFormat
import android.media.AudioRecord
import android.media.MediaRecorder
import java.io.IOException
import java.io.InputStream
class AudioInputStream(
audioSource: Int = MediaRecorder.AudioSource.DEFAULT,
sampleRate: Int = 44100,
channelConfig: Int = AudioFormat.CHANNEL_IN_MONO,
@mamonu
mamonu / qcow2vdi.sh
Last active September 22, 2024 08:06
convert a qcow2 vm to a VirtualBox vm format
qemu-img convert -O vdi gnome.qcow2 gnome.vdi
#if its a raw image then:
VBoxManage convertdd opnstk.raw VBox.vdi --format VDI