DIrectSound on top of openAL ?

Chris Robinson chris.kcat at gmail.com
Thu Oct 30 13:13:57 CDT 2008


On Thursday 30 October 2008 04:01:31 am Darragh Bailey wrote:
> On Thu, Oct 30, 2008 at 10:46:51AM +0000, Darragh Bailey wrote:
> > On Tue, Oct 28, 2008 at 02:16:12PM -0700, Chris Robinson wrote:
> > > The biggest problem is updating the sound buffer in real-time (DSound
> > > lets you lock a sound buffer and modify it while it's playing; OpenAL
> > > only lets you rebuffer the whole buffer, while it's not attached to any
> > > source). I get around this by spawning a real-time thread which queues
> > > small chunks "just in time" to keep the buffer playing, but this is a
> > > hack at best.. there's no way to know how much you need to buffer ahead
> > > so OpenAL doesn't run out during an update, some apps are more
> > > sensitive to a large write-ahead, and real-time threads aren't really
> > > available in Wine (meaning even larger sections would need to be queued
> > > to be able to update in time). The problem is compounded when you
> > > consider multiple DSound buffers can share the same data buffer.
>
> Couldn't tell if this is on the wish list, there appears to be some
> suggested enhancements for better buffer control, but I don't know
> enough to determine whether they actually match up.

I've been thinking about this, and have some ideas. There's actually a few 
extensions I'm trying to get through Creative.. two I'm waiting on a response 
from, and two more I want to propose that would help DSound compatibility 
greatly.

> > > Another problem is the lack of panning. OpenAL has no controls for
> > > panning a 2D sound. At most you can move the sound left and right to
> > > simulate panning (for mono sources; stereo is out of luck), but the
> > > actual algorithms are implementation dependant and thus would not
> > > produce consistant results.
>
> Requested:
> Item:2D panning/speaker level support
> Contributor: Creative
> Description:
> Approval Status: Approved

AFAIK, this is in EAX4. Though I can hope it means getting into the core API, 
I don't know.

> > > Additionally, OpenAL hides a lot of the hardware vs. software caps.
> > > OpenAL doesn't tell you if you're using hardware or software, while
> > > DSound would tell you. Of course you can always lie and say you have
> > > hardware (which I found was needed to get some games to even attempt to
> > > use DSound3D), but it's not entirely proper.
>
> Looks like this has been requested too:
> Item: Generic Effects
> Contributor: Creative
> Description: OpenAL could have a generic mechanism for enumerating and
> making use of the effects capabilities of the active audio device.
> Approval Status: Approved

I think this is talking about sound effects, like low/hi-pass filters, reverb, 
etc. This can be done through the EAX and EFX extensions. Nothing about 
saying what's in hardware and what's in software.

> > 1.0 was released 2000, 1.1 in 2005, so it's probably due a new release
> > in the next year/two, so it might be possible to add some feature
> > requests that would make implementing DirectSound on top of OpenAL
> > visible in the future.
>
> If all of the wish list gets added, it would appear the next
> specification of OpenAL would appear to me to go a long way to allowing
> wine to implement the Windows sound API's via that, rather than having
> to support various drivers.

I'm not sure what bearing the wish list has on the actual OpenAL API. I don't 
remember reading anywhere that anything approved will be put into the next 
core API revision. AFAIK, it could just mean they'll look into ways into 
adding it.. maybe via extensions.



More information about the wine-devel mailing list