Advertisement
Guest User

Untitled

a guest
Mar 5th, 2017
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. // Processes a 10 ms |frame| of the primary audio stream. On the client-side,
  2. // this is the near-end (or captured) audio.
  3. //
  4. // If needed for enabled functionality, any function with the set_stream_ tag
  5. // must be called prior to processing the current frame. Any getter function
  6. // with the stream_ tag which is needed should be called after processing.
  7. //
  8. // The |sample_rate_hz_|, |num_channels_|, and |samples_per_channel_|
  9. // members of |frame| must be valid. If changed from the previous call to this
  10. // method, it will trigger an initialization.
  11. virtual int ProcessStream(AudioFrame* frame) = 0;
  12.  
  13. // Accepts deinterleaved float audio with the range [-1, 1]. Each element
  14. // of |src| points to a channel buffer, arranged according to
  15. // |input_layout|. At output, the channels will be arranged according to
  16. // |output_layout| at |output_sample_rate_hz| in |dest|.
  17. //
  18. // The output layout must have one channel or as many channels as the input.
  19. // |src| and |dest| may use the same memory, if desired.
  20. //
  21. // TODO(mgraczyk): Remove once clients are updated to use the new interface.
  22. virtual int ProcessStream(const float* const* src,
  23. size_t samples_per_channel,
  24. int input_sample_rate_hz,
  25. ChannelLayout input_layout,
  26. int output_sample_rate_hz,
  27. ChannelLayout output_layout,
  28. float* const* dest) = 0;
  29.  
  30. // Accepts deinterleaved float audio with the range [-1, 1]. Each element of
  31. // |src| points to a channel buffer, arranged according to |input_stream|. At
  32. // output, the channels will be arranged according to |output_stream| in
  33. // |dest|.
  34. //
  35. // The output must have one channel or as many channels as the input. |src|
  36. // and |dest| may use the same memory, if desired.
  37. virtual int ProcessStream(const float* const* src,
  38. const StreamConfig& input_config,
  39. const StreamConfig& output_config,
  40. float* const* dest) = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement