mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-20 12:39:17 +02:00
Merge branch 'milek-dev' into gfx-work
This commit is contained in:
@@ -861,6 +861,13 @@ sound_source::update_counter( sound_handle const Sound, int const Value ) {
|
||||
|
||||
// sound( Sound ).playing = std::max( 0, sound( Sound ).playing + Value );
|
||||
sound( Sound ).playing += Value;
|
||||
if( ( m_properties.gain > 0.f )
|
||||
&& ( sound( Sound ).playing == 1 ) ) {
|
||||
auto const &buffer { audio::renderer.buffer( sound( Sound ).buffer ) };
|
||||
if( false == buffer.caption.empty() ) {
|
||||
ui::Transcripts.Add( buffer.caption );
|
||||
}
|
||||
}
|
||||
assert( sound( Sound ).playing >= 0 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user