Index: media/audio/android/opensles_util.h |
=================================================================== |
--- media/audio/android/opensles_util.h (revision 189667) |
+++ media/audio/android/opensles_util.h (working copy) |
@@ -5,9 +5,19 @@ |
#ifndef MEDIA_AUDIO_ANDROID_OPENSLES_UTIL_H_ |
#define MEDIA_AUDIO_ANDROID_OPENSLES_UTIL_H_ |
-#include "base/logging.h" |
#include <SLES/OpenSLES.h> |
+#include "base/logging.h" |
+ |
+#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
|
+ do { \ |
+ SLresult err = (op); \ |
+ if (err != SL_RESULT_SUCCESS) { \ |
+ DLOG(ERROR) << #op << " failed: " << err; \ |
+ return __VA_ARGS__; \ |
+ } \ |
+ } while (0) |
+ |
namespace media { |
template <typename SLType, typename SLDerefType> |