Directsound status

New releases and general discussions.

Post » Sun Sep 21, 2008 3:15 pm

As has been mentioned on the forum before, it recently came up that Vista has disabled much of the Directsound implementation, which means the Directsound object in Construct currently may not work on Vista (I don't have Vista to check right now). It would be useful if someone could tell me what does and doesn't work in Directsound on Vista at the moment.

I'm planning a new audio plugin, using the newer XAudio2 API (which is still part of DirectX), which is supported by Vista (and for the forseeable future, hopefully!!). It's also a much more sophisticated API than Directsound, so I may be able to add better features anyway (arbitrary mixing, channel groups, optimised effects and filters, amplification, etc). I'll start work on it soon, but complete plugins take a bit of time to write, so it may be a while before it appears in a build anyway.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,574

Post » Sun Sep 21, 2008 3:44 pm

Is there a chance you can make it play mp3/ogg etc as sounds and not just music? (on different channels or whatever)
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Post » Sun Sep 21, 2008 10:48 pm

ashley, I have a secret shrine in my closet dedicated to you :lol:
B
2
S
1
G
4
Posts: 239
Reputation: 1,778

Post » Mon Sep 22, 2008 3:59 am

[quote="faggatron":9avk9bjd]Is there a chance you can make it play mp3/ogg etc as sounds and not just music? (on different channels or whatever)[/quote:9avk9bjd]
or even store .ogg files in the resource :o
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Mon Sep 22, 2008 8:47 am

[quote="Ashley":qroz15ll]It would be useful if someone could tell me what does and doesn't work in Directsound on Vista at the moment.[/quote:qroz15ll]I've got a vista box I where I can install Construct. What do you need -- should I just run through the actions on the D-S plugin and report back?
B
2
S
1
G
4
Posts: 60
Reputation: 1,320

Post » Mon Sep 22, 2008 10:05 am

Make sure you include what your sound chip/card is. There are a handful of them that work with DirectSound on Vista, in case you happen to have one.
B
2
S
2
G
5
Posts: 391
Reputation: 2,432

Post » Mon Sep 22, 2008 2:53 pm

Yeah, if you could run through just simply autoplaying a file, then try positional sounds, then maybe some effects or frequency changes and just see what works and doesnt (compare it to an XP box maybe).

XAudio2 also supports WMA and ADPCM as well as PCM WAV files so built in support is better than Directsound; I can add Directsound-style 'Play music' actions using Directshow as well to get MP3s going too.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,574

Post » Mon Sep 22, 2008 3:13 pm

Oh, also as soon as the XAudio plugin comes out the Directsound one will be deprecated and removed as soon as possible since it's no longer useful. So once it's out everyone should take steps to convert their Directsound games to XAudio - bear this in mind if you're going to start any significant projects with lots of Directsound code.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,574

Post » Mon Sep 22, 2008 8:47 pm

Yup, it's broken all right. A minimal example that works fine on XP SP2 (and starts playback within 2 seconds or so even when I throw a 50 MB .wav at it) fails pretty epically on Vista.

The XP machine: Desktop from 2003 or 04; XP SP2 as mentioned; Creative EMU 10K1 sound hardware (according to the XP hardware management interface).

The vista machine: Laptop from 2008, Vista home premium SP1. The sound chip identifies itself as a "conexant high definition smartaudio 221". The driver is the manufacturer's (not a generic Microsoft driver); I haven't knowingly updated it since buying this box.

My minimal .cap contains just the Directsound object and an event saying "Start of layout -> Directsound: autoplay file ..." (whether or not the file actually exists makes no obvious difference).

Under Vista, no runtime window appears at any point. The system hangs for about half a minute, and when I say "the system", it's pretty thorough -- the mouse pointer responds only intermittently, and the task manager window stops updating. This is followed by the crash dialog:

"Runtime error - X - An unexpected error occurred and the application was terminated. You may be able to find out more information about the crash by Debugging, and attempting to reproduce the bug."

Through the debugger it's pretty much the same: hangs half a minute as above, starts drawing the debugger window (incomplete; still no runtime window anywhere), hangs for another 20 seconds or so and exits to crash dialog:

"Runtime error - X - A crash inside the runtime has been intercepted! The crash may be a bug in Construct. Please report this to scirra."


Want this copied to a bug report over on Sourceforge?
B
2
S
1
G
4
Posts: 60
Reputation: 1,320

Post » Tue Sep 23, 2008 2:24 pm

Ouch. That's a pretty poor result. Thanks for doing the testing, that confirms it really is useless on Vista.

Don't worry about making a bug submission. It's a top priority of mine to have an XAudio2 plugin written ASAP.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,574

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest