Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
miniaudio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
miniaudio
Commits
6c7f6cd3
Commit
6c7f6cd3
authored
Dec 21, 2019
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Core Audio: Try fixing a compilation error when targeting tvOS and watchOS.
Public issue #108
parent
c03c12dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
miniaudio.h
miniaudio.h
+9
-0
No files found.
miniaudio.h
View file @
6c7f6cd3
...
@@ -17938,6 +17938,12 @@ Core Audio Backend
...
@@ -17938,6 +17938,12 @@ Core Audio Backend
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1
#define MA_APPLE_MOBILE
#define MA_APPLE_MOBILE
#if defined(TARGET_OS_TV) && TARGET_OS_TV == 1
#define MA_APPLE_TV
#endif
#if defined(TARGET_OS_WATCH) && TARGET_OS_WATCH == 1
#define MA_APPLE_WATCH
#endif
#else
#else
#define MA_APPLE_DESKTOP
#define MA_APPLE_DESKTOP
#endif
#endif
...
@@ -20595,11 +20601,14 @@ ma_result ma_context_init__coreaudio(const ma_context_config* pConfig, ma_contex
...
@@ -20595,11 +20601,14 @@ ma_result ma_context_init__coreaudio(const ma_context_config* pConfig, ma_contex
[pAudioSession setCategory: AVAudioSessionCategoryPlayAndRecord withOptions:options error:nil];
[pAudioSession setCategory: AVAudioSessionCategoryPlayAndRecord withOptions:options error:nil];
/* AVAudioSessionPortOverrideSpeaker is not available on Apple TV OS nor Apple Watch OS. */
#if !defined(MA_APPLE_TV) && !defined(MA_APPLE_WATCH)
/* By default we want miniaudio to use the speakers instead of the receiver. In the future this may be customizable. */
/* By default we want miniaudio to use the speakers instead of the receiver. In the future this may be customizable. */
ma_bool32 useSpeakers = MA_TRUE;
ma_bool32 useSpeakers = MA_TRUE;
if (useSpeakers) {
if (useSpeakers) {
[pAudioSession overrideOutputAudioPort:AVAudioSessionPortOverrideSpeaker error:nil];
[pAudioSession overrideOutputAudioPort:AVAudioSessionPortOverrideSpeaker error:nil];
}
}
#endif
}
}
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment