mainThe OpenVortex Project - Support: sr #102992, A3D

 
 

sr #102992: A3D

Submitter:  None
Submitted:  Fri 09 Apr 2004 01:36:23 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  6 - Security Status:  None
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 20 Jul 2004 03:33:12 AM UTC, comment #20: 

I/O Logging: DEBUG OPTIONS:  ESC=Exit
1 - Discard Log Contents
2 - Dump last 50 I/O
3 - Dump last 500 I/O
4 - Dump last 1000 I/O
5 - Dump last 2000 I/O
6 - Dump ALL (%d) I/O

I/O Data written to C:\Vortex.IO

Anonymous
Mon 19 Jul 2004 02:57:49 PM UTC, comment #19: 

Do anyone know how to send "DEBUG_QUERY" to win9x au30core.vxd to display the dignostic menu to dump I/O access log to file ?


Anonymous
Sun 04 Jul 2004 05:59:23 PM UTC, comment #18: 
Anonymous
Tue 22 Jun 2004 02:59:15 PM UTC, comment #17: 
Anonymous
Tue 15 Jun 2004 05:42:23 PM UTC, comment #16: 

Able to run xldemo, there are 5 sound sources.

However CPU usage is 100%

Anonymous
Tue 15 Jun 2004 03:06:25 PM UTC, comment #15: 

How to replace the depreacted istrstream  class ?


void Object::Init (char* FileName)
{
   init PolyList
   KillPolyList();
  
   ifstream InputFile(FileName);
   assert(InputFile);

   const int BUFSIZE = 256;
   char buf[BUFSIZE];
  
   while (InputFile.getline(buf, BUFSIZE)) {
      istrstream line(buf, BUFSIZE);
      char function[BUFSIZE];
      char throwaway[BUFSIZE];
      char strval[BUFSIZE];
      float fval1, fval2, fval3, fval4;
      line >> function;
      line >> throwaway;
      if (strcmp(function, "shape") == 0) {
      line >> strval;
      fval1 = fval2 = fval3 = fval4 = 0.0f;
         if (strcmp(strval, "QUADS") == 0) {
            AddPolyList(SHAPE, QUADS, fval1, fval2, fval3, fval4);
         }
         if (strcmp(strval, "TRIANGLES") == 0) {
            AddPolyList(SHAPE, TRIANGLES, fval1, fval2, fval3, fval4);
         }
      } else {
      strval[0] = 0;
      line >> fval1 >> throwaway >> fval2 >> throwaway >> fval3;
         fval4 = 0.0f;
         if (strcmp(function, "color3") == 0) {
            AddPolyList(COLOR3, 0, fval1, fval2, fval3, fval4);
         }
         if (strcmp(function, "color4") == 0) {
            line >> throwaway >> fval4;
            AddPolyList(COLOR4, 0, fval1, fval2, fval3, fval4);
         }
         if (strcmp(function, "normal") == 0) {
            AddPolyList(NORMAL, 0, fval1, fval2, fval3, fval4);
         }
         if (strcmp(function, "vertex") == 0) {
            AddPolyList(VERTEX, 0, fval1, fval2, fval3, fval4);
         }

      }  
   }
}


Any alternative way to read those *.mdl file ?


// "Van"
 
// front bumper
shape = QUADS
color3 = 1.0, 1.0, 0.0
normal = 0.0, 0.0, 1.0
vertex = 0.000, 0.600, 0.000
vertex = 2.100, 0.600, 0.000
vertex = 2.100, 1.500, 0.000
vertex = 0.000, 1.500, 0.000
 
// right-rear panel
color3 = 0.8, 0.8, 0.0
normal = 1.0, 0.0, 0.0
vertex = 2.100, 0.600, -0.900
vertex = 2.100, 0.600, -3.600
vertex = 2.100, 2.400, -3.600
vertex = 2.100, 2.400, -0.900
 
// right-front lower panel
normal = 1.0, 0.0, 0.0
vertex = 2.100, 0.600, 0.000
vertex = 2.100, 0.600, -0.900
vertex = 2.100, 1.500, -0.900
vertex = 2.100, 1.500, 0.000
 
// right-front upper panel/window
shape = TRIANGLES
color3= 0.0, 0.0, 0.2
normal = 1.0, 0.0, 0.0
vertex = 2.100, 1.500, 0.000
vertex = 2.100, 1.500, -0.900
vertex = 2.100, 2.400, -0.900
 
