Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Problem with DirectSound output (Read 4791 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Problem with DirectSound output

It looks like foobar2000 DirectSound output has some problems. While resolving problems with Wine, it came out that foobar never set the primary buffer format and it causes problems in some cases.
Please take a look this Wine bug report.


Problem with DirectSound output

Reply #2
Please point me MSDN article that says that setting primary buffer format is mandatory. So far, all info I could find points towards the opposite; in fact, setting primary buffer format has no effect on WDM.
Microsoft Windows: We can't script here, this is bat country.

Problem with DirectSound output

Reply #3
On page 211 of "Inside DirectX":

"By default, the primary buffer has a frequency of 22,050 Hz, 2 channels, and 8 bits per sample.  All sounds being mixed into the primary buffer, reguardless of their format, are converted to this format before being played.  Of course, this format might not be what you want, especially if you want your application to benifit from a higher sample rate or 16-bit sound.  In that case, you can change it.  You might also want to make sure the format of the primary buffer matches the format of the secondary buffers, in order to improve performance; obviously DirectSound will stream the data into the primary buffer more quickly if it doesn't have to convert it."

What you are saying that the primary buffer doesn't matter is true for WDM based systems but it is not true for VXD based Win9X systems.  You claim to support Win9X so you should be setting the primary buffer format even though it will be a noop for most people.  Setting it for modern systems is harmless but not setting it for older systems is a bug.

You will need to find 1998 era copy of MSDN to find an explination of this.  I doubt it will be in the current MSDN because Microsoft is not very conserned with supporting Win9X anymore.

Problem with DirectSound output

Reply #4
Quote
You claim to support Win9X...[a href="index.php?act=findpost&pid=334609"][{POST_SNAPBACK}][/a]
Not anymore (as for 0.9). Last version that did support Win9x (0.8.3) also defaulted to waveOut on those systems.
Microsoft Windows: We can't script here, this is bat country.

Problem with DirectSound output

Reply #5
So how is it, could it be changed/fixed?

Problem with DirectSound output

Reply #6
Please Peter. Would it be too much to ask you for 'fixing' the issue or does it couse other problems then?

Problem with DirectSound output

Reply #7
Will there be any more discussion of this? foobar works on wine, but this issue spoils directsound support. If the change is trivial why not make it? foobar 0.9 beta *only* uses dsound output, so on wine it will be useless for high quality audio.

PS: the installer OS version check for 0.9 beta locks out wine even when wine tries to pretend it is windows 2000. Anyone know why? ...life is becomming rather difficult for foobar users running linux...