Whilst developing the start up sounds, I initially had it play every sound once it was loading them...
It ended up sounding like a kids orchestra!
There are no worries about multiple sounds at once.
But yeah, with regards to DOS, there will be a hard and fast limit.
Adding new sounds [coders needed]
Moderator: TTDPatch Moderators
*bump*
This matter is progressing very nicely. Last weekend, I had a sudden inspiration about how to do the DOS sound driver relatively easily, and today, it's finished and seems to be working well. The framework to include sound files in GRFs is already there thanks to patchman, so it will be possible to have new sounds in both the DOS and the Windows version in the next alpha. (The Windows version will need stevenh's new DLL to play them, though.)
The good things about the new DOS driver:
- Instead of using SOUND.COM, it's in TTDPatch code, running in 32-bit mode and going into 16-bit code only to invoke functions from SOUNDRV.COM. This should make it slightly faster. Also, you don't need to obtain extra files since the code is in TTDPATCH.EXE.
- Suppports everything the old code supported, that is, stereo and auto-init DMA mode
- Maybe you noticed a short clicking sound before playing the first effect after starting up TTD. That should be gone now.
- The ability to play custom sounds, not just those present in SAMPLE.CAT
The bad thing:
- It requires 1.6 megabytes more memory than the old code, because it loads SAMPLE.CAT above 1MB instead of caching samples from it below 1MB. The new sounds of GRFs will need to stay in memory as well, of course.
I've tried to do 16-bit mixing as well (this would make TTD sound better on the sound cards that support it), but DOSBox keeps freezing on it, and it doesn't make any sound at all on other emulations. I've given that part up, but anyone who has a real Sound Blaster 16 is free to experiment with it.
I'd like to ask patchman that he mentioned I could access DOS memory from TTDPatch code (I thought this is impossible, that's why I thought a new SOUND.COM is needed).
I know someone is trying to do running sounds, so stay tuned...
[edit]Removed limitation of 11KHz. Now mixing is done at 22KHz by default, and there's a bit to revert to 11KHz mixing for those who prefer the old behavior.
This matter is progressing very nicely. Last weekend, I had a sudden inspiration about how to do the DOS sound driver relatively easily, and today, it's finished and seems to be working well. The framework to include sound files in GRFs is already there thanks to patchman, so it will be possible to have new sounds in both the DOS and the Windows version in the next alpha. (The Windows version will need stevenh's new DLL to play them, though.)
The good things about the new DOS driver:
- Instead of using SOUND.COM, it's in TTDPatch code, running in 32-bit mode and going into 16-bit code only to invoke functions from SOUNDRV.COM. This should make it slightly faster. Also, you don't need to obtain extra files since the code is in TTDPATCH.EXE.
- Suppports everything the old code supported, that is, stereo and auto-init DMA mode
- Maybe you noticed a short clicking sound before playing the first effect after starting up TTD. That should be gone now.
- The ability to play custom sounds, not just those present in SAMPLE.CAT
The bad thing:
- It requires 1.6 megabytes more memory than the old code, because it loads SAMPLE.CAT above 1MB instead of caching samples from it below 1MB. The new sounds of GRFs will need to stay in memory as well, of course.
I've tried to do 16-bit mixing as well (this would make TTD sound better on the sound cards that support it), but DOSBox keeps freezing on it, and it doesn't make any sound at all on other emulations. I've given that part up, but anyone who has a real Sound Blaster 16 is free to experiment with it.
I'd like to ask patchman that he mentioned I could access DOS memory from TTDPatch code (I thought this is impossible, that's why I thought a new SOUND.COM is needed).
I know someone is trying to do running sounds, so stay tuned...
[edit]Removed limitation of 11KHz. Now mixing is done at 22KHz by default, and there's a bit to revert to 11KHz mixing for those who prefer the old behavior.
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
Who is online
Users browsing this forum: No registered users and 12 guests