Old, unnoticed bug in OSS output plugin.

Sean Meiners <[email protected]> Mon, 28 Mar 2005 11:27:37 -0800
Newsgroups gmane.comp.multimedia.xmms.devel
Organization Linspire, Inc.
Message-ID <[email protected]>
While using XMMS's OSS output plugin to help me test an OSS emulation library 
that uses bio2jack I found a sneaky little bug that managed to go unnoticed 
for quite some time.

In write_all in audio.c it goes into a loop until all data is written.  The 
problem is that while it reduces the number of bytes to write based on how 
many were written in the previous loop it forgets to advance the buffer, 
causing some very odd sound effects.  I suspect this has gone unnoticed 
because the OSS drivers themselves don't seem to do short-writes.  However, 
my emulation library did.  When I modified my code to prevent short-writes 
the problem went away.  It's not a high-priority issue since non-emulated OSS 
devices don't seem to exhibit this and emulated ones probably shouldn't do 
partial-frame writes, but it's a bug nonetheless and easy to fix at that.

PS: I tried filing a bug in the XMMS bugzilla system, but I'd rather not open 
a bugzilla account just for this, especially since I don't expect to be doing 
any future work on XMMS.  Oh, and I'm not subscribed to this list either, so 
keep that in mind if you reply and want me to see it.

-- 
Sean Meiners
[email protected]


Perl - $Just @when->$you ${thought} s/yn/tax/ &couldn\'t %get $worse;
--

This message contains information which may be confidential and privileged. Unless you are the 
addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone 
the message or any information contained in the message. If you have received the message in error, 
please advise the sender and delete the message.  Thank you.