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

Side by Side Diff: media/audio/mac/audio_auhal_mac.h

Issue 2683033003: Tell CoreAudio how to interpret Chrome's channel layout. (Closed)
Patch Set: Fix 8ch+ discrete layouts. Created 3 years, 10 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
« no previous file with comments | « no previous file | media/audio/mac/audio_auhal_mac.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // Implementation notes: 5 // Implementation notes:
6 // 6 //
7 // - It is recommended to first acquire the native sample rate of the default 7 // - It is recommended to first acquire the native sample rate of the default
8 // output device and then use the same rate when creating this object. 8 // output device and then use the same rate when creating this object.
9 // Use AudioManagerMac::HardwareSampleRate() to retrieve the sample rate. 9 // Use AudioManagerMac::HardwareSampleRate() to retrieve the sample rate.
10 // - Calling Close() also leads to self destruction. 10 // - Calling Close() also leads to self destruction.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // Returns the playout time for a given AudioTimeStamp. 134 // Returns the playout time for a given AudioTimeStamp.
135 base::TimeTicks GetPlayoutTime(const AudioTimeStamp* output_time_stamp); 135 base::TimeTicks GetPlayoutTime(const AudioTimeStamp* output_time_stamp);
136 136
137 // Updates playout timestamp, current lost frames, and total lost frames and 137 // Updates playout timestamp, current lost frames, and total lost frames and
138 // glitches. 138 // glitches.
139 void UpdatePlayoutTimestamp(const AudioTimeStamp* timestamp); 139 void UpdatePlayoutTimestamp(const AudioTimeStamp* timestamp);
140 140
141 // Called from the dtor and when the stream is reset. 141 // Called from the dtor and when the stream is reset.
142 void ReportAndResetStats(); 142 void ReportAndResetStats();
143 143
144 // Converts |params_.channel_layout()| into CoreAudio format and sets up the
145 // AUHAL with our layout information so it knows how to remap the channels.
146 void SetAudioChannelLayout();
147
144 // Our creator, the audio manager needs to be notified when we close. 148 // Our creator, the audio manager needs to be notified when we close.
145 AudioManagerMac* const manager_; 149 AudioManagerMac* const manager_;
146 150
147 const AudioParameters params_; 151 const AudioParameters params_;
148 // For convenience - same as in params_. 152 // For convenience - same as in params_.
149 const int output_channels_; 153 const int output_channels_;
150 154
151 // Size of audio buffer requested at construction. The actual buffer size 155 // Size of audio buffer requested at construction. The actual buffer size
152 // is given by |actual_io_buffer_frame_size_| and it can differ from the 156 // is given by |actual_io_buffer_frame_size_| and it can differ from the
153 // requested size. 157 // requested size.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // Used to make sure control functions (Start(), Stop() etc) are called on the 226 // Used to make sure control functions (Start(), Stop() etc) are called on the
223 // right thread. 227 // right thread.
224 base::ThreadChecker thread_checker_; 228 base::ThreadChecker thread_checker_;
225 229
226 DISALLOW_COPY_AND_ASSIGN(AUHALStream); 230 DISALLOW_COPY_AND_ASSIGN(AUHALStream);
227 }; 231 };
228 232
229 } // namespace media 233 } // namespace media
230 234
231 #endif // MEDIA_AUDIO_MAC_AUDIO_AUHAL_MAC_H_ 235 #endif // MEDIA_AUDIO_MAC_AUDIO_AUHAL_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | media/audio/mac/audio_auhal_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698