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

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

Issue 12806009: Add OpenSL configurations (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: Addressed comments 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
« no previous file with comments | « media/audio/android/opensles_output.cc ('k') | no next file » | 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>
9
8 #include "base/logging.h" 10 #include "base/logging.h"
9 #include <SLES/OpenSLES.h> 11
12 #define LOG_ON_FAILURE_AND_RETURN(op, ...) \
Ami GONE FROM CHROMIUM 2013/03/23 20:07:21 This can't live in a header. http://google-stylegu
13 do { \
14 SLresult err = (op); \
15 if (err != SL_RESULT_SUCCESS) { \
16 DLOG(ERROR) << #op << " failed: " << err; \
17 return __VA_ARGS__; \
18 } \
19 } while (0)
10 20
11 namespace media { 21 namespace media {
12 22
13 template <typename SLType, typename SLDerefType> 23 template <typename SLType, typename SLDerefType>
14 class ScopedSLObject { 24 class ScopedSLObject {
15 public: 25 public:
16 ScopedSLObject() : obj_(NULL) {} 26 ScopedSLObject() : obj_(NULL) {}
17 27
18 ~ScopedSLObject() { Reset(); } 28 ~ScopedSLObject() { Reset(); }
19 29
(...skipping 15 matching lines...) Expand all
35 45
36 private: 46 private:
37 SLType obj_; 47 SLType obj_;
38 }; 48 };
39 49
40 typedef ScopedSLObject<SLObjectItf, const SLObjectItf_*> ScopedSLObjectItf; 50 typedef ScopedSLObject<SLObjectItf, const SLObjectItf_*> ScopedSLObjectItf;
41 51
42 } // namespace media 52 } // namespace media
43 53
44 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_UTIL_H_ 54 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_UTIL_H_
OLDNEW
« no previous file with comments | « media/audio/android/opensles_output.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698