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

:wave argument is not recognized on sdl2-mixer:init #6

Open
ghost opened this issue Jan 3, 2019 · 1 comment
Open

:wave argument is not recognized on sdl2-mixer:init #6

ghost opened this issue Jan 3, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Jan 3, 2019

Documentations mentions sdl2-mixer:init with :wave as an argument but the function returns a warning

WARNING: Unknown mask symbol :WAVE, treated as 0; expected one of:
  (:FLAC :FLUIDSYNTH :MOD :MODPLUG :MP3 :OGG)

All the functions work however. Even loading of .wav files is successfull despite :wave not being passed as an argument to the sdl2-mixer:init function

@fitzsim
Copy link
Contributor

fitzsim commented Aug 24, 2024

Can you test this and see if it works for you?

diff --git a/src/general.lisp b/src/general.lisp
index baa44d8..3cde390 100644
--- a/src/general.lisp
+++ b/src/general.lisp
@@ -10,12 +10,10 @@ defun linked-version
   (c-let ((version sdl2-ffi:sdl-version :from (mix-linked-version)))
     (values (version :major) (version :minor) (version :patch))))
 
-(autowrap:define-bitmask-from-enum (init-flags sdl2-ffi:mix-init-flags))
-
 (defun init (&rest flags)
-  "Initialize the SDL mixer specifying the formats you wish to use. Must be one
-of these values or a combination thereof :ogg, :wave, :mod, :mp3"
-  (mix-init (mask-apply 'init-flags flags)))
+  "Initialize the SDL mixer.  Arguments are ignored for now."
+  (declare (ignore flags))
+  (mix-init 0))
 
 (defun quit ()
   "Cleans up SDL Mixer"

The examples still work fine for me with this, so we might as well ignore the flags, I think.

I was having issues with needing to special-case the MIX_InitFlags symbol anyway, to get this to work (see comments on #13):

(autowrap:define-bitmask-from-enum (init-flags sdl2-ffi:mix-init-flags))

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

No branches or pull requests

1 participant