build 180825. radio message playback enhancements and fixes

This commit is contained in:
tmj-fstate
2018-08-25 22:44:09 +02:00
parent 924e709284
commit 1df53cfc6c
4 changed files with 56 additions and 31 deletions

View File

@@ -338,8 +338,13 @@ sound_source::copy_sounds( sound_source const &Source ) {
m_sounds = Source.m_sounds;
m_soundchunks = Source.m_soundchunks;
m_soundchunksempty = Source.m_soundchunksempty;
// NOTE: should probably zero the .playing fields here as precaution
// TODO: add this if we ever start copying sounds from active sources
// reset source's playback counters
for( auto &sound : m_sounds ) {
sound.playing = 0;
}
for( auto &sound : m_soundchunks ) {
sound.first.playing = 0;
}
return *this;
}