mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 04:39:18 +02:00
tranmission sound changes
sound changes sound changes
This commit is contained in:
44
DynObj.cpp
44
DynObj.cpp
@@ -3690,15 +3690,11 @@ void TDynamicObject::RenderSounds()
|
|||||||
rsWentylator->stop();
|
rsWentylator->stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (MoverParameters->TrainType == dt_ET40 && rsPrzekladnia)
|
if (rsPrzekladnia)
|
||||||
{
|
{
|
||||||
if (MoverParameters->Vel > 0.1)
|
if (MoverParameters->Vel > 0.1)
|
||||||
{
|
rsPrzekladnia->pitch(MoverParameters->Vel).gain(MoverParameters->Vel)
|
||||||
freq = MoverParameters->Vel;
|
.position(GetPosition()).play();
|
||||||
rsPrzekladnia->pitch(freq);
|
|
||||||
vol = MoverParameters->Vel;
|
|
||||||
rsPrzekladnia->loop().position(GetPosition()).gain(vol).play();
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
rsPrzekladnia->stop();
|
rsPrzekladnia->stop();
|
||||||
}
|
}
|
||||||
@@ -4713,22 +4709,32 @@ void TDynamicObject::LoadMMediaFile(std::string BaseDir, std::string TypeName,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if( ( token == "transmission:" )
|
else if(token == "transmission:") {
|
||||||
&& ( MoverParameters->EngineType == ElectricSeriesMotor ) ) {
|
|
||||||
// plik z dzwiekiem, mnozniki i ofsety amp. i czest.
|
// plik z dzwiekiem, mnozniki i ofsety amp. i czest.
|
||||||
double attenuation;
|
std::string name;
|
||||||
parser.getTokens( 2, false );
|
float attenuation, gain_mul = 0.029f, gain_off = 0.1f, pitch_mul = 0.005f, pitch_off = 1.0f;
|
||||||
parser
|
parser.getTokens(1, false);
|
||||||
>> token
|
if (parser.peek() != "{")
|
||||||
>> attenuation;
|
{
|
||||||
rsPrzekladnia = sound_man->create_sound(token);
|
parser >> name;
|
||||||
|
parser.getTokens();
|
||||||
|
parser >> attenuation;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cParser extp(parser.getToken<std::string>(false, "}"));
|
||||||
|
extp.getTokens(6, false);
|
||||||
|
extp >> name >> attenuation >> gain_mul >> gain_off >> pitch_mul >> pitch_off;
|
||||||
|
}
|
||||||
|
|
||||||
|
rsPrzekladnia = sound_man->create_sound(name);
|
||||||
if (rsPrzekladnia)
|
if (rsPrzekladnia)
|
||||||
{
|
{
|
||||||
rsPrzekladnia->dist(attenuation);
|
rsPrzekladnia->dist(attenuation);
|
||||||
rsPrzekladnia->gain_mul = 0.029;
|
rsPrzekladnia->gain_mul = gain_mul;
|
||||||
rsPrzekladnia->gain_off = 0.1;
|
rsPrzekladnia->gain_off = gain_off;
|
||||||
rsPrzekladnia->pitch_mul = 0.005;
|
rsPrzekladnia->pitch_mul = pitch_mul;
|
||||||
rsPrzekladnia->pitch_off = 1.0;
|
rsPrzekladnia->pitch_off = pitch_off;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user