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

Side by Side Diff: webrtc/modules/audio_device/android/opensles_player.h

Issue 1316523002: Convert channel counts to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Fix compile Created 4 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // attached to the Dalvik VM. 87 // attached to the Dalvik VM.
88 static void SimpleBufferQueueCallback(SLAndroidSimpleBufferQueueItf caller, 88 static void SimpleBufferQueueCallback(SLAndroidSimpleBufferQueueItf caller,
89 void* context); 89 void* context);
90 void FillBufferQueue(); 90 void FillBufferQueue();
91 // Reads audio data in PCM format using the AudioDeviceBuffer. 91 // Reads audio data in PCM format using the AudioDeviceBuffer.
92 // Can be called both on the main thread (during Start()) and from the 92 // Can be called both on the main thread (during Start()) and from the
93 // internal audio thread while output streaming is active. 93 // internal audio thread while output streaming is active.
94 void EnqueuePlayoutData(); 94 void EnqueuePlayoutData();
95 95
96 // Configures the SL_DATAFORMAT_PCM structure. 96 // Configures the SL_DATAFORMAT_PCM structure.
97 SLDataFormat_PCM CreatePCMConfiguration(int channels, 97 SLDataFormat_PCM CreatePCMConfiguration(size_t channels,
98 int sample_rate, 98 int sample_rate,
99 size_t bits_per_sample); 99 size_t bits_per_sample);
100 100
101 // Allocate memory for audio buffers which will be used to render audio 101 // Allocate memory for audio buffers which will be used to render audio
102 // via the SLAndroidSimpleBufferQueueItf interface. 102 // via the SLAndroidSimpleBufferQueueItf interface.
103 void AllocateDataBuffers(); 103 void AllocateDataBuffers();
104 104
105 // Creates/destroys the main engine object and the SLEngineItf interface. 105 // Creates/destroys the main engine object and the SLEngineItf interface.
106 bool CreateEngine(); 106 bool CreateEngine();
107 void DestroyEngine(); 107 void DestroyEngine();
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // properties. This interface is supported on the Audio Player object. 196 // properties. This interface is supported on the Audio Player object.
197 SLVolumeItf volume_; 197 SLVolumeItf volume_;
198 198
199 // Last time the OpenSL ES layer asked for audio data to play out. 199 // Last time the OpenSL ES layer asked for audio data to play out.
200 uint32_t last_play_time_; 200 uint32_t last_play_time_;
201 }; 201 };
202 202
203 } // namespace webrtc 203 } // namespace webrtc
204 204
205 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_PLAYER_H_ 205 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_PLAYER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/android/audio_track_jni.cc ('k') | webrtc/modules/audio_device/android/opensles_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698