MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / zMusicUnpause

Function zMusicUnpause

src/SB/Game/zMusic.cpp:442–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440}
441
442void zMusicUnpause(S32 kill)
443{
444 if (sMusicPaused == 0)
445 {
446 return;
447 }
448
449 for (S32 i = 0; i < 2; i++)
450 {
451 zMusicTrackInfo* track = &sMusicTrack[i];
452 if (track->snd_id == 0)
453 {
454 continue;
455 }
456
457 if (kill != 0)
458 {
459 track->snd_id = 0;
460 }
461 else
462 {
463 S32 flags = i * 0x800;
464 flags |= ((track->loop != 0) ? 0x8000 : 0) | 0x10000;
465 flags |= 0x20000;
466 track->snd_id =
467 xSndPlay(track->assetID, track->lastVol, 0.0f, 0xff, flags, 0, SND_CAT_MUSIC, 0.0f);
468 }
469 }
470
471 sMusicPaused = 0;
472}
473
474// This version of it matches 33%. It's also functionally incorrect.
475void zMusicSetVolume(float vol, float delay)

Callers 1

zCutsceneMgrUpdateFunction · 0.70

Calls 1

xSndPlayFunction · 0.50

Tested by

no test coverage detected