XNA Creators Club Online
Page 1 of 1 (5 items)
Sort Posts: Previous Next

Direct Sound 9 v XACT

Last post 04-03-2008 6:02 PM by Benn. 4 replies.
  • 04-03-2008 9:59 AM

    Direct Sound 9 v XACT

    Hi everyone

    I am wanting to add some in game music to my 'almost complete' demo and was wondering the best way to go about it. I started creating it a few years ago using DX9 and it uses DirectSound/Show for the wav files which are used for the sound effects. When I try to play a WAV file however, nothing happens. It initialises fine , but no sound. Nothing.

    My question is this: does anyone know what could be the problem I am having and secondly, if I implement XACT into the game, bearing in mind it has element of DirectSound, would using the two features cause a problem?

    Cheers

  • 04-03-2008 12:08 PM In reply to

    Re: Direct Sound 9 v XACT

    How big is the DirectSound buffer you try to create with the WAV? I would suggest not creating a buffer bigger than 1 MB, which means you'll have to stream the wave in the background from disk, using double buffering.
    Another option is to use the Windows Media Player API and play a WMA file, or using DirectShow as a lower-level way of doing the same thing.
    Finally, I believe using XACT in parallel with DirectSound will work fine.

    Jon Watte, Direct3D MVP kW X-port 3ds Max .X exporter kW Animation source code
  • 04-03-2008 12:40 PM In reply to

    Re: Direct Sound 9 v XACT

    I am not sure how big the buffer is as I am at work but I will check this when I get home. The programme is actually a port from an OpenGL game I made and I have recreated it using DirectX. It previously worked with the Direct Sound element but now that it is part of the Platform SDK it doesnt work, odd that it doesnt throw an error too.

    I have been looking at the XACT tutorials on MSDN, which seem quite simple but I am using Visual C++ and they use XNA Studio, would this matter or should I be able to follow the tutorial in VC++ too?

    Thanks again

  • 04-03-2008 3:53 PM In reply to

    Re: Direct Sound 9 v XACT

    Any XACT tutorial using XNA Game Studio will be diffierent than the equivalent C++ version, as XNA Game Studio is a wrapper around XACT.  You'll be better off finding C++ tutorials.  Unless you're using XNA Game Studio through C++/CLI, then you can use the XNA Game Studio tutorials easily.

    Also, since when has there been a DirectSound 9?
    Microsoft DirectX/XNA MVP
  • 04-03-2008 6:02 PM In reply to

    Re: Direct Sound 9 v XACT

    Good point :) I meant I am using the DX9 sound elements - DirectSound and DirectShow. Incidently, I managed to fix the sound bug by recoding my show elements using MSDN.

    http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c_Summer
    _03/directX/htm/gettingstarted.asp

    I may give XACT a go on my next project but in the mean time, if its not broken...

Page 1 of 1 (5 items) Previous Next