Android Question 3D surround sound

MasterGy

Member
Hello !

I'm experimenting with a method of how to detect forward and backward sound in addition to the left-right balance. I took a 'clean' sound sample. This is what I hear when the sound source is in front of me. I used Goldwave to remove the treble from it. I hear this sound when the sound source is behind me. I start both sound samples at the same time and with 'sound.setvolume(l,r)' I set the values for both sound samples depending on where they are located from me. When you start the program, a circle appears on the screen. The center of the circle is the position of the observer. The sound source can be placed anywhere in relation to the observer by touching it.

The thing works well. The surround effect can be felt with headphones or a hands-free stereo system.



However, I have a few questions about this:

- sometimes why are the two sound samples out of sync? When the slip is big, it's a bit confusing. It's also interesting that he always starts playing them at the same time, so every loop start is in sync. And the sound waves are randomly shifted relative to each other with each new playback.
- the sound samples are read as 'loop'. Why do you miss about 1/10s when you restart the playback?

- up to 50 different sound samples will be played in the game at the same time. I would like to know who can give me information about how much this burdens the phone? If it slows the program down a lot, I won't spend 1 day writing the sound management for this system.

- do you know a lib similar to mediaplayer, which can even have effects, which plays the audio sample more accurately in time? It would be nice if you didn't have to use such a 2-voice trick, but could elegantly parameterize the playback of a sound sample (eq, reverb...etc)


 
Top