Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Missing duration functions for SDL_Mixer? #611

Open
Necklaces opened this issue Nov 27, 2024 · 2 comments
Open

Missing duration functions for SDL_Mixer? #611

Necklaces opened this issue Nov 27, 2024 · 2 comments

Comments

@Necklaces
Copy link

Go version: go1.23.3 linux/amd64
Go-SDL2 version: v0.5.0-alpha.6.0.20240902114001-f9a623944236
SDL2 version: 2.30.9
OS: Arch Linux
Architecture: x86_64

Maybe I'm blind, it is kinda late here, but I've been trying to figure out how to get the length / duration of a loaded mix.Music audiofile.

In C SDL2 there seems to be both a Mix_MusicDuration and a Mix_GetMusicLoopLengthTime which both would help me in what I'm trying to do, but I can't seem to find them neither in the documentation nor in the code?

I've seen the LengthInMs function for chunks, but I don't know if that's what I need, I suppose I'd then have to loop through all the chunks just to calculate the length?

Is there some other way I'm missing?

@Necklaces
Copy link
Author

Necklaces commented Nov 28, 2024

So I tried adding them myself and seems like it works.

I could make a pull request for this, but I notice there are a lot of other missing ones and the documentation links are outdated - do you want me to clean up a bit and add the remaining functions?

@veeableful
Copy link
Contributor

Hi @Necklaces, thank you. The binding is still incomplete so any help is certainly welcome!

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

No branches or pull requests

2 participants