setup 3d audio

coolbreeze <[email protected]>
Newsgroups gmane.comp.lib.openal
Message-ID <1272802297.8372.2.camel@coolbreeze>
Hi all,

I can't setup  a 3D audio with openal i dont understand what is the
problem, can someone help pls?.

source code:
int main(int argc,char** argv)
{
    ASS_Device* mydevice=NULL;
    ASS_Audio audio;
    float x=0,y=0,z=0;
    ASSfloat	listenerOri[]={5.0,0.0,5.0, 0.0,1.0,0.0};
    char val=0;

    if ((mydevice=ASS_InitDevice(ASS_ALSA_DEVICE)))
    {
        alListener3f(AL_POSITION,x,y,z);
        alListenerfv(AL_ORIENTATION,listenerOri);


ASS_LoadAudio("/home/coolbreeze/Documents/libs/fmodapi43000linux/fmoddesignerapi/examples/media/music/layer-drums-d.ogg",&audio);

        alSource3f(audio.source,AL_POSITION,20.f,0.f,20.f);
        alSource3f(audio.source,AL_VELOCITY,0.0f,0.f,0.f);
        alSourcei(audio.source,AL_LOOPING,AL_TRUE);
        ASS_PlayAudio(audio);
        do
        {
            val=getc(stdin);

            x+=0.5;
            z+=0.5;
            printf("%.2f\n",x);
            alListener3f(AL_POSITION,x,y,z);

        }
        while (val!=27);

        getchar();

        ASS_FreeAudio(&audio);
    }

    (void)argc;
    (void)argv;

    ASS_Close();
    return 0;
}


_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.