Speakers do not stop music
SquidDev opened this issue ยท 0 comments
Originally reported by @Wojbie back in dan200/ComputerCraft#301, but I never got round to fixing:
Speaker Peripheral has 2 issues that i have found. Both are related to playing longer sounds.
-
When playing a long sound and breaking Speaker sound will keep playing. This is caused by song been played at position using /playsound command.
Expected behavior would be for sound to stop playing when Speaker is broken.
-
This also happens with Noisy pockets - sound plays in spot player was when pocket ran a command. This lets people to play long music disk sounds and leave area filling one spot with cacophony of music.
Expected behavior would be for sounds to follow player holding pocket and stop when pocket is turned off/dropped.
I would suggest rewrite of the speaker so that sound follows player and some way to stop sound that is playing (as suggested in dan200/ComputerCraft#251) to be added. This would allow for Speaker/Noisy pocket to stop playing sound as they are broken/leave player inventory.
This would sadly require moving away from simply playsound on server thread and into custom music playing setup with packets and stuff i believe.
The suggested fix is probably the right one, but also a right faff to implement. I've not looked into this for years, so will need to do so first.