Audio: footstep-chain diagnostics -- every link verified except the final trigger fire (task #50)
Instrumentation (all BT_AUDIO_LOG/BT_AUDIO_SPATIAL-gated): mech watcher-poll probe (delayed flag + socket count via new Simulation::DebugAudioWatcherCount), per-sim audio-socket size in ExecuteWatchers, trigger notifications (val>0), watcher poll-rate/change probes, footstep pulse address trace. VERIFIED working: FootStep binds to the real member (pulse addr == bound ptr, same run); pulses fire per stride (40/run); the watcher registers on the mech (audioWatchers=20 after audio-object creation); the mech's poll runs (delayed=0, simFlags=0x1110); Logical == int (STYLE.H:132) matches the member type. The idle<->moving engine crossfade (AudioMotionScale on LocalVelocity through the restored watcher poll) is CONFIRMED audible in play. REMAINING: the FootFall transient still doesn't reach SetupPatch -- next probe is the trigger's streamed threshold/inverse config and the speed-scaled transient volume at the renderer drop gate (LowAudioVolumeThreshold=0.3). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
744ef8cc16
commit
ba3040ea09
@@ -358,7 +358,7 @@ template <class T> void
|
||||
Check_Pointer(attribute_ptr);
|
||||
Scalar current_value = ExtractInterestingValue(attribute_ptr);
|
||||
|
||||
if (getenv("BT_AUDIO_SPATIAL")) { static int s_tg=0; if (s_tg++<80)
|
||||
if (getenv("BT_AUDIO_SPATIAL") && current_value > 0.0f) { static int s_tg=0; if (s_tg++<120)
|
||||
DEBUG_STREAM << "[trigger] attrPtr=" << (void*)attributePointer
|
||||
<< " val=" << current_value << " thresh=" << attributeValueThreshold
|
||||
<< " armed=" << (int)!triggerOn << "\n" << std::flush; }
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include <cstdlib>
|
||||
#include "munga.h"
|
||||
#pragma hdrstop
|
||||
|
||||
@@ -486,6 +487,14 @@ void
|
||||
//#############################################################################
|
||||
// Watcher Support
|
||||
//
|
||||
int
|
||||
Simulation::DebugAudioWatcherCount()
|
||||
{
|
||||
SChainIteratorOf<Component*> iterator(audioWatcherSocket);
|
||||
return (int)iterator.GetSize();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Simulation::ExecuteWatchers()
|
||||
{
|
||||
@@ -496,6 +505,8 @@ void
|
||||
// Audio
|
||||
{
|
||||
SChainIteratorOf<Component*> iterator(audioWatcherSocket);
|
||||
if (getenv("BT_AUDIO_SPATIAL")) { static int s_ec=0; if ((s_ec++ % 600)==0)
|
||||
DEBUG_STREAM << "[watchpoll] sim=" << (void*)this << " audioSocket size=" << iterator.GetSize() << "\n" << std::flush; }
|
||||
while ((watcher = iterator.ReadAndNext()) != NULL)
|
||||
{
|
||||
watcher->Execute();
|
||||
|
||||
@@ -247,6 +247,9 @@ public:
|
||||
void
|
||||
ExecuteWatchers();
|
||||
|
||||
int // DEBUG (BT_AUDIO_LOG): how many audio watchers are registered on this sim
|
||||
DebugAudioWatcherCount();
|
||||
|
||||
private:
|
||||
SChainOf<Component*>
|
||||
audioWatcherSocket;
|
||||
|
||||
@@ -5205,6 +5205,10 @@ void
|
||||
// (AudioLogicalTrigger FootStep, AudioMotionScale/Trigger LocalVelocity, ...)
|
||||
// never executed -- only the PUSHED StateIndicator watchers fired. That's
|
||||
// why footsteps/motion-scaled sounds were silent while state sounds worked. [T0]
|
||||
if (getenv("BT_AUDIO_LOG")) { static int s_wd=0; if ((s_wd++ % 300)==0)
|
||||
DEBUG_STREAM << "[audio] mech watcher poll: delayed=" << (int)AreWatchersDelayed() << " audioWatchers=" << DebugAudioWatcherCount()
|
||||
<< " simFlags=0x" << std::hex << (unsigned)simulationFlags << std::dec
|
||||
<< "\n" << std::flush; }
|
||||
if (!AreWatchersDelayed())
|
||||
ExecuteWatchers();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user