Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Processes a 10 ms |frame| of the primary audio stream. On the client-side,
- // this is the near-end (or captured) audio.
- //
- // If needed for enabled functionality, any function with the set_stream_ tag
- // must be called prior to processing the current frame. Any getter function
- // with the stream_ tag which is needed should be called after processing.
- //
- // The |sample_rate_hz_|, |num_channels_|, and |samples_per_channel_|
- // members of |frame| must be valid. If changed from the previous call to this
- // method, it will trigger an initialization.
- virtual int ProcessStream(AudioFrame* frame) = 0;
- // Accepts deinterleaved float audio with the range [-1, 1]. Each element
- // of |src| points to a channel buffer, arranged according to
- // |input_layout|. At output, the channels will be arranged according to
- // |output_layout| at |output_sample_rate_hz| in |dest|.
- //
- // The output layout must have one channel or as many channels as the input.
- // |src| and |dest| may use the same memory, if desired.
- //
- // TODO(mgraczyk): Remove once clients are updated to use the new interface.
- virtual int ProcessStream(const float* const* src,
- size_t samples_per_channel,
- int input_sample_rate_hz,
- ChannelLayout input_layout,
- int output_sample_rate_hz,
- ChannelLayout output_layout,
- float* const* dest) = 0;
- // Accepts deinterleaved float audio with the range [-1, 1]. Each element of
- // |src| points to a channel buffer, arranged according to |input_stream|. At
- // output, the channels will be arranged according to |output_stream| in
- // |dest|.
- //
- // The output must have one channel or as many channels as the input. |src|
- // and |dest| may use the same memory, if desired.
- virtual int ProcessStream(const float* const* src,
- const StreamConfig& input_config,
- const StreamConfig& output_config,
- float* const* dest) = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement