Ejemplo n.º 1
0
 public void Play()
 {
     if (m_Pipeline != null)
     {
         m_Pipeline.SetVolume(m_AudioVolume);
         m_Pipeline.Play();
         m_FirstFrame = true;
     }
 }
 public void Play()
 {
     if (m_Pipeline != null)
     {
         m_Pipeline.SetVolume(m_AudioVolume);
         m_Pipeline.Play();
         Debug.Log("\n current position is = " + m_Pipeline.Position);
         m_FirstFrame = true;
     }
 }
Ejemplo n.º 3
0
    void Update()
    {
        if (m_Source == null || m_Filename == null)
        {
            return;
        }

        if (m_width != m_Source.width || m_height != m_Source.height)
        {
            m_width  = m_Source.width;
            m_height = m_Source.height;
            m_Pipeline.SetupEncoding(m_Filename, m_Source.width, m_Source.height);
            m_Pipeline.Play();
        }

        var pixels = m_Source.GetPixels32();
        var handle = GCHandle.Alloc(pixels, GCHandleType.Pinned);

        m_Pipeline.ConsumeImage(handle.AddrOfPinnedObject(), pixels.Length * 4);
        handle.Free();
    }