Perform Audio Fade effect in / out on the Audio channel on Android

0

I use the AudioManager.setStreamMute(..,true/false) function to make mute or unmute to the Audio channel. Obviously cut the sound of blow, I would like the cut was not so abrupt, but before silencing is going down the volume sound fadeOut and to remove the silence as it goes up as was sound FadeIn .

    
asked by Webserveis 17.05.2017 в 13:20
source

1 answer

1

It occurs to me that instead of setStreamMute() (which is deprecated from API 23) you could use setStreamVolume (int streamType,int index,int flags) within a for with a small Timer so that it is not so instantaneous. Here the docu

Sorry I did not put an example code, but I do not have an android editor here

    
answered by 17.05.2017 в 13:39