summaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-12-12 14:36:58 -0800
committerChris Robinson <[email protected]>2012-12-12 14:36:58 -0800
commitbe25e6802dacad78876c6fa1d6a5c63797b8a9ed (patch)
tree0843aa6e354fb8fd156a85e16278f3fe7e9c04a5 /Alc
parent9b6a226da55a987cb883f425eeb568776ea12c8d (diff)
Add support for OpenSL ES 1.0.1 on Android
Diffstat (limited to 'Alc')
-rw-r--r--Alc/backends/opensl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/Alc/backends/opensl.c b/Alc/backends/opensl.c
index a010f9b7..1a104029 100644
--- a/Alc/backends/opensl.c
+++ b/Alc/backends/opensl.c
@@ -152,9 +152,15 @@ static const char *res_str(SLresult result)
case SL_RESULT_UNKNOWN_ERROR: return "Unknown error";
case SL_RESULT_OPERATION_ABORTED: return "Operation aborted";
case SL_RESULT_CONTROL_LOST: return "Control lost";
+#ifdef SL_RESULT_READONLY
case SL_RESULT_READONLY: return "ReadOnly";
+#endif
+#ifdef SL_RESULT_ENGINEOPTION_UNSUPPORTED
case SL_RESULT_ENGINEOPTION_UNSUPPORTED: return "Engine option unsupported";
+#endif
+#ifdef SL_RESULT_SOURCE_SINK_INCOMPATIBLE
case SL_RESULT_SOURCE_SINK_INCOMPATIBLE: return "Source/Sink incompatible";
+#endif
}
return "Unknown error code";
}
@@ -293,7 +299,8 @@ static ALCboolean opensl_reset_playback(ALCdevice *Device)
format_pcm.bitsPerSample = BytesFromDevFmt(Device->FmtType) * 8;
format_pcm.containerSize = format_pcm.bitsPerSample;
format_pcm.channelMask = GetChannelMask(Device->FmtChans);
- format_pcm.endianness = SL_BYTEORDER_NATIVE;
+ format_pcm.endianness = IS_LITTLE_ENDIAN ? SL_BYTEORDER_LITTLEENDIAN :
+ SL_BYTEORDER_BIGENDIAN;
audioSrc.pLocator = &loc_bufq;
audioSrc.pFormat = &format_pcm;