// rear
shape = QUADS
color3 = 1.0, 1.0, 0.0
normal = 0.0, 0.0, -1.0
vertex = 2.100, 0.600, -3.600
vertex = 0.000, 0.600, -3.600
vertex = 0.000, 2.400, -3.600
vertex = 2.100, 2.400, -3.600
 
// left-back panel
color3 = 0.8, 0.8, 0.0
normal = -1.0, 0.0, 0.0
vertex = 0.000, 0.600, -3.600
vertex = 0.000, 0.600, -0.900
vertex = 0.000, 2.400, -0.900
vertex = 0.000, 2.400, -3.600
 
// left-front lower panel
normal = -1.0, 0.0, 0.0
vertex = 0.000, 0.600, -0.900
vertex = 0.000, 0.600, 0.000
vertex = 0.000, 1.500, 0.000
vertex = 0.000, 1.500, -0.900
 
// right-front upper panel/window
shape = TRIANGLES
color3= 0.0, 0.0, 0.2
normal = -1.0, 0.0, 0.0
vertex = 0.000, 1.500, -0.900
vertex = 0.000, 1.500, 0.000
vertex = 0.000, 2.400, -0.900
 
// roof
shape = QUADS
color3 = 0.8, 0.8, 0.0
normal = 0.0, -1.0, 0.0
vertex = 0.000, 2.400, -0.900
vertex = 0.000, 2.400, -3.600
vertex = 2.100, 2.400, -3.600
vertex = 2.100, 2.400, -0.900
 
// windshield
color3 = 0.0, 0.0, 0.2
normal = 0.0, 0.3, 0.3
vertex = 0.000, 1.500, 0.000
vertex = 2.100, 1.500, 0.000
vertex = 2.100, 2.400, -0.900
vertex = 0.000, 2.400, -0.900




Anonymous
Tue 15 Jun 2004 07:31:01 AM UTC, comment #14: 

/* XTALK kcontrol */
static int
snd_vortex_xtalk_info(snd_kcontrol_t kcontrol, snd_ctl_elem_info_t uinfo)
{
static char *texts[] = { "Headphone", "Narrow Speakers", "Wide Speakers", "Diamond" };

uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
uinfo->count = 1;
uinfo->value.enumerated.items = 4;
if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items)
uinfo->value.enumerated.item =
    uinfo->value.enumerated.items - 1;
strcpy(uinfo->value.enumerated.name,
       texts[uinfo->value.enumerated.item]);
return 0;
}
static int
snd_vortex_xtalk_get(snd_kcontrol_t kcontrol, snd_ctl_elem_value_t ucontrol)
{
vortex_t *vortex = snd_kcontrol_chip(kcontrol);

ucontrol->value.enumerated.item[0] = vortex->xt_mode;
return 0;
}
static int
snd_vortex_xtalk_put(snd_kcontrol_t kcontrol, snd_ctl_elem_value_t ucontrol)
{
vortex_t *vortex = snd_kcontrol_chip(kcontrol);
        Vort3DRend_Initialize(vortex,ucontrol->value.enumerated.item[0]);
return 1;
}
static snd_kcontrol_new_t vortex_xtalk_kcontrol __devinitdata = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "3D XTALK",
.index = 0,
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
.private_value = 0,
.info = snd_vortex_xtalk_info,
.get = snd_vortex_xtalk_get,
.put = snd_vortex_xtalk_put
};


