view Isolated/SimpleMutex.h @ 73:32757e494675

Fixed bug that sets the wrong variable for fading in Pause. There still seems to be another bug related to fading though based on Johnson Lin's test case. Audio no longer stops and triggers the completion callback, but the volume doesn't seem to go up to max for long fade-ins. Still investigating.
author Eric Wing <ewing . public |-at-| gmail . com>
date Fri, 10 Aug 2012 22:53:14 -0700
parents 398d1cb12448
children
line wrap: on
line source

/* Copyright: Eric Wing 2003 */

#ifndef SIMPLE_MUTEX_H
#define SIMPLE_MUTEX_H

#ifdef __cplusplus
extern "C" {
#endif

	#if defined(_WIN32)
		#if defined(SIMPLE_MUTEX_BUILD_LIBRARY)
			#define SIMPLE_MUTEX_DECLSPEC __declspec(dllexport)
		#else
			#define SIMPLE_MUTEX_DECLSPEC
		#endif
	#else
		#if defined(SIMPLE_MUTEX_BUILD_LIBRARY)
			#if defined (__GNUC__) && __GNUC__ >= 4
				#define SIMPLE_MUTEX_DECLSPEC __attribute__((visibility("default")))
			#else
				#define SIMPLE_MUTEX_DECLSPEC
			#endif
		#else
			#define SIMPLE_MUTEX_DECLSPEC
		#endif
	#endif

	#if defined(_WIN32)
		#define SIMPLE_MUTEX_CALL __cdecl
	#else
		#define SIMPLE_MUTEX_CALL
	#endif

typedef struct SimpleMutex SimpleMutex;

extern SIMPLE_MUTEX_DECLSPEC SimpleMutex* SIMPLE_MUTEX_CALL SimpleMutex_CreateMutex(void);
extern SIMPLE_MUTEX_DECLSPEC void SIMPLE_MUTEX_CALL SimpleMutex_DestroyMutex(SimpleMutex* simple_mutex);
extern SIMPLE_MUTEX_DECLSPEC int SIMPLE_MUTEX_CALL SimpleMutex_LockMutex(SimpleMutex* simple_mutex);
extern SIMPLE_MUTEX_DECLSPEC void SIMPLE_MUTEX_CALL SimpleMutex_UnlockMutex(SimpleMutex* simple_mutex);


/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif

#endif