CC: Tweaked

CC: Tweaked

57M Downloads

Peripheral Sound Problem. Please help.

MAGGen-hub opened this issue ยท 0 comments

commented

Dear developer of CC:Tweaked.

I get this problem while programming addon for your modification. My mod is very simple - advanced speaker peripherial with /stopsound comand support, 16 notes per tick and better volume control. I want to make it play paralel sounds:
Example: test.lua
peripherial.call("advanced_speaker_name","playSound","music_disc.pigstep")
peripherial.call("advanced_speaker_name","playSound","music_disc.11")
peripherial.call("advanced_speaker_name","playSound","music_disc.13")

My idea is: when you launch test.lua in shell all three sounds start playing imediatly (Need for custom instruments support from Note Block Studio that can be a little(or not little) biger than simple notes). But the main problem that SimpleChanel network can handle only one sound for one speaker at once. So what I need to do to make the count of paralel played sounds at least 8 (sorry for my weird looking english)? Possible Idea - create 8 different networks (NetworkHandler; NetworkHandler1; NetworkHandler2; ...) but I think it's not right... I know I can send all this sound to server.getPlayerList().broadcast( insert args here ) but how to move (their location in world) sounds launched from pocket computer to broadcast (I think method is exist but how to understand that THAT sound event launched from THIS poket comptuter and not from other sound source)? So please tell me what I can do or what I need to read to understand how your NetworkHandler works and understand how to improve it(any docs would be usefull).
"dan200.computercraft.shared.network.NetworkHandler". And I still can't understand

You created public static SimpleChannel network; for 1 sound event. How make it support 8 or 16 sound events? Is there em... any AdvancedChannel in forge mod loader?

Thank you for your attantion and sorry for my bad english again. I hope you can help me. I can send you my code if you ask but all sound in it send to broadcast so I am unable to connect sound to pocket computer (case only your network sound position can be updated)...

P.S. (I got an Idea: maybe i need to create special id for each sound like UUID:id (getSource() + " " + Soundid) but I don't think that should work...)