Archived

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

HanSoL0

Please respond only if you've DirectSound experience....

Recommended Posts

HanSoL0    1210
I''m still workin'' on my DirectSound engine, and I''m having all kinds of pointer array element access troubles. I was wondering how any of you have any tips from your own DirectSound experience, particularly dealing with muliple secondary sound buffers and 3D buffers. Thanks! ~Ryan

Share this post


Link to post
Share on other sites
HanSoL0    1210
Actually, I''m just kind of wondering GENERALLY how you''d design the sound system. Would you declare an array of LPDIRECTSOUND3DBUFFER''s or would you do it some other way? What''s the best method? I''m not really looking for answers to a specific problem, I''m just in a slight quandary about how to design my 3D sound effects engine. Thanks.



Ryan Buhr
Reactor Interactive, LLC.

Share this post


Link to post
Share on other sites
a person    118
why dont look at some other sound apis like fmod or bass? while you cant see the actual implementation you can get an idea of what sort of functions you may want to include.

Share this post


Link to post
Share on other sites
HanSoL0    1210
I''ve got a nearly complete game engine that includes Direct3D, DirectInput, and DirectPlay, so I would LIKE to use DirectSound because I already know generally how it works. I''m trying to create a DirectSound wrapper class and I''m just wondering how you would declare your secondary sound buffers. Would you create them in an array, or would you create them individually?

Ryan Buhr
Reactor Interactive, LLC.

Share this post


Link to post
Share on other sites
Jim Adams    440
The way I designed my sound engine was to create about 4-8 buffers. Load in each sound (or leave on disc for larger sounds), and when it''s time to play, find a buffer that is not playing already, or if all buffers are playing, stop one and use it. Load the sound data into that one buffer you picked and let it play. In that way, you save on buffer memory, and you can play a large amount of sounds with little consequences. You can also use the same technique with DirectMusic if you don''t want to mess with playback formats and streaming directly.

Jim Adams



Jim Adams
home.att.net/~rpgbook
Author, Programming Role-Playing Games with DirectX

Share this post


Link to post
Share on other sites
HanSoL0    1210
Thank you very much, Jim! That''s EXACTLY what I was lookin'' for! This is the reason I''m a HUGE fan of the line of books you wrote for. Thanks again!


Ryan Buhr
Reactor Interactive, LLC.

Share this post


Link to post
Share on other sites