Archived

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

Verso

directSound... arrrggggggggggggg!!!

Recommended Posts

OK, I''m a relatively new programmer, right? So I managed to hack my way through basic win32 stuff, stumbled through basic directDraw (understanding about 60%), and then I tripped up on on directSound, and am still lying on my face. I mean, it is a BEAST! I was looking through the samples that come with VC++, and saw this nice, simple, little program that merely pops up a dialogue window on the screen, loads a sound, and plays it. So I thought, "Why this is a nice, simple, little program!" "I think I''ll just take a peek at the source and see if maybe I can put sound into one of MY programs!" So that''s what I did... and under the hood were six .cpp/.h files, coming out to several hundred lines of garbled code about RIFFs and WAVEEX''s or something like that. To make matters worse, I can''t find ANY good tutorials o the web! All of them that I''ve found are copy_and_pastes from VC documentation, which MS wrote in such a way as to remain the #1 software company. (And on a side note, why does a directX program consist of 66% error catching? I don''t remember that with OpenGL!) Don''t get me wrong, I don''t dislike MS, but THIS is INSANE!!! OK, now that I''m am done whining, the questions... Are there any DSound wrapper classes for free? and Are there ANY good tutorials out there???

Share this post


Link to post
Share on other sites
If you don''t mind some friendly advice, go back and sit with directdraw until you''re fairly comfortable with it; directsound will naturally seem incomprehensible if you''re not totally familiar with DD because its a step up in complexity (sorry, that wasn''t really helpful). At any rate, the tutorial for playing a sound that is included with the
DX7 SDK (I assume you''re using that because you''re also using dd) seems fairly complete to me. If it doesn''t make sense to you, investing in LaMothe''s Tricks of the Windows Game Programming Gurus might be a good investment (yes I know it''s expensive, but if you''re looking for a little hand holding now and then (and who doesn''t?) it''s probably a good buy).

Share this post


Link to post
Share on other sites
DirectSound stinks...As far as I remember it contains no function for loading Wav-files which forces you to use the messy WIN32 way of doing it...Lots of annoying structures.......

Share this post


Link to post
Share on other sites
Yes yes, I know I should probably build the foundation before I work on the roof. I''m the kind of person who likes to dive in, make it go, and figure it out later (it really does waste time, going about with that attitude).

Personal preferances aside, however, the real reason I want sound is so I can finish this little space shoot''em-up game. I was hoping for a quick fix. But, if that''s not gonna work... patience.... patience. Still do let me know if there are any good tutorials however! Books really do seem to be the way to go - on the web I spend 80% of my time looking, and the rest learning.

Share this post


Link to post
Share on other sites
Dude, I am about to become you best friend.

Check out FMOD. It''s a commercial sound engine that ROCKS!
It is SUPER easy to get into. It''s free to use if your programs are free and it is only $200 per shareware game (not bad if you ask me.)

It''s a little expensive if you want the "unlimited" license but I think most of use here will release our games as freebies or shareware anyway.

FMOD

-Coleco

~ c o l ec o ~



Rock the cradle of love!
You stupid WANKER!
S i g n a l D E V .com

--HASBRO SUCKS--

Share this post


Link to post
Share on other sites
FMOD is EXACTLY the quick fix I was looking for!!! I hope to have my little game finished soon now. Thank you thank you thank you! Of course, I have no intention of dropping the ball with DSound, so still feel free to point out a good tutorial or two.

You can find the game, BTW, at http://www.resonantstudios.com/downloads.shtml . Please tell me if it does NOT work on your computer.

Thank You!

Share this post


Link to post
Share on other sites
Well done on your space invaders game ...

But maybe you should hide your cursor.
You can do this with the folowing call :

// hide the mouse
ShowCursor(FALSE);


Greetz,
Konradt

Share this post


Link to post
Share on other sites
Hey, that game is pretty cool...and ultra-smooth.

Just for fun, I tripled the size of the sprites and the engine didn''t even flench...


Win2000
320 MB Ram
Creative Labs GeForce 256 32mb
Creative Labs SoundBlaster Live 5.1
P3-450

-Coleco

~ c o l ec o ~



Rock the cradle of love!
You stupid WANKER!
S i g n a l D E V .com

--HASBRO SUCKS--

Share this post


Link to post
Share on other sites
Just thought i would add my experiences with direct sound here:
Firstly, the best tutorials i have found for direct sound are in the SDK, this was back in DX7, before it all changed, but if you find DX8 hard maybe its worth using Dx7 for the first game...
Secondly, its true that MS dont provide a WAV loader, which forces you to learn all about RIFF chunks etc, but no knowledge is wasted. I recently had to code a high-performance low level file loader that uses Miles sound system, and the knowledge i gained doing my own WAV loader years ago was invaluble.
Above all be patient, the more you learn about DirectSound the btter, your games will be faster and your sound system more flexible.

http://www.positech.co.uk

Share this post


Link to post
Share on other sites