[MPlayer-dev-eng] First shot at surround on multiple soundcards

obsidian at obsidian.de obsidian at obsidian.de
Thu Nov 21 14:12:18 CET 2002


Hi all,

I made a first (bad) shot at playing >2 sound streams using different 
sound cards. It took me a while to get it to play at all, till I found out 
that I need to respect to smaller frag size of the ISA card. Yes, it even 
runs with an ISA card ;)

It seems that it runs in sync. When I play the same data on both channels, 
it runs. But my C is too bad, so I cannot separate the streams when I 
request more than 2. Here is my (horrible) hack to try this:

    tempbuf = data;

    for (temp=0; temp<len/4; temp++)   
    {
      sndbuf1[temp*2]=tempbuf[temp*4];
      sndbuf1[temp*2+1]=tempbuf[temp*4+1];
      sndbuf2[temp*2]=tempbuf[temp*4+2];  
      sndbuf2[temp*2+1]=tempbuf[temp*4+3];
    }

All I get is static on the secondary card and the sound of the movie on 
the first card, but with clicking and real slow. If anybody could help me 
with separating the streams into two stereo streams they're welcome.

I wasn't able to put a new driver in libao2 so I just hacked ao_oss.c. I 
put the file on www.innnet.de/~kread/ao_oss.c. At the moment it just 
segfaults for me cause the tempbuf access you see above goes beyond the 
range of the data struct (tempbuf is just a uint16 ptr to data).

Ok, I'm off to bed, its way after 4:00 am %)

Cheers,

Kevin





More information about the MPlayer-dev-eng mailing list