Skip to main content

tone_frame

Function tone_frame 

Source
pub fn tone_frame(index: usize) -> [u8; 160]
Expand description

One frame of the tone the peer speaks, by position in the response.

The tone is a sawtooth over the G.711 code space: frame index carries the bytes index * 160 … counting upward and wrapping. Two properties earn it:

  • Frame 0 is spec §4.2’s F-ramp, so the bytes a bridge test expects at send_encoded are the spec’s own vector rather than a fixture’s invention.
  • Every frame differs from its neighbours, so a test that receives audio can say which frames arrived and in what order — which is what makes a truncated response (ORB-8) distinguishable from a late one.