On Thu, Apr 30, 2020 at 1:28 PM d4v3y_5c0n3s <[email protected]> wrote:
>
> Okay, so Mix_FadeInMusic() is still producing errors.  I will update my 
> Github repo shortly, and here are the current error messages that I am 
> receiving:

I believe this problem is because 'Mix_Music' is declared as a
"$extype" which represents the flat structure, so the "handle" field
of 'music' is a structure not a pointer. Then Creating a "var:
Mix_Music = m.handle" is trying to assign that flat structure to a
pointer. Or something like that. An easy fix (I think) is to make
"Mix_Music" a pointer, and change functions that use it to take it
directly rather than via reference:

typedef Mix_Music = ptr
fun Mix_FadeInMusic ( music: Mix_Music, loops: int, ms: int ) : int = "mac#%"

implement audio_music_play ( m ) = let
  val chan = Mix_FadeInMusic(m.handle, ~1, fade_time);
in
  if (chan = ~1) then println!("unable to play music: ", Mix_GetError())
end

-- 
https://bluishcoder.co.nz

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/CALn1vHFkzkkqzigntkWGuoa-L6iQkXbwborirkMXWGSOsLowuw%40mail.gmail.com.

Reply via email to