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!
A bunch of sound questions...
-
- 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
- BlueCrab
- The Crabby Overlord
- Posts: 5666
- 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...
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.
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.