voice channel doesn't work with play or renpy.music.play

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

voice channel doesn't work with play or renpy.music.play

#1 Post by jack_norton »

Sorry about the posts but I'm adding some new stuff and have found some really strange behaviours. I have added a voice button in preferences. I use voices only in combat. If I try the "test voice" button in preferences, it works fine, I can hear the voice:

Code: Select all

            frame:
                style_group "pref"
                has vbox
                label _("Voice Volume")
                bar value Preference("voice volume")
                textbutton "Test" action Play("voice", "voice/rebecca_criticalhit01.ogg") style "soundtest_button"
however if I try calling the voice in the game script with:

Code: Select all

play voice "voice/rebecca_criticalhit01.ogg"
I hear nothing. Obviously if I use another channel like "sound" or "music" it works:

Code: Select all

play sound "voice/rebecca_criticalhit01.ogg"
what I'm doing wrong ??
follow me on Image Image Image
computer games

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: voice channel doesn't work with play or renpy.music.play

#2 Post by PyTom »

Voice isn't a traditional channel, like sound or music. It has some additional logic (so the voices end when the users click past them). Use "voice" rather than "play voice".
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: voice channel doesn't work with play or renpy.music.play

#3 Post by jack_norton »

ok thanks :)
follow me on Image Image Image
computer games

Post Reply

Who is online

Users browsing this forum: No registered users