예제 #1
0
        private void PlayCallback(void *data, void *samples, uint count, long pts)
        {
            try
            {
                m_frameRate++;
                Sound s = new Sound();
                s.SamplesData = new IntPtr(samples);
                s.Count       = count;
                s.SamplesSize = (uint)(count * m_format.BlockSize);
                s.Pts         = pts;

                if (m_callbacks.SoundCallback != null)
                {
                    m_callbacks.SoundCallback(s);
                }
            }
            catch (Exception ex)
            {
                if (m_excHandler != null)
                {
                    m_excHandler(ex);
                }
                else
                {
                    throw;
                }
            }
        }
예제 #2
0
        private void PlayCallback(void *data, void *samples, uint count, long pts)
        {
            Sound s = new Sound();

            s.SamplesData = new IntPtr(samples);
            s.SamplesSize = (uint)(count * m_format.BlockSize);
            s.Pts         = pts;

            if (m_callbacks.SoundCallback != null)
            {
                m_callbacks.SoundCallback(s);
            }
        }