Archived

This topic is now archived and is closed to further replies.

lxxxk

How to use sample classes in dx sdk???

Recommended Posts

I just wanna make my app play some different sounds simultaneous,so I thought I had to use DirectSound,and I''m very depressed when I find it''s very hard to load wave files until I find some classes in dx sdk library,they are CSoundManager and CSound.They really simplify these messed DirectSound functions but I don''t know how to use them.Library says these classes are implemented in (SDK root)\samples\C++\Common\Src\Dsutil.cpp and I find the header is Dsutil.h in the same directory,I include the header then compile my code,it appeared link errors,"error LNK2019",I add all *.lib in dx sdk into my project but it report error the same.It made me mad,who can help me.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You have to find dsutil.cpp and add it to your project as it contains the implementations of the classes (I suppose).

Share this post


Link to post
Share on other sites
You sound like you haven''t read anything from the SDK. I find the direct sound one of easier aspects of DX to work with by far. It sounds like the problem you are having isn''t related to the SDK. What I would do is open a project that already is using DirectSound in the SDK. Check the libs in the project and match the source and the headers they have.

If it compiles and run for the SDK project and you can''t get it too, its your fault.

Share this post


Link to post
Share on other sites
Thx very much,it''s working.But it is strange to include a .cpp in a file,we always include .h . Anyhow it works.

Share this post


Link to post
Share on other sites