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

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

Issue 1921963004: Add support for multichannel playback to OpenSLES output. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid multichannel on KitKat. Created 4 years, 7 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 | « media/audio/android/opensles_output.cc ('k') | media/audio/android/opensles_util.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) 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_UTIL_H_ 5 #ifndef MEDIA_AUDIO_ANDROID_OPENSLES_UTIL_H_
6 #define MEDIA_AUDIO_ANDROID_OPENSLES_UTIL_H_ 6 #define MEDIA_AUDIO_ANDROID_OPENSLES_UTIL_H_
7 7
8 #include <SLES/OpenSLES.h> 8 #include <SLES/OpenSLES.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "media/base/media_export.h"
11 12
12 namespace media { 13 namespace media {
13 14
14 template <typename SLType, typename SLDerefType> 15 template <typename SLType, typename SLDerefType>
15 class ScopedSLObject { 16 class ScopedSLObject {
16 public: 17 public:
17 ScopedSLObject() : obj_(NULL) {} 18 ScopedSLObject() : obj_(NULL) {}
18 19
19 ~ScopedSLObject() { Reset(); } 20 ~ScopedSLObject() { Reset(); }
20 21
(...skipping 12 matching lines...) Expand all
33 obj_ = NULL; 34 obj_ = NULL;
34 } 35 }
35 } 36 }
36 37
37 private: 38 private:
38 SLType obj_; 39 SLType obj_;
39 }; 40 };
40 41
41 typedef ScopedSLObject<SLObjectItf, const SLObjectItf_*> ScopedSLObjectItf; 42 typedef ScopedSLObject<SLObjectItf, const SLObjectItf_*> ScopedSLObjectItf;
42 43
44 // Guesses the channel mask for a given channel count. Android does not offer a
45 // way to configure the layout, so this will be incorrect for less common
46 // channel layouts.
47 MEDIA_EXPORT SLuint32 ChannelCountToSLESChannelMask(int channel_count);
48
43 } // namespace media 49 } // namespace media
44 50
45 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_UTIL_H_ 51 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_UTIL_H_
OLDNEW
« no previous file with comments | « media/audio/android/opensles_output.cc ('k') | media/audio/android/opensles_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698