Simulate 3d positional sound with sdl-mixer

Well, is that possible? I was thinking that perhaps balancing the sound
towards left or right could work, but now Im not so sure.–
What one fool can do, another can.
Silvanus P. Thompson


LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y m?viles desde 1 c?ntimo por minuto.
http://es.voice.yahoo.com

I don?t know the actual math/theory behind 3d positional sound but maybe if
you combine that sound balance with adjusting the volume based on distance
from the player’s virtual ear, it might not be right but maybe it would be
close?> ----- Original Message -----

From: sdl-bounces@lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of Luo Hei
Sent: Monday, March 24, 2008 5:45 AM
To: A list for developers using the SDL library. (includes SDL-announce)
Subject: [SDL] simulate 3d positional sound with sdl-mixer

Well, is that possible? I was thinking that perhaps balancing the sound
towards left or right could work, but now Im not so sure.


What one fool can do, another can.
Silvanus P. Thompson


LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y m?viles desde 1 c?ntimo por minuto.
http://es.voice.yahoo.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

http://jcatki.no-ip.org:8080/SDL_mixer/SDL_mixer.html#SEC76

SDL_mixer already has a simplistic 3D audio simulation effect that you can
use which acts as Alan describes.

Cheers,
JoshOn Mon, Mar 24, 2008 at 11:35 AM, Alan Wolfe wrote:

I don’t know the actual math/theory behind 3d positional sound but maybe
if
you combine that sound balance with adjusting the volume based on distance
from the player’s virtual ear, it might not be right but maybe it would be
close?

-----Original Message-----
From: sdl-bounces at lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org]
On
Behalf Of Luo Hei
Sent: Monday, March 24, 2008 5:45 AM
To: A list for developers using the SDL library. (includes SDL-announce)
Subject: [SDL] simulate 3d positional sound with sdl-mixer

Well, is that possible? I was thinking that perhaps balancing the sound
towards left or right could work, but now Im not so sure.


What one fool can do, another can.
Silvanus P. Thompson


LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y m?viles desde 1 c?ntimo por minuto.
http://es.voice.yahoo.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Well, left/right is indeed easy to achieve in a simple fashion, but
doing it properly, or handling up/down is more complex. If you have a
constant source, and just rotate your head left/right while being
otherwise still, you can hear differences in the sound. Emulating this
is achieved by filtering the sound depending on the sound source
placement:


In the case of moving sources, you’ll also want to emulate doppler:

So yes, even with 2 speakers, a lot of accuracy is possible, but it’s
also computationally intensive.

StephaneOn 3/24/08, Luo Hei <luo_hei at yahoo.es> wrote:

Well, is that possible? I was thinking that perhaps balancing the sound
towards left or right could work, but now Im not so sure.