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

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

Issue 12387006: Pass more detailed audio hardware configuration information to the renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 int GetBytesPerFrame() const; 69 int GetBytesPerFrame() const;
70 70
71 Format format() const { return format_; } 71 Format format() const { return format_; }
72 ChannelLayout channel_layout() const { return channel_layout_; } 72 ChannelLayout channel_layout() const { return channel_layout_; }
73 int sample_rate() const { return sample_rate_; } 73 int sample_rate() const { return sample_rate_; }
74 int bits_per_sample() const { return bits_per_sample_; } 74 int bits_per_sample() const { return bits_per_sample_; }
75 int frames_per_buffer() const { return frames_per_buffer_; } 75 int frames_per_buffer() const { return frames_per_buffer_; }
76 int channels() const { return channels_; } 76 int channels() const { return channels_; }
77 int input_channels() const { return input_channels_; } 77 int input_channels() const { return input_channels_; }
78 78
79 // Set to CHANNEL_LAYOUT_DISCRETE with given number of channels.
80 void SetDiscreteChannels(int channels);
81
79 private: 82 private:
80 Format format_; // Format of the stream. 83 Format format_; // Format of the stream.
81 ChannelLayout channel_layout_; // Order of surround sound channels. 84 ChannelLayout channel_layout_; // Order of surround sound channels.
82 int sample_rate_; // Sampling frequency/rate. 85 int sample_rate_; // Sampling frequency/rate.
83 int bits_per_sample_; // Number of bits per sample. 86 int bits_per_sample_; // Number of bits per sample.
84 int frames_per_buffer_; // Number of frames in a buffer. 87 int frames_per_buffer_; // Number of frames in a buffer.
85 88
86 int channels_; // Number of channels. Value set based on 89 int channels_; // Number of channels. Value set based on
87 // |channel_layout|. 90 // |channel_layout|.
88 int input_channels_; // Optional number of input channels. 91 int input_channels_; // Optional number of input channels.
(...skipping 12 matching lines...) Expand all
101 if (a.sample_rate() != b.sample_rate()) 104 if (a.sample_rate() != b.sample_rate())
102 return a.sample_rate() < b.sample_rate(); 105 return a.sample_rate() < b.sample_rate();
103 if (a.bits_per_sample() != b.bits_per_sample()) 106 if (a.bits_per_sample() != b.bits_per_sample())
104 return a.bits_per_sample() < b.bits_per_sample(); 107 return a.bits_per_sample() < b.bits_per_sample();
105 return a.frames_per_buffer() < b.frames_per_buffer(); 108 return a.frames_per_buffer() < b.frames_per_buffer();
106 } 109 }
107 110
108 } // namespace media 111 } // namespace media
109 112
110 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ 113 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698