#include <stdio.h>
#include <dlog.h>
-#include <vconf.h>
#include "CAudioError.h"
#include "CAudioInfo.h"
#endif
#define LOG_TAG "TIZEN_N_AUDIO_IO"
-#define AUDIO_IO_LOGD(_fmt_, arg...) { \
+#define AUDIO_IO_LOGD(_fmt_, arg...) do { \
LOGI(_fmt_, ##arg); \
-}
+} while (0)
-#define AUDIO_IO_LOGW(_fmt_, arg...) { \
+#define AUDIO_IO_LOGW(_fmt_, arg...) do { \
LOGW(_fmt_, ##arg); \
-}
+} while (0)
-#define AUDIO_IO_LOGE(_fmt_, arg...) { \
+#define AUDIO_IO_LOGE(_fmt_, arg...) do { \
LOGE(_fmt_, ##arg); \
-}
+} while (0)
#define _AUDIO_IO_SHELL_COLOR_
#ifdef _AUDIO_IO_SHELL_COLOR_
#endif
-#define RET_ERROR(_x_) {return CAudioError((_x_), __FILE__, __func__, __LINE__);};
-#define RET_ERROR_MSG(_x_, _msg_) {return CAudioError((_x_), (_msg_), __FILE__, __func__, __LINE__);};
+#define RET_ERROR(_x_) do {return CAudioError((_x_), __FILE__, __func__, __LINE__);} while(0)
+#define RET_ERROR_MSG(_x_, _msg_) do {return CAudioError((_x_), (_msg_), __FILE__, __func__, __LINE__);} while(0)
-#define RET_ERROR_MSG_FORMAT(_x_, _format_, ...) { \
+#define RET_ERROR_MSG_FORMAT(_x_, _format_, ...) do { \
char _msg_[CAudioError::MSG_LENGTH] = {0, }; \
snprintf(_msg_, CAudioError::MSG_LENGTH, _format_, ##__VA_ARGS__); \
return CAudioError((_x_), (_msg_), __FILE__, __func__, __LINE__); \
-};
+} while (0)
-#define THROW_ERROR(_x_) {throw CAudioError((_x_), __FILE__, __func__, __LINE__);};
-#define THROW_ERROR_MSG(_x_, _msg_) {throw CAudioError((_x_), (_msg_), __FILE__, __func__, __LINE__);};
+#define THROW_ERROR(_x_) do {throw CAudioError((_x_), __FILE__, __func__, __LINE__);} while (0)
+#define THROW_ERROR_MSG(_x_, _msg_) do {throw CAudioError((_x_), (_msg_), __FILE__, __func__, __LINE__);} while (0)
-#define THROW_ERROR_MSG_FORMAT(_x_, _format_, ...) { \
+#define THROW_ERROR_MSG_FORMAT(_x_, _format_, ...) do { \
char _msg_[CAudioError::MSG_LENGTH] = {0, }; \
snprintf(_msg_, CAudioError::MSG_LENGTH, _format_, ##__VA_ARGS__); \
throw CAudioError((_x_), (_msg_), __FILE__, __func__, __LINE__); \
-};
+} while (0)
#define VALID_POINTER_START(_x_) { \
if ((_x_) != NULL) {
#define VALID_POINTER_END } \
}
-#define SAFE_DELETE(_x_) {if ((_x_)) {delete (_x_); (_x_) = NULL;}};
-#define SAFE_FINALIZE(_x_) {if ((_x_)) {(_x_)->finalize();}};
-#define SAFE_REMOVE(_x_) {if ((_x_)) {(_x_)->finalize(); delete (_x_); (_x_) = NULL;}};
+#define SAFE_DELETE(_x_) do {if ((_x_)) {delete (_x_); (_x_) = NULL;}} while (0)
+#define SAFE_FINALIZE(_x_) do {if ((_x_)) {(_x_)->finalize();}} while (0)
+#define SAFE_REMOVE(_x_) do {if ((_x_)) {(_x_)->finalize(); delete (_x_); (_x_) = NULL;}} while (0)
#define DEFAULT_PERIOD_SIZE 50
#endif
-#endif /* __TIZEN_MEDIA_CPP_OBJECTS_IO_H__ */
+#endif /* __TIZEN_MEDIA_AUDIO_IO_CAUDIO_DEF_H__ */