/* Control (un)registration. */
static int vortex_a3d_register_controls(vortex_t * vortex)
{
snd_kcontrol_t *kcontrol;
int err, i;
/* XTALK control */


if ((kcontrol = snd_ctl_new1(&vortex_xtalk_kcontrol, vortex)) == NULL)
return -ENOMEM;
kcontrol->info = snd_vortex_xtalk_info;
kcontrol->get = snd_vortex_xtalk_get;
kcontrol->put = snd_vortex_xtalk_put;
if ((err = snd_ctl_add(vortex->card, kcontrol)) < 0)
return err;

Anonymous
Fri 11 Jun 2004 03:23:30 AM UTC, comment #13: 

Wl:0xf710a104,0xffff         28104       

Wl:0xf710a100,0x41           28100   

Rl:0xf710a2b8,0xffff         282b8        

Wl:0xf710a2b8,0x46ac0040     282b8  
.
.
.
Rl:0xf710a24c,0xffff         2824c 
Wl:0xf710a24c,0x46ac206b     2824c
.
.
.

It seem that the upper 16 bits of route is related to WT and A3D

Rl:0xf710a1fc,0xffff         281fc  
Wl:0xf710a1fc,0x81cba696     281fc    
.
.
.
Rl:0xf710a258,0xffff         28258 
Wl:0xf710a258,0x81cba79b     28258  


Anonymous
Mon 07 Jun 2004 10:13:07 AM UTC, comment #12: 

CANNOT USE FOR Attenuation By Distance since MIX_DEFOGAIN 0x08  ( 6 dB )

Anonymous
Sun 06 Jun 2004 04:48:34 PM UTC, comment #11: 

Is it possible to pass stream in kcontrol->private_value ?



static int
snd_vortex_hwmix_info(snd_kcontrol_t kcontrol, snd_ctl_elem_info_t uinfo)
{
vortex_t * vortex = snd_kcontrol_chip(kcontrol);
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
if ( VORTEX_IS_QUAD(vortex) )
    uinfo->count = 4;
else
    uinfo->count = 2;
uinfo->value.integer.min = 0x0000;
uinfo->value.integer.max = 0x7fff;
return 0;
}

static int
snd_vortex_hwmix_get(snd_kcontrol_t kcontrol, snd_ctl_elem_value_t ucontrol)
{
int i,j,dma;
        int temp;
vortex_t *vortex;
stream_t *stream;
vortex = snd_kcontrol_chip(kcontrol);
dma=kcontrol->private_value;
        stream= &vortex->dma_adb[dma];

if ( VORTEX_IS_QUAD(vortex) )
    j = 4;
else
    j = 2;
for (i=0; i<j; i++) {
    temp=hwread(vortex->mmio,
   VORTEX_MIX_INVOL_B + (((MIX_PLAYB(i) << 5) + stream->mix[i]) << 2));
    ucontrol->value.integer.value[i]=temp;
};
return 0;
}

static int
snd_vortex_hwmix_put(snd_kcontrol_t kcontrol, snd_ctl_elem_value_t ucontrol)
{
vortex_t * vortex;
stream_t *stream;
int i,j,dma,temp;
vortex = snd_kcontrol_chip(kcontrol);
dma=kcontrol->private_value;
        stream= &vortex->dma_adb[dma];
if ( VORTEX_IS_QUAD(vortex) )
    j = 4;
else
    j = 2;
        for (i=0; i<j; i++) {
temp = ucontrol->value.integer.value[i];
vortex_mix_setinputvolumebyte(vortex, MIX_PLAYB(i), stream->mix[i], temp);
};
return 0;
}
static snd_kcontrol_new_t vortex_hwmix_kcontrol __devinitdata = {
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
        .name = "Vortex HWMIXING",
        .index = 0,
        .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
        .private_value = 0,
        .info = snd_vortex_hwmix_info,
        .get = snd_vortex_hwmix_get,
        .put = snd_vortex_hwmix_put
};
static int vortex_dynamic_hwmix_kcontrol(vortex_t * vortex,stream_t *stream,int en)
{
        snd_kcontrol_t *kcontrol;
int err;
        err=0;
    if ( en == 1 ) {
        if ((kcontrol = snd_ctl_new1(&vortex_hwmix_kcontrol, vortex)) == NULL)
                 return -ENOMEM;
                kcontrol->private_value =stream->dma;
sprintf(kcontrol->id.name,"Vortex HWMIX %.2d",stream->dma);
        kcontrol->info = snd_vortex_hwmix_info;
        kcontrol->put = snd_vortex_hwmix_put;
                kcontrol->get=snd_vortex_hwmix_get;
if ((err = snd_ctl_add(vortex->card, kcontrol)) < 0)
return err;
stream->hwmix=kcontrol;
}
else {
err=snd_ctl_remove(vortex->card,stream->hwmix);
};
return err;
}

Anonymous
Sun 06 Jun 2004 09:37:20 AM UTC, comment #10: 

vortex_adb_allocroute()

snd_ctl_new and snd_ctl_remove

a dynamic kcontrol for the playback stream which allow 3D library to change the volume of 2/4 channels from MIX_DEFIGAIN to Attenuation By Distance and panning

using
vortex_mix_setinputvolumebyte(vortex_t * vortex, unsigned char mix,int mixin, unsigned char vol)


Will need to store mix[4] in each stream.


/* Make playback routes. */
for (i = 0; i < nr_ch; i++) {
if (stream->type == VORTEX_PCM_ADB) {
.
.
. vortex_connection_mixin_mix(vortex, en, mix[i],MIX_PLAYB(i), 0);



if (stream->type != VORTEX_PCM_SPDIF && stream->type != VORTEX_PCM_A3D) {
ch_top = (VORTEX_IS_QUAD(vortex) ? 4 : 2);
for (i = nr_ch; i < ch_top; i++) {
vortex_connection_mixin_mix(vortex, en, mix[i % nr_ch],MIX_PLAYB(i), 0);

Anonymous
Sat 05 Jun 2004 12:50:10 PM UTC, comment #9: 

snd_pcm_info_get_id() return "AU88x0 ADB"

snd_ctl_card_info_get_name() return "au8830"

Is it possible for au88x0 driver to create a dynamic kcontrol to change the left/right volume (mix in) for a mono stream ?

Even au8820 can provide 2D effect using panning and hardware mixing.

Anonymous
Sat 05 Jun 2004 08:29:15 AM UTC, comment #8: 

Someone implemented a hardware accelerated version of OpenAL using alsa and emu1k01

http://www.lost.org.uk/openal.html

Anonymous
Wed 02 Jun 2004 07:52:29 AM UTC, comment #7: 

It seem that openal only provide a minimum support of 3D sound.

http://www.openal.org/oalspecs-annote/index.html

1) Directoinal sound source or unidirectional sound source
2) Attenuation By Distance
3) Doppler Effect

The real 3D sound is in iA-SIG I3DL2 extension

Anonymous
Wed 02 Jun 2004 07:17:35 AM UTC, comment #6: 

Are there any hardware registers to perform attenuation-by-distance of sound sources ?

ILD only take care of left and right differences.

Is the mixer in can be used for this puropose but how can it be related to the 3D stream ? ( Any one to one relationship between mixer in and those 16 3D blocks )

Anonymous
Fri 28 May 2004 08:39:23 AM UTC, comment #5: 

I wrote a program which use 4 different pthreads to play sound wav file at the same time when using snd_pcm_open(&handle,"hw:0,0",SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK). Any of these 4 mono/stereo wav files can be start/pause/resume/stop independently.

If I use "hw:0,2" instead of "hw:0,0", there will be no sound whenever one of the mono wav file stop. The other 3 threads are still reading files and call snd_pcm_write but there is no sound from the speaker.

Is this caused by adb routes cleanup or XTALK cancellation ?

Anonymous
Wed 26 May 2004 03:46:24 PM UTC, comment #4: 

The 3D controls can be created SNDRV_CTL_ELEM_IFACE_PCM and an unique name (instead of numid) with 1.0.5rc1

Is there any way to verify the hardware supporting functions are written correctly ?

(e.g. playing a generated mono sine wave to hw:0,2 , changing left/right ITD or left/right ILD, record the output of left/right channels, compare the output with the input graphically )

Anonymous
Wed 26 May 2004 08:18:39 AM UTC, comment #3: 

By changing each control with an unique name, iface to MIXER, the kcontrol seem to be created but the maximum value become -1.

Can those HRTF, ITD, ILD, FILTER functions be tested by aplay mono wave through hw:0,2 ( changing those parameters by alsamixer ) ?


Anonymous
Mon 17 May 2004 04:13:49 AM UTC, comment #2: 

A3D support doesn't work yet. The hardware supporting functions are written, and seem to work, but there is no library support yet (OpenAL or whatever).

Unfortunately, the OpenAL project is almost dead... there doesn't seem to be real interest from anyone to have real 3D audio on the PC. Very sad in my opinion.
I would gladly continue working on this, but i need urgently to finish my thesis and start earning money :(

Best Regards

Manuel Jander.

Anonymous
Mon 12 Apr 2004 05:29:01 AM UTC, comment #1: 

Can run altest and panning2d of openal demo

But fail to compile xldemo

>make

g++ -Wall -ansi -Wno-unused -Wno-long-long -Wno-deprecated -fPIC -DPIC -g -O2 -DLINUX -I/usr/local/include -I/usr/X11R6/include  -c ../common/audioenv.cpp -o ../common/audioenv.o
In file included from ../common/audioenv.h:10,
                 from ../common/audioenv.cpp:8:
../common/xlheader.h:48:23: strstream.h: No such file or directory
make: * [../common/audioenv.o] Error 1

Anonymous
Fri 09 Apr 2004 01:36:23 PM UTC, original submission:  

aplay -D hw:0,2 bee.wav

I can hear the bee, but it seem that snd_ctl_add() fail for HRTF with error -16.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-cf05.
Corresponding source code