17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-31 02:00:28 +01:00

Broadcast radio receiver in the cab

Plays internet radio streams (http, mp3) through a positional emitter in the cab, with analog tuning, inter-station noise and two speaker profiles. Stations are listed in fmradio.txt, cab controls are defined with fmradio entries in the .mmd file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
IwanXXI
2026-10-10 21:22:39 +02:00
committed by Jano211
parent c7f9796387
commit b4b1e6c32f
17 changed files with 7509 additions and 0 deletions

View File

@@ -193,6 +193,24 @@ bool global_settings::ConfigParseAudio(cParser& Parser, const std::string& token
return true;
}
if (token == "fmradio.enabled")
{
ParseOne(Parser, fmradio_enabled);
return true;
}
if (token == "fmradio.cleansound")
{
ParseOne(Parser, fmradio_cleansound);
return true;
}
if (token == "fmradio.stations")
{
fmradio_stations = Parser.getToken<std::string>(false);
return true;
}
if (token == "sound.volume.vehicle")
{
ParseOneClamped(Parser, VehicleVolume, 0.f, 1.f);
@@ -1555,6 +1573,9 @@ global_settings::export_as_text( std::ostream &Output ) const {
export_as_text( Output, "sound.volume.positional", EnvironmentPositionalVolume );
export_as_text( Output, "sound.volume.ambient", EnvironmentAmbientVolume );
export_as_text( Output, "sound.asyncload", AudioAsyncLoad );
export_as_text( Output, "fmradio.enabled", fmradio_enabled );
export_as_text( Output, "fmradio.cleansound", fmradio_cleansound );
export_as_text( Output, "fmradio.stations", fmradio_stations );
export_as_text( Output, "physicslog", WriteLogFlag );
export_as_text( Output, "fullphysics", FullPhysics );
export_as_text( Output, "debuglog", iWriteLogEnabled );