Commit a551e587 authored by David Reid's avatar David Reid

Add notes for iOS.

parent 1ad3883e
...@@ -22,7 +22,7 @@ Features ...@@ -22,7 +22,7 @@ Features
Supported Platforms Supported Platforms
=================== ===================
- Windows (XP+) - Windows (XP+)
- macOS - macOS, iOS
- Linux - Linux
- BSD - BSD
- Android - Android
...@@ -35,7 +35,7 @@ Backends ...@@ -35,7 +35,7 @@ Backends
- WASAPI - WASAPI
- DirectSound - DirectSound
- WinMM - WinMM
- Core Audio - Core Audio (Apple)
- ALSA - ALSA
- PulseAudio - PulseAudio
- JACK - JACK
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
// Building for macOS // Building for macOS
// ------------------ // ------------------
// The macOS build should compile clean without the need to download any dependencies or link to any libraries or // The macOS build should compile clean without the need to download any dependencies or link to any libraries or
// frameworks. // frameworks. The iOS build will need to link the relevant frameworks but should Just Work with Xcode.
// //
// Building for Linux // Building for Linux
// ------------------ // ------------------
...@@ -14121,6 +14121,12 @@ mal_result mal_device_init__coreaudio(mal_context* pContext, mal_device_type dev ...@@ -14121,6 +14121,12 @@ mal_result mal_device_init__coreaudio(mal_context* pContext, mal_device_type dev
[pAudioSession setPreferredSampleRate:(double)pDevice->sampleRate error:nil]; [pAudioSession setPreferredSampleRate:(double)pDevice->sampleRate error:nil];
bestFormat.mSampleRate = pAudioSession.sampleRate; bestFormat.mSampleRate = pAudioSession.sampleRate;
} }
status = ((mal_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)((AudioUnit)pDevice->coreaudio.audioUnit, kAudioUnitProperty_StreamFormat, formatScope, formatElement, &bestFormat, sizeof(bestFormat));
if (status != noErr) {
((mal_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)((AudioUnit)pDevice->coreaudio.audioUnit);
return mal_result_from_OSStatus(status);
}
#endif #endif
result = mal_format_from_AudioStreamBasicDescription(&bestFormat, &pDevice->internalFormat); result = mal_format_from_AudioStreamBasicDescription(&bestFormat, &pDevice->internalFormat);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment