A bunch of sound questions...

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
kazade
Insane DCEmu
Insane DCEmu
Posts: 145
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Tue May 02, 2017 3:11 pm
Has thanked: 3 times
Been thanked: 34 times

A bunch of sound questions...

Post by kazade »

I'm looking into implementing DC sound support in my game engine, and after digging around in the SDK docs I have a bunch of questions:

1. You can only create 4 streams (SND_STREAM_MAX), is that because you can only play 4 sounds simultaneously?
2. What's the advantage of using the sfx stuff over streams that makes up for the sound length limitations?
3. Is there any way to control per-channel volume? How can you simulate a sound moving left-to-right for example?

Thanks!
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5658
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: A bunch of sound questions...

Post by BlueCrab »

Answers, in order:

1. The limit of 4 is just a default -- it could be changed (at compile-time), keeping in mind that you'll be allocating more memory and other such things to do so. There's no way to change it at run-time at the moment, although such a thing could probably be done without too terribly much work, to be perfectly honest.
2. Simplicity for very small (in size) sound effects and the like. Basically, the whole sound file must fit in the sound ram (uncompressed, generally -- unless you use ADPCM), and thus it can be very simply played from that point. It's not meant for any sort of music or anything like that.
3. There's no code to do so at the moment, but it could be added relatively easily. Same for controlling panning between channels.
Post Reply