How to write an Android audio effects unit - android

I want to write an Android app which acts as an audio effects unit for whatever audio is playing on the device. So it would intercept the currently playing audio data and be able to modify it before it's output. Is that possible?

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.

Flutter -Adding Voice Effects to locally saved audio file(.m4a) - Change Pitch, Add Background Music, Change Voice

I'm building a Flutter mobile application for Android. The User Should be able to add filters to the locally saved recorded audio file(.m4a) & should be able to play it after filters are applied. User Can apply filters like changing pitch, changing Voice, Mixing the audio by adding some background music. I don't find any library that supports these features. Anybody can suggest how to approach this ?
This can be achieved by using the Just Audio Library for Flutter
https://pub.dev/packages/just_audio.
Effects:.
This package offers different options to play with voice - Change Pitch, Equalizer, Loudness to add effects to the given local audio file / URL.
Background Music:.
To add background music, you can create another instance of a player & start playing some music of your choice while you are playing the main audio file.

How can I capture the raw audio stream on an android device?

I am trying to investigate if it is possible to get hold of audio stream on android device (for example android tv) which I can use for some purpose from inside my app (my app can be system app). Lets say something is playing on an android device (it could be anything that use the audio part of an android device). From my application , I would like to intercept the audio stream to analyze it, to record it, etc.
Any advice is appreciated.

How to detect when another app uses audio output?

I am working on a radio application and I am facing a problem that is: while my application is running and using audio output, if another application used the audio output, the sound then overlaps. I need to turn off my application's media player once the audio output is used by another application. How to detect when the audio output is used by another application?

android get device overall audio output in pcm

Is there any way to intercept or just-read the audio output in android device?
I need to read the whole audio output in PCM from inside myActivity, including media player application in background, voice from calls, MediaPlayer istances inside myACtivity, etc., everything that's going to played by speakers. Actually, if it was possible to read them separately, would be great as well.
I tried with AudioRecord, giving it as audioSource parameter every constant found in MediaRecorder.AudioSource with no luck, should I try different audioSources?
Is it a so low-level task that has to be handled within native layer?
The visualizer class is helpful. I use it to playback immediately played audio here.
This audio comes in very low quality, however, so it's only really good for visualization.

Categories

Resources