mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-09-22 18:45:43 -04:00
zm_update-1.39.31.sql gave monitors audio detection, but the level only ever existed in shared memory, so it was gone the moment the frame passed and there was nothing for the event view to plot. Add Frames.AudioLevel next to Score, on the same 0-100 dBFS-derived scale the threshold uses. What is stored is the peak since the previous row, not the level at the instant the row was written. Frames rows are written well below the capture rate -- only alarm, bulk and score-increasing frames get one -- so sampling at write time would drop exactly the short loud noises worth seeing on a timeline. AudioDetector accumulates the peak as it decodes and Event::AddFrame takes it where the row is built, which clears it so each row covers its own interval. The Event constructor takes and discards it once, otherwise an event's first row reports the loudest moment since the previous event ended. This needs no shared memory change: zma is now an offline re-analysis tool and the live analysis runs in a thread of zmc, alongside the capture thread that runs the decoder, so the peak can stay in the AudioDetector. SharedData keeps its documented 888-byte layout and its fixed offsets. The frames ajax returns the column, and Score with it. elements in web/ajax/status.php is a whitelist that never listed Score, which is why the event view's cue strip has been reading an undefined Score off every frame. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JpiSWBmtQkR5bcgpHWY4ME
2 lines
8 B
Plaintext
2 lines
8 B
Plaintext
1.39.35
|