16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 10:19:19 +02:00

Merge branch 'milek-dev' into gfx-work

This commit is contained in:
milek7
2019-03-23 12:40:46 +01:00
16 changed files with 511 additions and 193 deletions

View File

@@ -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 );
}