mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
Try fixing a bug on iOS.
This commit is contained in:
@@ -15568,6 +15568,15 @@ mal_result mal_context_init__coreaudio(mal_context* pContext)
|
|||||||
{
|
{
|
||||||
mal_assert(pContext != NULL);
|
mal_assert(pContext != NULL);
|
||||||
|
|
||||||
|
#if defined(MAL_APPLE_MOBILE)
|
||||||
|
@autoreleasepool {
|
||||||
|
AVAudioSession* pAudioSession = [AVAudioSession sharedInstance];
|
||||||
|
mal_assert(pAudioSession != NULL);
|
||||||
|
|
||||||
|
[pAudioSession setCategory: AVAudioSessionCategoryPlayAndRecord error:nil];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(MAL_NO_RUNTIME_LINKING) && !defined(MAL_APPLE_MOBILE)
|
#if !defined(MAL_NO_RUNTIME_LINKING) && !defined(MAL_APPLE_MOBILE)
|
||||||
pContext->coreaudio.hCoreFoundation = mal_dlopen("CoreFoundation.framework/CoreFoundation");
|
pContext->coreaudio.hCoreFoundation = mal_dlopen("CoreFoundation.framework/CoreFoundation");
|
||||||
if (pContext->coreaudio.hCoreFoundation == NULL) {
|
if (pContext->coreaudio.hCoreFoundation == NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user