I get sound bytes from the network and play them through AudioTrack. The problem is that stutters are heard between bytes from different sources (one-to-one communication works with a bang). It is necessary for me that the data taken from different sources be played simultaneously or that it seems that the data is being played at the same time. SoundPool does this, but it seems to require pre-loading of the audio fragment. Tell me how to solve this problem.
1 answer
I have never used AudioTrack, but logically - just during the switching of sources, a “gap” occurs. And the sound is not a video, the hearing is much more sensitive to tears than vision, and the time it takes for the source to change is enough to notice.
Maybe you need to use one copy of AudioTrack on each source so that they play independently?
|