DirectSound problems

I have installed the DirectX SDK. I found that the namespace Microsoft.DirectX.DirectSound isn't available. I assume that I need this namespace to use DirectSound in managed code.

How can I fix this


Answer this question

DirectSound problems

  • nathandyck

    First I installed the October 2005 DirectX SDK. After reading the forums, I installed the December 2005 DirectX SDK.

    After reading some more, I added a reference to a Microsoft.DirectX entry. I'm not sure which one I picked since their were many choices. I think I picked the most recent. After this, the namespace was there.

    I looked in the samples directory and found a capture sound example but it's in C# (I'm using C++). I tried one line of code to see if things worked. It didn't. I'm guessing I need something else added to the project but not sure what.

    As to your other questions, I'm not sure how to find that information.

    One question. Why didn't the installer add all of the needed things to the visual environment for me I'm not a microsoft programming guru so I don't know what needs to be done. It seems to me that the DirectX SDK needs more work.

    BTW, does anyone know of an ultra simple example using managed code that shows how to use DirectSound to capture audio

    Thanks,
    LGuy

  • Andy Eastwell

    I see it just fine. What SDK version are you using Are you using the MDX 1.1 or 2.0 libraries What does your list of references show when you try to add DirectSound Are any DirectX assemblies in the reference list at all

  • ASedorian

    I haven't gotten that far yet.

    I'm still looking for a ultra simple example on how to use DirectSound and your post is the first one that I've found.

    LGuy


  • Pr0fess0rX

    You shouldn't have references to Microsoft.DirectX.* libraries if you're using C++.

    Are you writing in C++/CLI or native C++ If native C++, you need to make sure your libraries are added (see my post in this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=124956&SiteID=1)



  • Wendy Tu

    Can you pls. tell me if you are using notifications for capturing the sound and if you do, post here or to my email the code thx
  • SPAWN_UK

    Sorry for not responding sooner. Other things came up.

    I'm use VS C++ EE and I want to use forms. I guess that means C++/CLR

    I checked the include files and library files as indicated in your other post. Both are set correctly.

    I looked at the entry for reference files and saw no mention of directX. I don't know if this is a problem.

    I tried code like the following:
    using namespace Microsoft::DirectX::DirectSound;
    ...
    Capture ^x = gcnew Capture();

    The compiler doesn't see Capture in the Microsoft::DirectX::DirectSound namespace and declares an error. I can work around this by:

    Microsoft::DirectX::DirectSound::Capture ^x = gcnew Microsoft::DirectX::DirectSound::Capture();

    This is ugly but it works.

    Thanks for your time,
    LGuy

  • DirectSound problems