Skip to content

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

Closed as not planned
@ProgrammingRainbow

Description

@ProgrammingRainbow

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions