OLD | NEW |
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> | |
10 | 11 |
11 namespace media { | 12 namespace media { |
12 | 13 |
13 template <typename SLType, typename SLDerefType> | 14 template <typename SLType, typename SLDerefType> |
14 class ScopedSLObject { | 15 class ScopedSLObject { |
15 public: | 16 public: |
16 ScopedSLObject() : obj_(NULL) {} | 17 ScopedSLObject() : obj_(NULL) {} |
17 | 18 |
18 ~ScopedSLObject() { Reset(); } | 19 ~ScopedSLObject() { Reset(); } |
19 | 20 |
(...skipping 15 matching lines...) Expand all Loading... |
35 | 36 |
36 private: | 37 private: |
37 SLType obj_; | 38 SLType obj_; |
38 }; | 39 }; |
39 | 40 |
40 typedef ScopedSLObject<SLObjectItf, const SLObjectItf_*> ScopedSLObjectItf; | 41 typedef ScopedSLObject<SLObjectItf, const SLObjectItf_*> ScopedSLObjectItf; |
41 | 42 |
42 } // namespace media | 43 } // namespace media |
43 | 44 |
44 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_UTIL_H_ | 45 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_UTIL_H_ |
OLD | NEW |