Page 1 of 1

Adding ambient soundstreams

Posted: Sun Jul 26, 2009 6:24 pm
by ThePanda
I'm trying to add kamino's ambient rain sound to my map. So I've used a few stock levels for ideas on how to get soundstreams to work, and I've found out that you need a SoundStream region with the parameters of your sound in order for the stream to come through, as well as adding your stream file through your lua, and also munging your sounds. However, no matter what I've tried, I can't get the ambient rain sound (kam_amb_rain) to work. I've managed to add the thunderclaps to my map, which work perfectly, but streams are being stubborn.

cl0.req:
Hidden/Spoiler:
ucft
{
REQN
{
"str"
"align=2048"
"cl0" <-- I've added the name of my .stm file that contains the paths to the kamino rain sound
"cw_vo"
"cw_tac_vo"

}
REQN
{
"lvl"
"cl0cw"
}
}
cl0.stm:
Hidden/Spoiler:
..\kam\streams\amb_kaminoInterior_PL2.wav kam_amb_rain_interior -resample ps2 32000 <-- since these sounds don't originate from my world folder, I've directed them to the kamino folder
..\kam\streams\amb_kaminoRainstorm_PL2.wav kam_amb_rain -resample ps2 32000
cl0.snd:
Hidden/Spoiler:
// Start Ambient Streams ------------------------

SoundStreamProperties()
{
Name("kam_amb_rain");
Group("ambientenv");
Inherit("ambientfx_template");
#ifplatform pc
Gain(0.8);
#endifplatform pc
#ifplatform xbox
Gain(0.9);
#endifplatform xbox
#ifplatform ps2
Gain(1.0);
#endifplatform ps2
Stream("cl0");
SegmentList()
{
Segment("kam_amb_rain", 1.0);
}
}
// End Ambient Streams --------------------------------

// Start Rain and Thunder ----------------------------

SoundProperties()
{
Name("kam_amb_thunder")
Pitch(1.0);
PitchDev(0.15);
#ifplatform pc
Gain(1.0);
#endifplatform pc
#ifplatform xbox ps2
Gain(0.6);
#endifplatform xbox ps2
GainDev(0.2);
ReverbGain(1.0);
Bus("ambience");
Pan(0.0);
Mode3D(1);
Bias(0.0001);
Priority(0.5);
PlayInterval(3.0);
MinDistance(50);
MuteDistance(500);
MaxDistance(500);
SampleList()
{
Sample("emt_thunder_clap_01", 0.33);
Sample("emt_thunder_clap_02", 0.33);
Sample("emt_thunder_clap_03", 0.33);
}
}

SoundProperties()
{
Name("kam_amb_thundersub")
Pitch(1.0);
PitchDev(0.15);
#ifplatform pc
Gain(1.0);
#endifplatform pc
#ifplatform xbox
Gain(0.6);
#endifplatform xbox
GainDev(0.1);
ReverbGain(1.0);
Bus("ambience");
Looping(0);
Pan(0.0);
Mode3D(1);
Bias(0.0001);
Priority(0.5);
PlayInterval(0.5);
MinDistance(50);
MuteDistance(500);
MaxDistance(500);
SampleList()
{
Sample("emt_thunder_roll_01", 0.33);
Sample("emt_thunder_roll_02", 0.33);
Sample("emt_thunder_roll_03", 0.33);
}
}
// End Rain and Thunder ----------------------------------

// Start Ambient Effects ----------------------------------

SoundProperties()
{
Name("gutter_rain");
Group("ambientenv");
Inherit("ambientemt_static_template");
Gain(0.8);
Looping(1);
SampleList()
{
Sample("emt_kamRainGutter_01", 1.0);
Sample("emt_kamRainGutter_02", 1.0);
}
}
In my lua, I've added the line "ReadDataFile("dc:sound\\cl0.lvl;cl0cw")" this contains the thunderclap sound.
I've also added the line "OpenAudioStream("dc:sound\\cl0.lvl", "cl0")"

I don't think I'm missing anything, but this problem is quite annoying. Can anyone help me out?

EDIT: Nevermind, I've found a decent workaround by using static emitters and a different sound file.