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; } } }
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); } }