Post on Medial

any Android developer here, please help me, I want to make a music sharing app like i play something on my phone and it will play on all of my friends who are connected to me by wifi. i will use sockets to transfer the audio but i didn't find any way

See More

ALOK MAURYA

Stealth • 6m

I don't know the working of code or context it have been used, but this is what I get FROM Claude 3 Opus Use the Android AudioRecord API to capture the audio output from your device. You can use the AudioRecord class to read audio data from the audio hardware. Here's a simple example of using AudioRecord to capture audio: private AudioRecord audioRecord; private int bufferSize; private void startRecording() { bufferSize = AudioRecord.getMinBufferSize(44100, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT); audioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC, 44100, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT, bufferSize); audioRecord.startRecording(); } private void stopRecording() { if (audioRecord != null) { audioRecord.stop(); audioRecord.release(); audioRecord = null; } }

1 replies
Replies (1)

Download the medial app to read full posts, comements and news.