/// <description> /// Add a notification marker called<paramref name="" /> name at /// </description> /// <param name="name">Symbolic name for the marker that will be passed to the onMarkerPassed() callback.</param> /// <param name="pos">Playback position in seconds when the notification should trigger. Note that this is a soft limit and there may be a delay between the play cursor actually passing the position and the callback being triggered.</param> /// <remarks> For looped sounds, the marker will trigger on each iteration. /// /// </remarks> /// <code> /// // Create a new source. /// $source = sfxCreateSource( AudioMusicLoop2D, "art/sound/backgroundMusic" ); /// /// // Assign a class to the source. /// $source.class = "BackgroundMusic"; /// /// // Add a playback marker at one minute into playback. /// $source.addMarker( "first", 60 ); /// /// // Define the callback function. This function will be called when the playback position passes the one minute mark. /// function BackgroundMusic::onMarkerPassed( %this, %markerName ) /// { /// if( %markerName $= "first" ) /// echo( "Playback has passed the 60 seconds mark." ); /// } /// /// // Play the sound. /// $source.play(); /// </code> public void AddMarker(string name, float pos) { InternalUnsafeMethods.AddMarker__Args _args = new InternalUnsafeMethods.AddMarker__Args() { name = name, pos = pos, }; InternalUnsafeMethods.AddMarker()(ObjectPtr, _args); }