Exemple #1
0
        public SA_Result AudioSessionSetCategoryWithOptions(ISN_AVAudioSessionCategory category, ISN_AVAudioSessionCategoryOptions options)
        {
#if UNITY_IPHONE
            var resultString = _ISN_AV_AudioSessionSetCategoryWithOptions((int)category, (int)options);
            var result       = JsonUtility.FromJson <SA_Result>(resultString);
            return(result);
#else
            return(null);
#endif
        }
        //--------------------------------------
        // ISN_AVAudioSession
        //--------------------------------------



        public SA_Result AudioSessionSetCategory(ISN_AVAudioSessionCategory category)
        {
            #if UNITY_IPHONE || UNITY_TVOS
            var resultString = _ISN_AV_AudioSessionSetCategory((int)category);
            var result       = JsonUtility.FromJson <SA_Result>(resultString);
            return(result);
            #else
            return(null);
            #endif
        }
        //--------------------------------------
        // Public Methods
        //--------------------------------------


        /// <summary>
        /// Sets the current audio session category.
        ///
        /// The audio session's category defines how the app intends to use audio.
        /// Typically, you set the category before activating the session.
        /// You can also set the category while the session is active, but this results in an immediate route change.
        /// </summary>
        /// <returns>Returns operation result info</returns>
        /// <param name="category">The audio session category to apply to the audio session.</param>
        public static SA_Result SetCategory(ISN_AVAudioSessionCategory category)
        {
            return(ISN_AVLib.API.AudioSessionSetCategory(category));
        }
 SA_Result ISN_iAVAPI.AudioSessionSetCategory(ISN_AVAudioSessionCategory category)
 {
     return(new SA_Result());
 }
 public SA_Result AudioSessionSetCategory(ISN_AVAudioSessionCategory category)
 {
     m_audioSessionCategory = category;
     return(new SA_Result());
 }
Exemple #6
0
 public SA_Result AudioSessionSetCategoryWithOptions(ISN_AVAudioSessionCategory category, ISN_AVAudioSessionCategoryOptions options)
 {
     m_audioSessionCategory        = category;
     m_audioSessionCategoryOptions = options;
     return(new SA_Result());
 }
Exemple #7
0
 /// <summary>
 /// Sets the current audio session category.
 ///
 /// The audio session's category defines how the app intends to use audio.
 /// Typically, you set the category before activating the session.
 /// You can also set the category while the session is active, but this results in an immediate route change.
 /// </summary>
 /// <returns>Returns operation result info</returns>
 /// <param name="category">The audio session category to apply to the audio session.</param>
 /// <param name="options">A mask of additional options for handling audio. For a list of constants, <see cref="ISN_AVAudioSessionCategoryOptions"/></param>
 public static SA_Result SetCategory(ISN_AVAudioSessionCategory category, ISN_AVAudioSessionCategoryOptions options)
 {
     return(ISN_AVLib.API.AudioSessionSetCategoryWithOptions(category, options));
 }