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
36189adb
Commit
36189adb
authored
Jul 02, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Core Audio: Try fixing build on older versions of macOS.
parent
a551e587
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
mini_al.h
mini_al.h
+13
-3
No files found.
mini_al.h
View file @
36189adb
...
@@ -12653,7 +12653,8 @@ mal_result mal_result_from_OSStatus(OSStatus status)
...
@@ -12653,7 +12653,8 @@ mal_result mal_result_from_OSStatus(OSStatus status)
}
}
}
}
mal_channel mal_channel_from_AudioChannelBit(AudioChannelBitmap bit)
#if 0
mal_channel mal_channel_from_AudioChannelBitmap(AudioChannelBitmap bit)
{
{
switch (bit)
switch (bit)
{
{
...
@@ -12678,6 +12679,7 @@ mal_channel mal_channel_from_AudioChannelBit(AudioChannelBitmap bit)
...
@@ -12678,6 +12679,7 @@ mal_channel mal_channel_from_AudioChannelBit(AudioChannelBitmap bit)
default: return MAL_CHANNEL_NONE;
default: return MAL_CHANNEL_NONE;
}
}
}
}
#endif
mal_channel mal_channel_from_AudioChannelLabel(AudioChannelLabel label)
mal_channel mal_channel_from_AudioChannelLabel(AudioChannelLabel label)
{
{
...
@@ -12747,6 +12749,8 @@ mal_channel mal_channel_from_AudioChannelLabel(AudioChannelLabel label)
...
@@ -12747,6 +12749,8 @@ mal_channel mal_channel_from_AudioChannelLabel(AudioChannelLabel label)
case kAudioChannelLabel_Discrete_14: return MAL_CHANNEL_AUX_14;
case kAudioChannelLabel_Discrete_14: return MAL_CHANNEL_AUX_14;
case kAudioChannelLabel_Discrete_15: return MAL_CHANNEL_AUX_15;
case kAudioChannelLabel_Discrete_15: return MAL_CHANNEL_AUX_15;
case kAudioChannelLabel_Discrete_65535: return MAL_CHANNEL_NONE;
case kAudioChannelLabel_Discrete_65535: return MAL_CHANNEL_NONE;
#if 0 // Introduced in a later version of macOS.
case kAudioChannelLabel_HOA_ACN: return MAL_CHANNEL_NONE;
case kAudioChannelLabel_HOA_ACN: return MAL_CHANNEL_NONE;
case kAudioChannelLabel_HOA_ACN_0: return MAL_CHANNEL_AUX_0;
case kAudioChannelLabel_HOA_ACN_0: return MAL_CHANNEL_AUX_0;
case kAudioChannelLabel_HOA_ACN_1: return MAL_CHANNEL_AUX_1;
case kAudioChannelLabel_HOA_ACN_1: return MAL_CHANNEL_AUX_1;
...
@@ -12765,6 +12769,8 @@ mal_channel mal_channel_from_AudioChannelLabel(AudioChannelLabel label)
...
@@ -12765,6 +12769,8 @@ mal_channel mal_channel_from_AudioChannelLabel(AudioChannelLabel label)
case kAudioChannelLabel_HOA_ACN_14: return MAL_CHANNEL_AUX_14;
case kAudioChannelLabel_HOA_ACN_14: return MAL_CHANNEL_AUX_14;
case kAudioChannelLabel_HOA_ACN_15: return MAL_CHANNEL_AUX_15;
case kAudioChannelLabel_HOA_ACN_15: return MAL_CHANNEL_AUX_15;
case kAudioChannelLabel_HOA_ACN_65024: return MAL_CHANNEL_NONE;
case kAudioChannelLabel_HOA_ACN_65024: return MAL_CHANNEL_NONE;
#endif
default: return MAL_CHANNEL_NONE;
default: return MAL_CHANNEL_NONE;
}
}
}
}
...
@@ -13082,7 +13088,9 @@ mal_result mal_get_channel_map_from_AudioChannelLayout(AudioChannelLayout* pChan
...
@@ -13082,7 +13088,9 @@ mal_result mal_get_channel_map_from_AudioChannelLayout(AudioChannelLayout* pChan
for (UInt32 iChannel = 0; iChannel < pChannelLayout->mNumberChannelDescriptions; ++iChannel) {
for (UInt32 iChannel = 0; iChannel < pChannelLayout->mNumberChannelDescriptions; ++iChannel) {
channelMap[iChannel] = mal_channel_from_AudioChannelLabel(pChannelLayout->mChannelDescriptions[iChannel].mChannelLabel);
channelMap[iChannel] = mal_channel_from_AudioChannelLabel(pChannelLayout->mChannelDescriptions[iChannel].mChannelLabel);
}
}
} else if (pChannelLayout->mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelBitmap) {
} else
#if 0
if (pChannelLayout->mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelBitmap) {
// This is the same kind of system that's used by Windows audio APIs.
// This is the same kind of system that's used by Windows audio APIs.
UInt32 iChannel = 0;
UInt32 iChannel = 0;
AudioChannelBitmap bitmap = pChannelLayout->mChannelBitmap;
AudioChannelBitmap bitmap = pChannelLayout->mChannelBitmap;
...
@@ -13092,7 +13100,9 @@ mal_result mal_get_channel_map_from_AudioChannelLayout(AudioChannelLayout* pChan
...
@@ -13092,7 +13100,9 @@ mal_result mal_get_channel_map_from_AudioChannelLayout(AudioChannelLayout* pChan
channelMap[iChannel++] = mal_channel_from_AudioChannelBit(bit);
channelMap[iChannel++] = mal_channel_from_AudioChannelBit(bit);
}
}
}
}
} else {
} else
#endif
{
// Need to use the tag to determine the channel map. For now I'm just assuming a default channel map, but later on this should
// Need to use the tag to determine the channel map. For now I'm just assuming a default channel map, but later on this should
// be updated to determine the mapping based on the tag.
// be updated to determine the mapping based on the tag.
UInt32 channelCount = AudioChannelLayoutTag_GetNumberOfChannels(pChannelLayout->mChannelLayoutTag);
UInt32 channelCount = AudioChannelLayoutTag_GetNumberOfChannels(pChannelLayout->mChannelLayoutTag);
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