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.
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.
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?
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.
I have an app that allows you to record short voice memos. Some users aren't able to record any audio(LG Ally being one device) at all. I'm using the MediaRecorder in android and am curious if there might be a "better" standard way to handle audio recording?