• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps 3D audio on Android

Wiisley

Lurker
Aug 6, 2010
3
0
Hi all,

I'm a master student at the university of Utrecht working on his master thesis project. The project is on 3D audio on mobile phones, developing on Android in my case.

I'm still looking for a way to simulate the 3D audio with headphones. I think a simple version using just the time delay between to ears and perhaps volume difference should give something to work with.
However, my initial idea of just playing a sound twice, with the given delay obviously doesn't work since there will be (random) lag between the 2 commands.
My supervisor mentioned it might be possible to adjust the audiodata when playing it and add some silence in front of the left or right channel.
It seems the write method from the audioTrack class could be used for that:
write (byte[] audioData, int offsetInBytes, int sizeInBytes)
You have a byte array of audiodata which is what you want. Hover, it looks like this data is sent to both ears.

Is there a way to edit the data to both ears seperately? Or is there another way i can create 3D audio? Iphone support openAL which has 3D audio functions in it if i'm correct, but sound on Android doesn't seem that advance.

I would be gratefull if someone could help me. the actual implementation isn't the biggest part. The research to see what i can do with it is the biggest part...

thanx in advance!
 
hi id0001,

I have seen that method and that would work partially, but that won't be enough. you need a delay between left and right ear as well, and there is no standard function for that.

thanx for the suggestion.

I think i have to mix PCM data to one stream, but have no idea how that works. anyone has some info on that?
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones