MediaRecorder 1ch Experiment

Records the microphone directly from inputStream while playing the MLS reference signal through ac.destination. The unknown effective alignment between MediaRecorder.start() and noiseSource.start() introduces a start-timing bias into every measurement — this is the bias that the 2-channel experiment eliminates by co-recording both signals in a single stereo stream. Compare latency peak positions between the two; ratio values are not directly comparable (1ch correlates a decoded recording against a raw MLS buffer, whereas 2ch correlates two decoded channels from the same recording).

1-channel (start-timing bias):

  MediaRecorder.start() ──► mic recording starts       ← t₀
       ? ms gap (unknown effective capture/playback alignment)
  noiseSource.start()   ──► reference plays             ← t₁
                                  ↑
                           t₁ − t₀ unknown per run → biases every measurement


  MediaRecorder(inputStream) ──► records mic directly
  noiseSource ───────────────────────────────────────► ac.destination

  After recording:
    ch0 = decoded mic recording  (getChannelData(0))
    ch1 = pre-generated MLS buffer (noiseBuffer.getChannelData(0))
      └─► cross-correlate → latency (ms)
        
Not connected