mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 08:44:04 +02:00
Add notes for iOS.
This commit is contained in:
@@ -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
|
|||||||
- WASAPI
|
- WASAPI
|
||||||
- DirectSound
|
- DirectSound
|
||||||
- WinMM
|
- WinMM
|
||||||
- Core Audio
|
- Core Audio (Apple)
|
||||||
- ALSA
|
- ALSA
|
||||||
- PulseAudio
|
- PulseAudio
|
||||||
- JACK
|
- JACK
|
||||||
|
|||||||
@@ -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
|
|||||||
[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);
|
||||||
|
|||||||
Reference in New Issue
Block a user