I'm going to make an Android karaoke app.

Asked 2 years ago, Updated 2 years ago, 23 views

I'm planning to create a karaoke application that will run on my Android phone, but I don't know how to implement the ability to run music and record at the same time.crying Is there a way to record the music at the same time as it's running??

android java

2022-09-21 16:55

1 Answers

One of the easy ways is to implement music playback using MediaPlayer and recording using MediaRecorder. MediaRecorder's setAudioSource (MediaRecorder.AudioSource).When MIC) is set, you can record the sound input to the microphone. At this time, if the music is being played through the speaker on the phone, the sound is recorded by microphone input. (Not recorded when using earphones) I think using these two classes is a simple way to record music and voice.

The other way is to record only the voice in the microphone, and then mix and output the music and voice to each channel during playback. Please refer to the following link for a rough flow.


2022-09-21 16:55

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.