MediaRecorder 2ch Experiment

Investigates whether co-recording mic and MLS reference in a single stereo stream eliminates the unknown start-timing offset that biases single-channel MediaRecorder latency measurements.

1-channel (start-timing offset):

  MediaRecorder.start() ──► mic recording starts       ← t₀
       ? ms gap (unknown start-timing offset)
  noiseSource.start()   ──► reference plays             ← t₁
                                  ↑
                           t₁ − t₀ unknown per run → biases every measurement


2-channel (this experiment):

  Mic ───────────────────► ch 0 ─┐
                                 ├─► ChannelMerger ──► MediaRecorder ──► blob
  noiseSource ──► speaker        │                          │
                └──────────────► ch 1 ─┘            decodeAudioData
                                                      /            \
                                                    ch 0          ch 1
                                                   (mic)         (ref)
                                                      \            /
                                                    cross-correlate
                                                          │
                                                     latency (ms)

  Both channels share the same recording start → no timing bias
        
Not connected