MCPcopy Create free account
hub / github.com/Panzerschrek/Chasm-Reverse / PlayHeadSound

Method PlayHeadSound

PanzerChasm/sound/sound_engine.cpp:298–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298void SoundEngine::PlayHeadSound( const unsigned int sound_number )
299{
300 if( sound_number >= sounds_.size() )
301 return;
302
303 Source* const source= GetFreeSource();
304 if( source == nullptr )
305 return;
306
307 if( sounds_[ sound_number ] == nullptr )
308 return;
309
310 source->is_free= false;
311 source->looped= false;
312 source->sound_id= sound_number;
313 source->pos_samples= 0u;
314 source->is_head_relative= true;
315 source->monster_id= 0u;
316}
317
318void SoundEngine::PlayOneTimeSound( const char* const sound_data_file )
319{

Callers 2

PlayMenuSoundMethod · 0.80
operator()Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected