[MPlayer-cygwin] questions about ao_dsound

Florian Dietrich flodt8 at yahoo.de
Sun Oct 10 17:15:24 CEST 2004


Hey guys!

Great to see that mplayer now has DirectSound output! Good work!
I was actually the one who wanted to implemented this earlier this
year, and i already had a lot of work done, but unfortunately it all
got lost during a hard drive crash.

Now I finally had the time to work on it again, but just when I had
it all done and wanted to check in a working version I saw that there
already was one :-)

However, there are a few questions about DSound in general and about
the current implementation:

* First a little bug report: In ao_dsound and in ao_win32, you fill
wformat.Format.cbSize with sizeof(WAVEFORMATEXTENSIBLE). But cbSize
is only supposed to be the size of the additional members, so it
should be sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX).

* As you had realized, the channel order in AC3 is different from the
channel order Microsoft uses. Now, the channel order MIGHT again be
different on different audio formats. So how exactly are we supposed
to know how to re-order the channels correctly? We could always do it
the way it would work for AC3, but like I said, it might not work
formats that order them differently then.

* Is there a reason for all the 'trouble' with hdsound.dll? Why not
simply add -ldsound during linking? This worked just fine for me, and
imho having to play around with DLLs is unnecessary.

* Why not calculate the buffer size more precisely? We have all the
info we need to calculate how many bytes we play in a second, so why
not pick a size corresponding to a certain amount of seconds?

* I think there *might* be a bug, which is only masked by the current
buffer size and the "Restore" stuff after the lock. At least my code
used to look very similar before, and I experienced similar problems
until I figured out why. I might as well be wrong though.

If you want, I can send my code to the list, it is not very different
from the current implementation. Maybe a little less cluttered,
that's all. Or i could somehow merge the two (I don't output
cleartext errors in my version) and send a patch.

Florian


	

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




More information about the MPlayer-cygwin mailing list