CBA_A3 icon indicating copy to clipboard operation
CBA_A3 copied to clipboard

CBA_fnc_isMusicPlaying Incorrect Returns

Open Ansible2 opened this issue 5 years ago • 0 comments

Mods:

  • Arma 3: 1.94 Stable
  • CBA: 3.12.2 Stable

Description: CBA_fnc_isMusicPlaying returns true perpetually (after music has ended) when the music was played with CBA_fnc_playMusic and will not return true when used with the command playMusic.

NOTE: This also affects CBA_fnc_playMusic's interrupt playing music capability.

Steps to reproduce:

  • Open editor in VR, place single player object, preview scenario in Singleplayer
  • Open menu, paste the following lines into the debug console and click LOCAL EXEC button
playmusic "eventTrack01_f_curator";

systemChat str (call cba_fnc_isMusicPlaying);

[
	{systemChat str (call cba_fnc_isMusicPlaying);},
	[],
	16
] call CBA_fnc_waitAndExecute;


[
	{

		["eventTrack01_f_curator",0,true] call CBA_fnc_playMusic;
		systemChat str (call cba_fnc_isMusicPlaying);
		[
			{systemChat str (call cba_fnc_isMusicPlaying);},
			[],
			16
		] call CBA_fnc_waitAndExecute;
	},
	[],
	18
] call CBA_fnc_waitAndExecute;
  • Click CONTINUE button, listen for music and observe initial systemChat
  • Wait 16 seconds, observe second systemChat
  • Wait 2 seconds, listen for music and observe systemChat
  • Wait 16 seconds for final systemChat

Expected behavior:

  • Music plays & first message displays true
  • Second message displays false
  • Music plays & third message displays true
  • Fourth message displays false

Where did the issue occur?

  • Dedicated / Singleplayer / Editor (Singleplayer)

Log Files: https://gist.github.com/Ansible2/ee0c44af9288745471f9fa058a7e99ff

Additional context:

  • Used track length is approximately 14 seconds
  • CBA_fnc_stopMusic will reset CBA_fnc_isMusicPlaying's state back to false

Ansible2 avatar Oct 13 '19 20:10 Ansible2