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
5a8d786c
Commit
5a8d786c
authored
Dec 26, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compiler errors with the Web Audio backend.
parent
2eb6b39a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
mini_al.h
mini_al.h
+7
-3
No files found.
mini_al.h
View file @
5a8d786c
...
@@ -1409,7 +1409,7 @@ typedef union
...
@@ -1409,7 +1409,7 @@ typedef union
mal_uint32 opensl; // OpenSL|ES uses a 32-bit unsigned integer for identification.
mal_uint32 opensl; // OpenSL|ES uses a 32-bit unsigned integer for identification.
#endif
#endif
#ifdef MAL_SUPPORT_WEBAUDIO
#ifdef MAL_SUPPORT_WEBAUDIO
int webaudio; // Web Audio always uses default devices for now
.
char webaudio[32]; // Web Audio always uses default devices for now, but if this changes it'll be a GUID
.
#endif
#endif
#ifdef MAL_SUPPORT_OPENAL
#ifdef MAL_SUPPORT_OPENAL
char openal[256]; // OpenAL seems to use human-readable device names as the ID.
char openal[256]; // OpenAL seems to use human-readable device names as the ID.
...
@@ -3776,6 +3776,9 @@ mal_uint32 mal_get_standard_sample_rate_priority_index(mal_uint32 sampleRate)
...
@@ -3776,6 +3776,9 @@ mal_uint32 mal_get_standard_sample_rate_priority_index(mal_uint32 sampleRate)
#ifdef MAL_ENABLE_OPENSL
#ifdef MAL_ENABLE_OPENSL
#define MAL_HAS_OPENSL // OpenSL is the only supported backend for Android. It must be present.
#define MAL_HAS_OPENSL // OpenSL is the only supported backend for Android. It must be present.
#endif
#endif
#ifdef MAL_ENABLE_WEBAUDIO
#define MAL_HAS_WEBAUDIO
#endif
#ifdef MAL_ENABLE_OPENAL
#ifdef MAL_ENABLE_OPENAL
#define MAL_HAS_OPENAL
#define MAL_HAS_OPENAL
#ifdef MAL_NO_RUNTIME_LINKING
#ifdef MAL_NO_RUNTIME_LINKING
...
@@ -18714,7 +18717,7 @@ mal_result mal_context_init__opensl(mal_context* pContext)
...
@@ -18714,7 +18717,7 @@ mal_result mal_context_init__opensl(mal_context* pContext)
//
//
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#ifdef MAL_HAS_WEBAUDIO
#ifdef MAL_HAS_WEBAUDIO
#include <emscripten.h>
#include <emscripten
/emscripten
.h>
mal_bool32 mal_context_is_device_id_equal__webaudio(mal_context* pContext, const mal_device_id* pID0, const mal_device_id* pID1)
mal_bool32 mal_context_is_device_id_equal__webaudio(mal_context* pContext, const mal_device_id* pID0, const mal_device_id* pID1)
{
{
...
@@ -18758,7 +18761,7 @@ mal_result mal_context_get_device_info__webaudio(mal_context* pContext, mal_devi
...
@@ -18758,7 +18761,7 @@ mal_result mal_context_get_device_info__webaudio(mal_context* pContext, mal_devi
mal_assert(pContext != NULL);
mal_assert(pContext != NULL);
(void)shareMode;
(void)shareMode;
pDeviceInfo->id.webaudio = 0
;
mal_zero_memory(pDeviceInfo->id.webaudio, sizeof(pDeviceInfo->id.webaudio))
;
// Only supporting default devices for now.
// Only supporting default devices for now.
if (deviceType == mal_device_type_playback) {
if (deviceType == mal_device_type_playback) {
...
@@ -18774,6 +18777,7 @@ mal_result mal_context_get_device_info__webaudio(mal_context* pContext, mal_devi
...
@@ -18774,6 +18777,7 @@ mal_result mal_context_get_device_info__webaudio(mal_context* pContext, mal_devi
pDeviceInfo->maxChannels = 32; /* Maximum output channel count is 32 for createScriptProcessor() (JavaScript). */
pDeviceInfo->maxChannels = 32; /* Maximum output channel count is 32 for createScriptProcessor() (JavaScript). */
}
}
// TODO: Change this to the actual sample rate. Can maybe initialize a temporary AudioContext and read it's sampleRate parameter.
pDeviceInfo->minSampleRate = MAL_MIN_SAMPLE_RATE;
pDeviceInfo->minSampleRate = MAL_MIN_SAMPLE_RATE;
pDeviceInfo->maxSampleRate = MAL_MAX_SAMPLE_RATE;
pDeviceInfo->maxSampleRate = MAL_MAX_SAMPLE_RATE;
pDeviceInfo->formatCount = 1;
pDeviceInfo->formatCount = 1;
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