soloud icon indicating copy to clipboard operation
soloud copied to clipboard

soloud.stop(bus_voice_handle) causes all buses to stop

Open VitorioK opened this issue 4 years ago • 1 comments

Expected behavior: soloud.stop(bus_voice_handle) - should to stop only one bus.

Actual behavior: All buses stop.

Steps to reproduce the problem:

	SoLoud::Soloud soloud;
	soloud.init();
	SoLoud::Bus bus1;
	SoLoud::Bus bus2;
	printf("1. Active voices: %d\n", soloud.getActiveVoiceCount());
	auto h1 = soloud.play(bus1);
	auto h2 = soloud.play(bus2);
	printf("2. Active voices: %d\n", soloud.getActiveVoiceCount());
	soloud.stop(h2); // Stop only bus2, but all buses stop
	printf("3. Active voices: %d\n", soloud.getActiveVoiceCount());

Output:

  1. Active voices: 0
  2. Active voices: 2
  3. Active voices: 0

SoLoud version: 20200207

Operating system: Windows 10 64-bit

Backend used, any other potentially useful information: WINMM or MINIAUDIO

VitorioK avatar Jun 27 '20 18:06 VitorioK

Can reproduce this on Linux (possibly Android too) with the latest git version - all buses stop when stop() is called for a specific bus, and every bus voice gets invalidated.

Anuken avatar Jan 05 '21 19:01 Anuken