Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Side by Side Diff: media/audio/audio_parameters.h

Issue 9702019: Adds Analog Gain Control (AGC) to the WebRTC client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_AUDIO_AUDIO_PARAMETERS_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_PARAMETERS_H_
6 #define MEDIA_AUDIO_AUDIO_PARAMETERS_H_ 6 #define MEDIA_AUDIO_AUDIO_PARAMETERS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "media/base/channel_layout.h" 9 #include "media/base/channel_layout.h"
10 #include "media/base/media_export.h" 10 #include "media/base/media_export.h"
11 11
12 struct MEDIA_EXPORT AudioInputBufferParameters {
13 double volume;
14 uint32 size;
15 };
16
17 // Use a struct-in-struct approach to ensure that we can calculate the required
18 // size as sizeof(AudioInputBufferParameters) + #(bytes in audio buffer) without
19 // using packing.
20 struct MEDIA_EXPORT AudioInputBuffer {
21 AudioInputBufferParameters params;
22 int8 audio[1];
23 };
24
12 class MEDIA_EXPORT AudioParameters { 25 class MEDIA_EXPORT AudioParameters {
13 public: 26 public:
14 // Compare is useful when AudioParameters is used as a key in std::map. 27 // Compare is useful when AudioParameters is used as a key in std::map.
15 class MEDIA_EXPORT Compare { 28 class MEDIA_EXPORT Compare {
16 public: 29 public:
17 bool operator()(const AudioParameters& a, const AudioParameters& b) const; 30 bool operator()(const AudioParameters& a, const AudioParameters& b) const;
18 }; 31 };
19 32
20 enum Format { 33 enum Format {
21 AUDIO_PCM_LINEAR = 0, // PCM is 'raw' amplitude samples. 34 AUDIO_PCM_LINEAR = 0, // PCM is 'raw' amplitude samples.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 ChannelLayout channel_layout_; // Order of surround sound channels. 77 ChannelLayout channel_layout_; // Order of surround sound channels.
65 int sample_rate_; // Sampling frequency/rate. 78 int sample_rate_; // Sampling frequency/rate.
66 int bits_per_sample_; // Number of bits per sample. 79 int bits_per_sample_; // Number of bits per sample.
67 int frames_per_buffer_; // Number of frames in a buffer. 80 int frames_per_buffer_; // Number of frames in a buffer.
68 81
69 int channels_; // Number of channels. Value set based on 82 int channels_; // Number of channels. Value set based on
70 // |channel_layout|. 83 // |channel_layout|.
71 }; 84 };
72 85
73 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ 86 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_
OLDNEW
« no previous file with comments | « media/audio/audio_low_latency_input_output_unittest.cc ('k') | media/audio/fake_audio_input_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698