public void SetCallbacks(VolumeChangedEventHandler volume, NewSoundEventHandler sound) { m_callbacks.VolumeCallback = volume; m_callbacks.SoundCallback = sound; LibVlcMethods.libvlc_audio_set_callbacks(m_hMediaPlayer, m_hSound, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); LibVlcMethods.libvlc_audio_set_volume_callback(m_hMediaPlayer, m_hVolume); }
public void SetCallbacks(AudioCallbacks callbacks) { if (callbacks.SoundCallback == null) { throw new ArgumentNullException("Sound playback callback must be set"); } m_callbacks = callbacks; LibVlcMethods.libvlc_audio_set_callbacks(m_hMediaPlayer, m_hSound, m_hPause, m_hResume, m_hFlush, m_hDrain, IntPtr.Zero); LibVlcMethods.libvlc_audio_set_volume_callback(m_hMediaPlayer, m_hVolume); }