tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

vector_float_frame.h (1325B)


      1 /*
      2 *  Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
      3 *
      4 *  Use of this source code is governed by a BSD-style license
      5 *  that can be found in the LICENSE file in the root of the source
      6 *  tree. An additional intellectual property rights grant can be found
      7 *  in the file PATENTS.  All contributing project authors may
      8 *  be found in the AUTHORS file in the root of the source tree.
      9 */
     10 
     11 #ifndef MODULES_AUDIO_PROCESSING_AGC2_VECTOR_FLOAT_FRAME_H_
     12 #define MODULES_AUDIO_PROCESSING_AGC2_VECTOR_FLOAT_FRAME_H_
     13 
     14 #include <vector>
     15 
     16 #include "api/audio/audio_view.h"
     17 #include "modules/audio_processing/include/audio_frame_view.h"
     18 
     19 namespace webrtc {
     20 
     21 // A construct consisting of a multi-channel audio frame, and a FloatFrame view
     22 // of it.
     23 class VectorFloatFrame {
     24 public:
     25  VectorFloatFrame(int num_channels,
     26                   int samples_per_channel,
     27                   float start_value);
     28  ~VectorFloatFrame();
     29 
     30  AudioFrameView<float> float_frame_view();
     31  AudioFrameView<const float> float_frame_view() const;
     32 
     33  DeinterleavedView<float> view() { return view_; }
     34  DeinterleavedView<const float> view() const { return view_; }
     35 
     36 private:
     37  std::vector<float> channels_;
     38  DeinterleavedView<float> view_;
     39 };
     40 
     41 }  // namespace webrtc
     42 
     43 #endif  // MODULES_AUDIO_PROCESSING_AGC2_VECTOR_FLOAT_FRAME_H_