Crackling in mp3 background music
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.
Crackling in mp3 background music
I doubt this is fixable. Whenever I use fullscreen or switch to another window while the game is in window mode, the music starts to crackle. When I turn music off and then back on, it is still crackling. When I switch it back to window mode from fullscreen mode, it still crackles forcing me to reopen the game.
And if it helps...my computer specs are:
Windows XP Pro: SP2
1.1GHz processor
1GB of RAM
NVidia GeForce DDR 32MB
ESS AudioDrive (don't know what specs to list with audio card, if any o.o;)
DirectX 9.0c (if it's important)
I know the probability of this being fixed on your end is low, but hey, doesn't hurt to ask huh? lol
And if it helps...my computer specs are:
Windows XP Pro: SP2
1.1GHz processor
1GB of RAM
NVidia GeForce DDR 32MB
ESS AudioDrive (don't know what specs to list with audio card, if any o.o;)
DirectX 9.0c (if it's important)
I know the probability of this being fixed on your end is low, but hey, doesn't hurt to ask huh? lol
- 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:
More and more, I'm starting to think SDL_mixer isn't my favorite library. It's behind many of the problems Ren'Py has. OTOH, I've yet to find another cross-platform music library. But I'll look again.
If people could look at the CPU graph and let me know if that's associated with the crackling, I'd appreciate it. Also, if you could try using vorbis music too, then that would be nice as well.
If people could look at the CPU graph and let me know if that's associated with the crackling, I'd appreciate it. Also, if you could try using vorbis music too, then that would be nice as well.
PyTom:
It happens usually when there is a sudden peak of CPU usage, usually switching windows or other stuff. Sometimes it happens on startup. It is also possible that the audio buffer size needs to be increased. AFAIK, PyGame defaults the buffer size to 1024, but it is recommended to use a buffer size of 4096 for music playing according to SDL_mixer docs.
Tage:
Not using the direct sound driver seemed to help for me (though it didn't solve all the problems). Try this:
Create run_game_test.bat with this code:
Run run_game_test.bat to see if there's any difference.
It happens usually when there is a sudden peak of CPU usage, usually switching windows or other stuff. Sometimes it happens on startup. It is also possible that the audio buffer size needs to be increased. AFAIK, PyGame defaults the buffer size to 1024, but it is recommended to use a buffer size of 4096 for music playing according to SDL_mixer docs.
Tage:
Not using the direct sound driver seemed to help for me (though it didn't solve all the problems). Try this:
Create run_game_test.bat with this code:
Code: Select all
set SDL_AUDIODRIVER=waveout
run_game.exe
I can hear it without crackling! Works well so far.
Edit: Testing with different music formats now...
Edit2: Drat, well...good news, it works very well with .ogg format. Bad news...can't hear mp3's at all.
Edit3: console.exe says this when it tries to play mp3's
Edit: Testing with different music formats now...
Edit2: Drat, well...good news, it works very well with .ogg format. Bad news...can't hear mp3's at all.
Edit3: console.exe says this when it tries to play mp3's
Code: Select all
Error while trying to play music: Module format not recognized
- 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:
Grr... I wonder if the SDL_music library I used is linked with mp3 support at all. Well, there's always ogg, and the midi playback should also be superior. Hopefully, this can hold us over until I can get around to making a proper release.
At least this one doesn't crackle as much... I'm getting closer, hopefully.
At least this one doesn't crackle as much... I'm getting closer, hopefully.
Who is online
Users browsing this forum: No registered users