Skip to main content
How Can We Help?
OnAudioPeak event not working
Check the following points:
- the OnAudioPeak handler must be assigned before invoking StartPreview, StartRecording or OpenPlayer: the audio level measurement is set up when the preview, the recording or the playback starts (in .NET:
VideoGrabber.OnAudioPeak += ...before the start), - the source must deliver audio: for a video capture device, select the audio device, e.g.
VideoGrabber.AudioDevice = VideoGrabber.AudioDeviceIndex ("Microphone (...)");, and for the player, the clip must include an audio stream (IsPlayerAudioStreamAvailable returns ts_True), - ActiveX version: the OnAudioPeak event requires a VU-meter to be enabled, e.g.
VideoGrabber.VuMeter = vu_Bargraph;(see Audio levels and VU-meters), - the event is raised from the main thread (since version 16.6.1.8): the handler must return quickly, and the main thread must not be blocked (long loop, wait…), otherwise the events are delayed.
Note: the AudioPeakEvent property is obsolete, it no longer has any effect.
If the problem remains, please contact the support, with the messages returned by the OnLog event.