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

Side by Side Diff: media/audio/android/opensles_output.h

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 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
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_ANDROID_OPENSLES_OUTPUT_H_ 5 #ifndef MEDIA_AUDIO_ANDROID_OPENSLES_OUTPUT_H_
6 #define MEDIA_AUDIO_ANDROID_OPENSLES_OUTPUT_H_ 6 #define MEDIA_AUDIO_ANDROID_OPENSLES_OUTPUT_H_
7 7
8 #include <SLES/OpenSLES.h> 8 #include <SLES/OpenSLES.h>
9 #include <SLES/OpenSLES_Android.h> 9 #include <SLES/OpenSLES_Android.h>
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 SLPlayItf player_; 92 SLPlayItf player_;
93 93
94 // Buffer queue recorder interface. 94 // Buffer queue recorder interface.
95 SLAndroidSimpleBufferQueueItf simple_buffer_queue_; 95 SLAndroidSimpleBufferQueueItf simple_buffer_queue_;
96 96
97 SLDataFormat_PCM format_; 97 SLDataFormat_PCM format_;
98 98
99 // Audio buffers that are allocated in the constructor based on 99 // Audio buffers that are allocated in the constructor based on
100 // info from audio parameters. 100 // info from audio parameters.
101 uint8* audio_data_[kMaxNumOfBuffersInQueue]; 101 uint8_t* audio_data_[kMaxNumOfBuffersInQueue];
102 102
103 int active_buffer_index_; 103 int active_buffer_index_;
104 size_t buffer_size_bytes_; 104 size_t buffer_size_bytes_;
105 105
106 bool started_; 106 bool started_;
107 107
108 // Volume control coming from hardware. It overrides |volume_| when it's 108 // Volume control coming from hardware. It overrides |volume_| when it's
109 // true. Otherwise, use |volume_| for scaling. 109 // true. Otherwise, use |volume_| for scaling.
110 // This is needed because platform voice volume never goes to zero in 110 // This is needed because platform voice volume never goes to zero in
111 // COMMUNICATION mode on Android. 111 // COMMUNICATION mode on Android.
112 bool muted_; 112 bool muted_;
113 113
114 // Volume level from 0 to 1. 114 // Volume level from 0 to 1.
115 float volume_; 115 float volume_;
116 116
117 // Container for retrieving data from AudioSourceCallback::OnMoreData(). 117 // Container for retrieving data from AudioSourceCallback::OnMoreData().
118 scoped_ptr<AudioBus> audio_bus_; 118 scoped_ptr<AudioBus> audio_bus_;
119 119
120 DISALLOW_COPY_AND_ASSIGN(OpenSLESOutputStream); 120 DISALLOW_COPY_AND_ASSIGN(OpenSLESOutputStream);
121 }; 121 };
122 122
123 } // namespace media 123 } // namespace media
124 124
125 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_OUTPUT_H_ 125 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_OUTPUT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698