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

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

Issue 5158003: Implement AudioOutputProxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed memleak in the unittests Created 10 years 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
« no previous file with comments | « media/audio/audio_output_proxy_unittest.cc ('k') | media/audio/audio_parameters.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 9
10 struct AudioParameters { 10 struct AudioParameters {
11 // Compare is useful when AudioParameters is used as a key in std::map.
12 class Compare {
13 public:
14 bool operator()(const AudioParameters& a, const AudioParameters& b) const;
15 };
16
11 enum Format { 17 enum Format {
12 AUDIO_PCM_LINEAR = 0, // PCM is 'raw' amplitude samples. 18 AUDIO_PCM_LINEAR = 0, // PCM is 'raw' amplitude samples.
13 AUDIO_PCM_LOW_LATENCY, // Linear PCM, low latency requested. 19 AUDIO_PCM_LOW_LATENCY, // Linear PCM, low latency requested.
14 AUDIO_MOCK, // Creates a dummy AudioOutputStream object. 20 AUDIO_MOCK, // Creates a dummy AudioOutputStream object.
15 AUDIO_LAST_FORMAT // Only used for validation of format. 21 AUDIO_LAST_FORMAT // Only used for validation of format.
16 }; 22 };
17 23
18 // Telephone quality sample rate, mostly for speech-only audio. 24 // Telephone quality sample rate, mostly for speech-only audio.
19 static const uint32 kTelephoneSampleRate = 8000; 25 static const uint32 kTelephoneSampleRate = 8000;
20 // CD sampling rate is 44.1 KHz or conveniently 2x2x3x3x5x5x7x7. 26 // CD sampling rate is 44.1 KHz or conveniently 2x2x3x3x5x5x7x7.
(...skipping 14 matching lines...) Expand all
35 int GetPacketSize() const; 41 int GetPacketSize() const;
36 42
37 Format format; // Format of the stream. 43 Format format; // Format of the stream.
38 int channels; // Number of channels. 44 int channels; // Number of channels.
39 int sample_rate; // Sampling frequency/rate. 45 int sample_rate; // Sampling frequency/rate.
40 int bits_per_sample; // Number of bits per sample. 46 int bits_per_sample; // Number of bits per sample.
41 int samples_per_packet; // Size of a packet in frames. 47 int samples_per_packet; // Size of a packet in frames.
42 }; 48 };
43 49
44 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ 50 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_
OLDNEW
« no previous file with comments | « media/audio/audio_output_proxy_unittest.cc ('k') | media/audio/audio_parameters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698