问题
I did not manage to find solution what to use instead of deprecated AudioTrack's method setStereoVolume.
There is info about this in reference, but I am not sure how to use setVolume for muting left/right channel.
This method was deprecated in API level 21. Applications should use setVolume(float) instead, as it more gracefully scales down to mono, and up to multi-channel content beyond stereo.
I need to play only one channel at a time, but I cannot find appropriate solution. I've already checked solution with LRLRLR samples, and playing one channel by setting every 2nd sample to 0, but did not help.
Thank you.
来源:https://stackoverflow.com/questions/37309473/audiotrack-setstereovolume-deprecated