Bronya-Rand/RenPy-Universal-Player

Player crash: Audio channel is unknown.

Cofffelo opened this issue · 1 comments

Basically, player would crash without registration of music channel.

Steps to reproduce the behavior:

  1. go to music room
  2. exit from it
  3. change your script
  4. reload
  5. go to music room
  6. see error

player should not give any error,
https://imgur.com/yqUrG6F.png
the topic is translated like: an exception occurred.

OS: Windows 10, PC.

Additional context
it fixable with

renpy.music.register_channel("music_room", mixer="sound", loop=None, stop_on_mute=True, tight=False, file_prefix='', file_suffix='', buffer_queue=True)

added to music_screen.rpy on a lines between init python and if renpy,variant (50-51 lines for me)
but if you do that, the volumt bar will not work due to mixer being not connected to it i conclude. and i do not know how to fix this one, i am a newbie ueu)b

so please you do! thanks!

Until then, you guys can put

renpy.music.register_channel("music_room", mixer="sound", loop=None, stop_on_mute=True, tight=False, file_prefix='', file_suffix='', buffer_queue=True)
_preferences.set_volume('sound', 0.15)

lines to music_screen.rpy where preference regulates the volume of the mixer by giving it 0.15 volume. That's everything I got.

I think to fix that completely, we need to:

  1. create new mixer
  2. connect mixer to the volume bar of music room
  3. change mixer="[name here]"

and we potentially done but idk how to do the new mixer creation and connection of the volume bar to it, i searched throughout the code and i think we need to create the line on our own, but i lack python knowledge so leaving this up to you all ueu)b

P.S: also you might get the bug when you reload the script with my lines in music room, and have music mixer not turned off which will lead us to an ability to listen to two songs at the same time!

exit-enter the room and you will be done, but this thing also needs to be fixed ueu)b

P.S.S: if you set the mixer to "music",
exit-enter the room,
turn on your song and then enter the game back, you will have your music room song in game. pretty funny feature ueu)b