From dd26ad9d45530a0b14159758c07175f1d2fe0018 Mon Sep 17 00:00:00 2001 From: David Reid Date: Sat, 22 Oct 2016 08:30:26 +1000 Subject: [PATCH] Fix the Android build and fix a few typos. --- mini_al.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mini_al.h b/mini_al.h index 728eba09..fd22d43b 100644 --- a/mini_al.h +++ b/mini_al.h @@ -149,9 +149,12 @@ extern "C" { #endif #else #define MAL_POSIX - #if !defined(MAL_NO_ALSA) && defined(__linux__) + #if !defined(MAL_NO_ALSA) && defined(__linux__) && !defined(__ANDROID__) #define MAL_ENABLE_ALSA #endif + #ifdef __ANDROID__ + #define MAL_ENABLE_OPENSLES + #endif #include // Unfortunate #include, but needed for pthread_t, pthread_mutex_t and pthread_cond_t types. #endif @@ -469,7 +472,7 @@ void mal_device_set_stop_callback(mal_device* pDevice, mal_stop_proc proc); // recording. // // For a playback device, this will retrieve an initial chunk of audio data from the client before -// returning. This reason for this is to ensure there is valid audio data in the buffer, which needs +// returning. The reason for this is to ensure there is valid audio data in the buffer, which needs // to be done _before_ the device starts playing back audio. // // Return Value: @@ -564,7 +567,7 @@ mal_uint32 mal_device_get_available_rewind_amount(mal_device* pDevice); // This currently waits on a mutex for thread-safety, but should otherwise be fairly efficient. mal_uint32 mal_device_rewind(mal_device* pDevice, mal_uint32 framesToRewind); -// Retrieves the size of the in bytes for the given device. +// Retrieves the size of the buffer in bytes for the given device. // // Thread Safety: SAFE // This is calculated from constant values which are set at initialization time and never change.