View Single Post
Old 19 January 2021, 16:13   #26
Black Lives Matter

Akira's Avatar
Join Date: May 2001
Location: New York
Posts: 19,475
Man you're a godsend, thanks for helping out with this!
Let's skip to the part that seems relevant as a solution, after all my mumbling.

Originally Posted by Daedalus View Post
You create a sound Newtype pointer to the Sound object, and then the fields will point to the values you want:

*mySound.sound = Addr Sound(1) ; mySound is now a pointer to that object
If *mySound ; Make sure it exists
  *mySound\_data = address_of_new_data.l
End If
Never skip the check to make sure it exists. If, for any reason the sound object doesn't exist (didn't load, not enough free chip RAM to initialise etc.), you'll most likely get an instant guru when you try to modify it.
So that's how you do it!
And if I read you correctly in the other thread, there's something I need to include here to make sure it works?

I feel bad asking all this because it feels like it's buried somewhere in the shit manual and I cannot find it. I searched several pages for the "Addr" command and was not able to find it, for example. Also no explanation on how to create these type of objects, how to work with pointers, etc... just a really bad manual.
Akira is offline  
Page generated in 0.04071 seconds with 11 queries