Skip to content

Commit

Permalink
Fix sound handling when interrupted by game launch
Browse files Browse the repository at this point in the history
- The front end was not properly tracking the play state of sounds
  being run from a layout script if those sounds were interrupted
  by launching a game. This should be fixed now.
  • Loading branch information
mickelson committed Jul 29, 2018
1 parent 0654a59 commit bd6b44f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = tab
indent_size = 3
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
8 changes: 4 additions & 4 deletions src/fe_sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ void FeSoundSystem::update_volumes()

void FeSoundSystem::release_audio( bool state )
{
// because SoundSystem::stop doesn't actually stop m_sound....
if ( state )
m_sound.set_playing( false );

m_music.release_audio( state );
m_sound.release_audio( state );
}
Expand All @@ -130,6 +126,10 @@ FeSound::~FeSound()

void FeSound::release_audio( bool state )
{
// fix our state if sound is being stopped...
if ( state )
set_playing( false );

#ifndef NO_MOVIE
m_sound.release_audio( state );
#endif
Expand Down

0 comments on commit bd6b44f

Please sign in to comment.