LoadAudioData() private method

private LoadAudioData ( ) : bool
return bool
 static public int LoadAudioData(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.AudioClip self = (UnityEngine.AudioClip)checkSelf(l);
         var ret = self.LoadAudioData();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
 static public int LoadAudioData(IntPtr l)
 {
     try {
         UnityEngine.AudioClip self = (UnityEngine.AudioClip)checkSelf(l);
         var ret = self.LoadAudioData();
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 3
0
 static int QPYX_LoadAudioData_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 1);
         UnityEngine.AudioClip QPYX_obj_YXQP = (UnityEngine.AudioClip)ToLua.CheckObject(L_YXQP, 1, typeof(UnityEngine.AudioClip));
         bool QPYX_o_YXQP = QPYX_obj_YXQP.LoadAudioData();
         LuaDLL.lua_pushboolean(L_YXQP, QPYX_o_YXQP);
         return(1);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
Ejemplo n.º 4
0
 static int LoadAudioData(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.AudioClip obj = (UnityEngine.AudioClip)ToLua.CheckObject(L, 1, typeof(UnityEngine.AudioClip));
         bool o = obj.LoadAudioData();
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int LoadAudioData(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("UnityEngine.AudioClip.LoadAudioData");
#endif
        try
        {
            ToLua.CheckArgsCount(L, 1);
            UnityEngine.AudioClip obj = (UnityEngine.AudioClip)ToLua.CheckObject(L, 1, typeof(UnityEngine.AudioClip));
            bool o = obj.LoadAudioData();
            LuaDLL.lua_pushboolean(L, o);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Ejemplo n.º 6
0
	public void GetObjects(Sound s) {

		string file = s.themeName + "/" + s.stickerName;
		
		S3Client.GetObjectAsync(S3BucketName, file, (responseObj) =>
		                        
		                        {
			var response = responseObj.Response;

			if (response.ResponseStream != null) {
				AudioClip t = new AudioClip();
				byte[] imageData = new byte[response.ResponseStream.Length];
				response.ResponseStream.Read(imageData, 0, (int)imageData.Length);
				t.LoadAudioData();
				t.name = s.stickerName;
				instantiateSounds(t, s);

				AudioClip soundInstance = Instantiate(t) as AudioClip;
			} else {
				Debug.Log("Nothing found in Bucket");
			}
		});
	}
Ejemplo n.º 7
0
 public static void LoadAndplayClip(AudioSource source, AudioClip Clip)
 {
     Clip.LoadAudioData();
     source.clip = Clip;
     source.Play();
 }
Ejemplo n.º 8
0
 public static void SlashSound(AudioSource source, AudioClip Slash)
 {
     Slash.LoadAudioData();
     source.clip = Slash;
     source.Play();
 }
Ejemplo n.º 9
0
     IEnumerator load(string songname) {

		yield return new WaitForSeconds (0.2f);
        ResourceRequest async = Resources.LoadAsync(songname);
		if (!async.isDone) {
          yield return 0;
        }

		song = async.asset as AudioClip;
		song.LoadAudioData();
     }