This topic is 2497 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I was banging my head for 3days trying to figure out why my D3D References weren't showing up in VS 2010 and found out that it's not compatible with .NET 4.0 so i'm having a go at SlimDX.

I'm looking for a SlimDX 3D audio tutorial that can do this:
http://content.gpwik...ET:DX9:3D_Sound
(3d listener location and sound emitter location)

I've been GooGle-ing but i'm only finding Graphic tutorials with SlimDX (but i know it has audio because i checked the docs)

Anybody have any SlimDX Audio tutoiral links available?

will take any .NET tutorials
(I use VB.NET and can read a good bit of VC.NET even though i can't write it yet. so any .NET tutorials for Slim)

##### Share on other sites
Doesn't slim just wrap the D3D COM objects? I think you could probably work out how to do most things with the ordinary non .NET tutorials, mapping them to the SlimDX interfaces in .NET.

##### Share on other sites
then let me correct myself - i can't find ANY sound tutorials for SDX.

and i'm not having much luck changing the above link (in first post) from MDX to SDX.

It's not a straight conversion from MDX to SDX.
Althought i can muttle through some of it, there are places that... i just don't get.

for example:
going from
 dim TheSound as DirectSound.SecondaryBuffer=new DirectSound.SecondaryBuffer("C:\mysound.wav", BufferDesc, DSDevice) 
to this:
 Dim TheSound As SlimDX.DirectSound.SecondarySoundBuffer = New SlimDX.DirectSound.SecondarySoundBuffer("C:\mysound.wav", BufferDesc, DSDevice) 

is fail for three reasons:
1 - there are only 2 variable fields for SlimDX.DirectSound.SecondarySoundBuffer
2 - none of those fields are the location of the sound to play.
3 - i don't even know if i'm defining it as the correct SDX object.

but if you have suggestions on how else to covercome this and other errors then i would greatly appreciate it.

The only three tutorials on their website (Basic Window, Device Creation, Simple Triangle) deal with graphics, not audio.
On other websites i'm just finding reposts of those same tutorials.

##### Share on other sites
Is there any particular reason you are using directsound directly, I am not really familiar with DirectX Audio but XAudio2 replaced DirectSound and to use the 3d functionality you use X3Daudio

http://msdn.microsof...8(v=vs.85).aspx

Of course this could be completely inaccurate since I am fairly new with SlimDX/DX, as for examples everything can easily be translated from DX to SlimDX and SlimDX supports both Xaudio2 and X3d, oh and the directx SDK has an example on how to integrate X3d with xaudio2, there is a sample too in the samples folder

edit: theres also examples of DirectSound in the SDK too but based on what I have read you may want to consider using Xaudio2 for the sake of things.

According to MS "For Windows game developers, XAudio2 is the long-awaited replacement for DirectSound. For Xbox 360 developers, it is an enhanced version of the previous XAudio API. It addresses several outstanding issues and feature requests."

##### Share on other sites
XAudio2 looks prety straight forward.
Thanks for the post, Dynamo, i think i'll switch and try that for a bit.
i already found more documentation for it.

Programming with DirectX : Sound in DirectX - XAudio2
http://programming4.us/multimedia/3830.aspx

##### Share on other sites
Note to self: before saying "OH! That looks good! I'll go try it!" first see if it's .NET compatible.

1. 1
2. 2
Rutin
19
3. 3
4. 4
khawk
15
5. 5
A4L
13

• 13
• 26
• 10
• 11
• 44
• ### Forum Statistics

• Total Topics
633743
• Total Posts
3013644
×