Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unable to get SDL.Mixer Music to play without issues. #309

Open
ProgrammingRainbow opened this issue Oct 20, 2024 · 1 comment
Open

Unable to get SDL.Mixer Music to play without issues. #309

ProgrammingRainbow opened this issue Oct 20, 2024 · 1 comment

Comments

@ProgrammingRainbow
Copy link

ProgrammingRainbow commented Oct 20, 2024

I have been learning Haskell for the last year on and off. I have never been able to get SDL.Mixer to play music stablily. It plays then randomly stops, or makes Glitching sounds, or repeats incorrectly or crashes the program entirely. I have tried so many different things, Including trying different music files and types and refresh rates. I have tried different versions of haskell and stack. Also different versions of SDL.Mixer. I have also made the same game in so many other languages including Forth, Rust, COBOL, C, C++, Python, Lua, Odin, Ruby. I have not had this issue with SDL_Mixer in any other language. I am unable to to find any mention anywhere of the errors i am getting. I really need some help.

Using Archlinux, stack lts-20.26, ghc 9.2.8.

To play music.
SDL.Mixer.playMusic SDL.Mixer.Forever music

if SDL.Mixer.haltMusic is used then SDL.Mixer.resumeMusic mostly never works. I have issues with mp3, ogg and wav. Music will stop playing randomly or glitch or make different sounds. The same issue has been persistent for over a year and over different games and coding styles and versions. I run the commands with catch and print out the exceptions. Though most of the time it errors without raising an exception.

SDLCallFailed {sdlExceptionCaller = "SDL.Mixer.playMusic", sdlFunction = "Mix_PlayMusic", sdlExceptionEr
ror = "ov_time_seek: OV_FALSE"}

You can check out my code here.
https://github.com/ProgrammingRainbow/Yellow-Snow-Haskell-SDL2
https://github.com/ProgrammingRainbow/Beginners-Guide-to-SDL2-in-Haskell

@dpwiz
Copy link
Member

dpwiz commented Nov 1, 2024

Can confirm. I've switched to openAL because of this.

Btw, the correct repo for Mixer is https://github.com/haskell-game/sdl2-mixer

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants