/// <summary> /// Stops the music either by fading out quickly, or by enqueuing and End-Segment. /// </summary> /// <remarks> /// If the "immediately" parameter is set to false, psai will wait for the current Segment to finish, then play an End- /// Segment of the current Theme, then stop the music. Psai will remain silent until you explicitly trigger another /// Theme by calling TriggerMusicTheme(). /// </remarks> /// <param name="immediately">passing 'true' will stop the playback by a quick fadeout; 'false' will smoothly end the music via the shortest path to a Segment that has the END-Suitability set.</param> /// <returns> /// <list type="table"> /// <item> /// <term>"PsaiResult.OK</term> /// <description> if successful</description> /// </item> /// <item> /// <term>"PsaiResult.initialization_error</term> /// <description>psai has not been initialized correctly. See psai.log for more information.</description> /// </item> /// <item> /// <term>"PsaiResult.unknown_theme</term> /// <description>the requested Theme does not exist in the current soundtrack</description> /// </item> /// <item> /// <term>"PsaiResult.commandIgnoredMenuModeActive</term> /// <description>the command was ignored, call <see cref="MenuModeLeave">MenuModeLeave()</see> first.</description> /// </item> /// <item> /// <term>"PsaiResult.commandIgnored</term> /// <description>psai is already in Silence Mode</description> /// </item> /// </list> /// </returns> public PsaiResult StopMusic(bool immediately) { return(m_logik.StopMusic(immediately)); }