Custom sounds?

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
kentaro-k.21
Artisan
Posts: 178
Joined: Wed Dec 17, 2003 1:39 am
Location: Osaka, Japan
Contact:

Post by kentaro-k.21 »

hi.
check next code in Win32_SoundMixer.cpp to fix the issue "crashes the game when quiting".

current code should be:

Code: Select all

~CntPtrTo() { if(m_pT) m_pT->Release(); }
please replace with following:

Code: Select all

~CntPtrTo() { if(m_pT) m_pT->Release(), m_pT = NULL; }
Paul, would you fix that in next CSBwin release?
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

@Gambit: thank you, that's great! It would help me a lot.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Paul, would you fix that in next CSBwin release?
Very strange. I spent about an hour this moring finding that
bug and I fixed it exactly the same way. Except that I put
the two statements in braces instead of using the comma.
But my time was not wasted......I had to read the DirectX book
first and I have learned enough to not be afraid of DirectSound.

Now I am working on another problem. Sounds sometimes
disappear. I would also like to get rid of the sound buffers
when they are complete rather than waiting for all 16 buffers
to be full and wrap around. There must be some way to ask
if a buffer is still active and, if not, set it to NULL. I would be
happy to poll them. I do NOT want to rearrange the message
pump to process sound 'Events'.
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

Hey there.. just popping in with some info. I was told by a little bird recently that this is not a solution to the issue. That same little bird asked why you were calling a destructor twice and then fixing it so that it could handle being called twice when destructors should never be called more than once?

After the blank stare left my face and my brain began to function again.. I figured I should post it here. Hope you can make more sense from this than I can

moo
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I was told by a little bird recently that this is not a solution to the issue.
Does the little bird have a better solution?

Hint: I call the destructor zero times. The system calls it once
when the object is destroyed (destructed).
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I put up a new 'feedingFilter.rar' and a CSBGraphics.exe.

It fixes a lot of things. Sounds no longer disappear (The original FTL
code had its own 'sorta' sound queue having something to do with more
than two sounds and which one was louder or closer or something. It
is gone now).

I forget what all needs fixing now so let me know again.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Needs fixing:
A command parameter or a command line in the config.txt to set the "Attempt using DirectX" option by default

The volume parameter. (the main volume from the menu works fine, though)

EDIT: not so fine in fact: &SOUND with the main volume set to anything else than Full gives noisy sounds, in particular with volume set to eighth. (using or not DirectX)
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

feedingfilter.rar has 9.8v36 which supports 'directx' parameter on command line.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

I just noticed that double shooters don't work anymore.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

double shooters don't work anymore.
Oh, Boy! Thank you very much. That got broken long ago.
And then further broken. First it forgot to launch the second
object. Left orphan. Then it launched it from the wrong place.
Left the object in the wall.

Fixed (with demo) in latest FeedingFilter.rar.
User avatar
Des
Um Master
Posts: 461
Joined: Wed Jun 11, 2003 11:58 pm
Location: Southampton, UK

Post by Des »

Another possible problemette - I'm currently running 9.8v19 and "save and quit" doesn't seem to work. Pretty small beer as you can "save and play" then close, but I guess you'd want to fix it before the next stable release.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I think I already fixed "Save and Quit". But I'll check again.
You are 20 mini-versions back.

Stable release. Wishful thinking with Zyx in the wheel-house and me
down here in the boiler room.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

It seems that the volume parameter has no effect
98v41 fixes that.

It also fixes several problems - mostly associated with object counts going
over the arbitrary limit of 8000. I got several different crashes playing conflux-II.
Now I have played it for an hour or so with no problems. That does not mean
there won't be problems but I got rid of some real bad ones and even some
that had not happened yet.

I also added warning if DSA operations exceed 50,000 in a second. Just one
warning and after that it keeps quiet. That is probably about 100 percent
CPU time on a slower Pentium. I do not want CSBwin to run sluggishly on a
166 MHz Pentium.

I tried "Save and Quit" and it worked great. Someone said id displayed
garbage. What's up?
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

I tried the sound and it works. Is there a difference between volume 0 and volume 1 in the &sound parameter?
With low volumes, even if it's better than before, the sound becomes too noisy. Fine to simulate radiophonic communications, but not so for the delicate sound of water dripping in the distance.
User avatar
Des
Um Master
Posts: 461
Joined: Wed Jun 11, 2003 11:58 pm
Location: Southampton, UK

Post by Des »

It sounds like 41 is a good one to download for the next test run of my custom dungeon. I'm after a reasonably stable release to ship with the beta edition. I did a complete run with 19 and it was problem free apart from save and quit. Not that I'm not into groovee new features - I hope to use some of these in an improved version of Angel's Egg and/or in a new, better dungeon (Angel's Egg is my first bash).
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

With low volumes, the sound becomes too noisy
I want to ask why you don't simply turn down the volume on your speaker
(or the sound card) rather than using the valuable bits in the program. But
I'm sure you have a good answer. So.......try 9.8v42.

Des: 9.8v41 is just fine. Always test with recording enabled so that
if something goes wrong you can replicate it and I can fix it. We are
pretty much striving for stability in the coming releases. I hope we don't
need any fancy new features.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Paul Stevens wrote:I hope we don't
need any fancy new features.
Not a single one.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Gambit37 wrote:I've got all the sounds in good quality with added echo -- I'll mail you a zip.
Up :)
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Done!
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

should I mention at this time that I did some recordings a while back to make new DM sounds based on what already existed.. sat in a sound room (geeze.. I think it was before DMJ was released) and just did things like worm attacks and mummies.. also sounds like dragons walking and scurry sound of little roots .. etc..

some of the sounds went into DMJ but not that many..
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

sounds interesting (pun intented, I'm afraid). Maybe I could integrate some of them?
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

I'll need to hunt them all down and then find a way to send them to you that would allow for it's large size.
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”