I use this library for the piano, but I need to record the sounds from the piano into an audio file, how do I do this? I read about MediaRecorder, but is there only a microphone recording, or have I not found something?
Related
I have a media recorder, and i want to take screen capture without mic audio, only with the system sound.
Is there some solution to disable my mic and to capture system sounds?
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.NEED_SYSTEM_AUDIO_RESOURCE_HERE);
Unfortunately not. By Design mediarecorder took as audiosource only the predefined ones as per instruction.
in my android karaoke app I have a raw pcm data which is the voice of the singer and the mp4 file (music + the audio). Is there a way of attaching the .pcm to the mp4 as well ? so there will be video music and singer's voice ? even mp3 will be fine (just music and singer's voice)
thanks a lot
I believe what you need to do is open a second audio stream for the PCM data, and play it simultaneously with the mp4 file. This will likely require some thread programming. I've done this myself and am happy to offer help.
I play the music (internet radio stream) in a MediaPlayer. I would like to save the datastream (or the waveform) to a file, and play it back later. Does it have SDK support? I did not found, AudioRecorder and MediaRecorder is only good for mics and voice uplink/downlink.
So, how to save the data played by mediaplayer? And how to play it back? I need an API 8/9 to API 16 solution.
In my application I am doing live audio streaming using Android media player. I want to capture the sound stream played by MediaPlayer. Is there is way to record using Android MediaPlayer instead of MediaRecorder? Any suggestions?
While it is a non-trivial undertaking, you can write your own "MediaPlayer" that implements whatever streaming protocol you are using and writes the stream to a file instead of the speaker.
On Android, you can record audio from the microphone using the MediaRecorder class:
MediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
I want to record some parts of audio being played by a MediaPlayer instance instead (or some other audio playback device). Is that possible? How would I set a custom audio source?
To summarize; how do I stream audio into the MediaRecorder from an arbitrary audio source?
I don't think there is an API for that for now. Though it IS possible, you would have to have access to the device's buffer, down to the kernel/hardware level. Even if you find a way, I don't think Android would give you permission to do this on application level.