mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-08 19:52:47 +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:
@@ -274,6 +274,8 @@ openal_renderer::~openal_renderer() {
|
||||
|
||||
if( m_alcEventCallbackSOFT != nullptr ) { m_alcEventCallbackSOFT( nullptr, nullptr ); } // stop callbacks before teardown
|
||||
|
||||
if( m_context != nullptr ) { m_fmradio.release(); } // the receiver owns implementation-side resources, which have to go before the context does
|
||||
|
||||
::alcMakeContextCurrent( nullptr );
|
||||
|
||||
if( m_context != nullptr ) { ::alcDestroyContext( m_context ); }
|
||||
@@ -487,6 +489,11 @@ openal_renderer::update( double const Deltatime ) {
|
||||
}
|
||||
}
|
||||
|
||||
// update streamed sound
|
||||
if( m_ready ) {
|
||||
m_fmradio.update( Deltatime, cached_camerapos );
|
||||
}
|
||||
|
||||
// reset potentially used volume change flag
|
||||
audio::event_volume_change = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user