[MPlayer-cygwin] questions about ao_dsound

Florian Dietrich flodt8 at yahoo.de
Tue Oct 12 16:41:26 CEST 2004


Hi,

 --- Sascha Sommer <saschasommer at freenet.de> wrote: 
 
> Don't see the sence behind this and write_buffer already is
> basically play without the flags and the rounding down to
> ao_data.outburst*n.

Hmm, alright, then I'll simply leave it like that. I just thought it
would be unnecessary to have an extra function for this with almost
the same parameters, but I guess it might just be a matter of taste.

> Hm, I can't see the difference. Afaik we already stream from a
> secondary sound buffer, no?

Oh, right, now I see it. It's not the secondary buffer that's
missing, it's the primary buffer that's missing! This makes it even
more confusing that the code actually works correctly :-)

The background is, that you actually need to set the output format
with a primary buffer, then you put the stream into a secondary
buffer and play it. If the format of the secondary (stream-)buffer is
the same as the output format, things are fast because no conversions
need to be done, and I think you even write directly to the fastest
buffers (hardware if possible) when writing to the secondary buffer.
Otherwise, what you write to the secondary buffer will be up- or
downmixed to the output format by DirectSound automatically.
Now if we don't create a primary buffer to set the output format, the
output format could be anything. Probably something random. So, for
example, if it is set to a 2-channel format and we want to play
6-channel sound, DirectSound thinks it is supposed to downmix the 6
channels to two channels.

I'll send a fix for this along with my other changes later. Hope I
will be done later today, but be patient, because I might as well
need a little more time (depending on how quickly I get some real
world stuff done). 

Florian


	
		
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de




More information about the MPlayer-cygwin mailing list