renpy.sound.play() doesn't work on 7.3.2
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
renpy.sound.play() doesn't work on 7.3.2
When I try to use renpy.sound.play() in a program, the sound doesn't play at all. The last release I know of where it does work is 7.2.2, so I use that instead.
To be specific, renpy.sound.play() fails when I use the <from A to B> syntax to play only part of a sound file. It works just fine in 7.2.2.
To be specific, renpy.sound.play() fails when I use the <from A to B> syntax to play only part of a sound file. It works just fine in 7.2.2.
Jitteh Dawn --- A VN by Ivlivs
- namastaii
- Eileen-Class Veteran
- Posts: 1350
- Joined: Mon Feb 02, 2015 8:35 pm
- Projects: Template Maker for Ren'Py, What Life
- Github: lunalucid
- Skype: Discord: lunalucid#1991
- Soundcloud: LunaLucidMusic
- itch: lunalucid
- Location: USA
- Contact:
Re: renpy.sound.play() doesn't work on 7.3.2
You would use instead
Code: Select all
play sound "soundfile.mp3"
- PyTom
- Ren'Py Creator
- Posts: 16093
- 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: renpy.sound.play() doesn't work on 7.3.2
Please file a bug on the Ren'Py tracker, with the files in question attached. I don't know anything that would have changed, but I'd like to handle this when I get a chance.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3791
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: renpy.sound.play() doesn't work on 7.3.2
renpy.sound.play() would be used wherever a screen action or python function is required. I assume this is one of these cases.namastaii wrote: ↑Thu Aug 08, 2019 10:53 pm You would useinsteadCode: Select all
play sound "soundfile.mp3"
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
- IrinaLazareva
- Veteran
- Posts: 399
- Joined: Wed Jun 08, 2016 1:49 pm
- Projects: Legacy
- Organization: SunShI
- Location: St.Petersburg, Russia
- Contact:
Re: renpy.sound.play() doesn't work on 7.3.2
Honestly, I'm surprised this method worked in version 7. This function has been obsolete for a long time. You can use renpy.music.play() instead.
https://renpy.org/doc/html/audio.html#renpy.music.play
For example,
https://renpy.org/doc/html/audio.html#renpy.music.play
For example,
Code: Select all
$ renpy.music.play("example.ogg", channel='sound', loop=None)
Re: renpy.sound.play() doesn't work on 7.3.2
I tried that just now; it didn't work.IrinaLazareva wrote: ↑Fri Aug 09, 2019 4:51 am Honestly, I'm surprised this method worked in version 7. This function has been obsolete for a long time. You can use renpy.music.play() instead.
https://renpy.org/doc/html/audio.html#renpy.music.play
For example,Code: Select all
$ renpy.music.play("example.ogg", channel='sound', loop=None)
Jitteh Dawn --- A VN by Ivlivs
Re: renpy.sound.play() doesn't work on 7.3.2
Done -- I've filed the bug report under the name RawleNyanzi, and I even attached a project folder containing the code and assets for an example program that illustrates the issue. To make it easy to switch between 7.3.2 and 7.2.2, it's not an executable on its own, just a project folder.
Jitteh Dawn --- A VN by Ivlivs
- IrinaLazareva
- Veteran
- Posts: 399
- Joined: Wed Jun 08, 2016 1:49 pm
- Projects: Legacy
- Organization: SunShI
- Location: St.Petersburg, Russia
- Contact:
Re: renpy.sound.play() doesn't work on 7.3.2
I think I get it. The problem is not the function, but the file format. It seems like renpy 7.3.2 no longer supports playback of wav (including uncompressed PCM) files.
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3791
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: renpy.sound.play() doesn't work on 7.3.2
IrinaLazareva wrote: ↑Fri Aug 09, 2019 7:28 am I think I get it. The problem is not the function, but the file format. It seems like renpy 7.3.2 no longer supports playback of wav (including uncompressed PCM) files.
On second testing, wav works in the last version of Ren'Py, but not 7.3.2.320, nice catch.
The only thing in the changelog that I can see might be related is:
Ren'Py now always initializes the media playback system, so that a movie can be played even if no audio will be played.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Who is online
Users browsing this forum: No registered users