audio recording in android without the surrounding sounds - android

Is there a way i can record a music playing in my phone excluding the environment sounds(sounds from the surrounding).

Related

Play audio on microphone on Android device

I'd like to create an App that plays an audio file/stream to the microphone to allow a video communication App to capture the sound as input.
To Play the Audio I'm currently using the AudioTrack class.
The closest question is this one, but still unanswered.

Is there any way to record internal sound of the mobile

I am making a drum app in which the user tap and the sound plays, but the problem is using media recorder the output source is set to mic and the outer sounds are recorded to i want to only record the sound of the drum
Looking forward for your helps

How to record internal audio?

I'm currently developing a mobile game that can be recorded while playing. And microphone is need during the game.
So I want to record the game background music, the game sound effects ,and
human voice from microphone.
I can record all the sounds through microphone now. But I can not hear the background music and sound effects clearly after the record is finished.
So,I want to know If I can record all the game sounds internally. I googled a lot And I found AudioRecord can do that by set the audio source to REMOTE_SUBMIX. But this is not allowed by non-system app in android.
So, is there any way to record internal audio in Android?

Android: Bypass Low Power Audio Player (LPA Player) on Galaxy S3

I've got a Music Playing app which is having trouble on some Galaxy S3's.
At the end of a track, the player switches audio output from the headphones to the speaker for a few seconds, or else the volume might jump up momentarily.
I've had some advice that it may be to do with the new gapless API's, and Samsung's LPA Player. At the end of a track, setNextMediaPlayer() is called, and I think this is where Android switches between the default Media Player and the LPA Player (provided the LPA Player is available). Because the LPA Player strips all the effects, I think it messes with the audio stream, and the phone gets confused.
I'd like to find a way to bypass the LPA Player. I had some advice to prepare a MediaPlayer with a >60s mp3 to consume the LPA Player, but it didn't seem to work for me (I don't have a test device for this bug myself), and it seems a pretty bad solution (I have to ship the app with an mp3, and presumably waste system resources holding a prepared MediaPlayer for the lifecycle of the app).
I'm open to suggestions, and also - who can I contact at Samsung or Google to have this issue formally addressed?
Thanks.

Android: when implementing a music player in my app, can i make sure there is no other media playing playing music right now?

I want my app to play music while it is running, but I don't want the music to overlap with the music currently being played from a different application (android music app or other external music app such as pandora, grooveshark or winamp).
My question is: is there a way to make sure that nothing else is playing right now regardless of the source?
Thanks!
As of android 2.2 you can use AudioManager.requestAudioFocus(), other audio players should listen for this focus change request and can stop/pause/lower volume of their audio according to what type of audio your focus requests. However not all audio playing apps have bothered to implement this yet.
To be nice you should also listen for audio focus change requests from other apps and pause your apps audio accordingly.
On earlier versions of android calling mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); will usually stop any other music from playing

Categories

Resources