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
3b50a854
Commit
3b50a854
authored
Nov 10, 2023
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Version 0.11.20
parent
da0572e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
55 deletions
+52
-55
CHANGES.md
CHANGES.md
+2
-2
extras/miniaudio_split/miniaudio.c
extras/miniaudio_split/miniaudio.c
+47
-50
extras/miniaudio_split/miniaudio.h
extras/miniaudio_split/miniaudio.h
+2
-2
miniaudio.h
miniaudio.h
+1
-1
No files found.
CHANGES.md
View file @
3b50a854
v0.11.20 -
TBD
v0.11.20 -
2023-11-10
=====================
*
Fix an error when dynamically linking libraries when forcing the UWP build on desktop.
*
Fix a compilation error with iOS.
*
Fix an error when dynamically linking libraries when forcing the UWP build on desktop.
v0.11.19 - 2023-11-04
...
...
extras/miniaudio_split/miniaudio.c
View file @
3b50a854
/*
Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file.
miniaudio - v0.11.
19 - 2023-11-04
miniaudio - v0.11.
20 - 2023-11-10
David Reid - mackron@gmail.com
...
...
@@ -6397,7 +6397,7 @@ MA_API ma_handle ma_dlopen(ma_log* pLog, const char* filename)
#ifdef MA_WIN32
/* From MSDN: Desktop applications cannot use LoadPackagedLibrary; if a desktop application calls this function it fails with APPMODEL_ERROR_NO_PACKAGE.*/
#if !defined(MA_WIN32_UWP)
#if !defined(MA_WIN32_UWP)
|| !(defined(WINAPI_FAMILY) && ((defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)))
handle = (ma_handle)LoadLibraryA(filename);
#else
/* *sigh* It appears there is no ANSI version of LoadPackagedLibrary()... */
...
...
@@ -7245,19 +7245,6 @@ static void ma_device__on_notification_rerouted(ma_device* pDevice)
}
#endif
/* Interruptions are only used on some platforms. */
#if defined(MA_APPLE_MOBILE)
static void ma_device__on_notification_interruption_began(ma_device* pDevice)
{
ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_interruption_began));
}
static void ma_device__on_notification_interruption_ended(ma_device* pDevice)
{
ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_interruption_ended));
}
#endif
static void ma_device__on_data_inner(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount)
{
...
...
@@ -12088,6 +12075,39 @@ static ma_result ma_context_init__wasapi(ma_context* pContext, const ma_context_
MA_ZERO_OBJECT(&pContext->wasapi);
#if defined(MA_WIN32_UWP)
{
/* Link to mmdevapi so we can get access to ActivateAudioInterfaceAsync(). */
pContext->wasapi.hMMDevapi = ma_dlopen(ma_context_get_log(pContext), "mmdevapi.dll");
if (pContext->wasapi.hMMDevapi) {
pContext->wasapi.ActivateAudioInterfaceAsync = ma_dlsym(ma_context_get_log(pContext), pContext->wasapi.hMMDevapi, "ActivateAudioInterfaceAsync");
if (pContext->wasapi.ActivateAudioInterfaceAsync == NULL) {
ma_dlclose(ma_context_get_log(pContext), pContext->wasapi.hMMDevapi);
return MA_NO_BACKEND; /* ActivateAudioInterfaceAsync() could not be loaded. */
}
} else {
return MA_NO_BACKEND; /* Failed to load mmdevapi.dll which is required for ActivateAudioInterfaceAsync() */
}
}
#endif
/* Optionally use the Avrt API to specify the audio thread's latency sensitivity requirements */
pContext->wasapi.hAvrt = ma_dlopen(ma_context_get_log(pContext), "avrt.dll");
if (pContext->wasapi.hAvrt) {
pContext->wasapi.AvSetMmThreadCharacteristicsA = ma_dlsym(ma_context_get_log(pContext), pContext->wasapi.hAvrt, "AvSetMmThreadCharacteristicsA");
pContext->wasapi.AvRevertMmThreadcharacteristics = ma_dlsym(ma_context_get_log(pContext), pContext->wasapi.hAvrt, "AvRevertMmThreadCharacteristics");
/* If either function could not be found, disable use of avrt entirely. */
if (!pContext->wasapi.AvSetMmThreadCharacteristicsA || !pContext->wasapi.AvRevertMmThreadcharacteristics) {
pContext->wasapi.AvSetMmThreadCharacteristicsA = NULL;
pContext->wasapi.AvRevertMmThreadcharacteristics = NULL;
ma_dlclose(ma_context_get_log(pContext), pContext->wasapi.hAvrt);
pContext->wasapi.hAvrt = NULL;
}
}
/*
Annoyingly, WASAPI does not allow you to release an IAudioClient object from a different thread
than the one that retrieved it with GetService(). This can result in a deadlock in two
...
...
@@ -12131,41 +12151,6 @@ static ma_result ma_context_init__wasapi(ma_context* pContext, const ma_context_
ma_mutex_uninit(&pContext->wasapi.commandLock);
return result;
}
#if defined(MA_WIN32_UWP)
{
/* Link to mmdevapi so we can get access to ActivateAudioInterfaceAsync(). */
pContext->wasapi.hMMDevapi = ma_dlopen(ma_context_get_log(pContext), "mmdevapi.dll");
if (pContext->wasapi.hMMDevapi) {
pContext->wasapi.ActivateAudioInterfaceAsync = ma_dlsym(ma_context_get_log(pContext), pContext->wasapi.hMMDevapi, "ActivateAudioInterfaceAsync");
if (pContext->wasapi.ActivateAudioInterfaceAsync == NULL) {
ma_semaphore_uninit(&pContext->wasapi.commandSem);
ma_mutex_uninit(&pContext->wasapi.commandLock);
ma_dlclose(ma_context_get_log(pContext), pContext->wasapi.hMMDevapi);
return MA_NO_BACKEND; /* ActivateAudioInterfaceAsync() could not be loaded. */
}
} else {
ma_semaphore_uninit(&pContext->wasapi.commandSem);
ma_mutex_uninit(&pContext->wasapi.commandLock);
return MA_NO_BACKEND; /* Failed to load mmdevapi.dll which is required for ActivateAudioInterfaceAsync() */
}
}
#endif
/* Optionally use the Avrt API to specify the audio thread's latency sensitivity requirements */
pContext->wasapi.hAvrt = ma_dlopen(ma_context_get_log(pContext), "avrt.dll");
if (pContext->wasapi.hAvrt) {
pContext->wasapi.AvSetMmThreadCharacteristicsA = ma_dlsym(ma_context_get_log(pContext), pContext->wasapi.hAvrt, "AvSetMmThreadCharacteristicsA");
pContext->wasapi.AvRevertMmThreadcharacteristics = ma_dlsym(ma_context_get_log(pContext), pContext->wasapi.hAvrt, "AvRevertMmThreadCharacteristics");
/* If either function could not be found, disable use of avrt entirely. */
if (!pContext->wasapi.AvSetMmThreadCharacteristicsA || !pContext->wasapi.AvRevertMmThreadcharacteristics) {
pContext->wasapi.AvSetMmThreadCharacteristicsA = NULL;
pContext->wasapi.AvRevertMmThreadcharacteristics = NULL;
ma_dlclose(ma_context_get_log(pContext), pContext->wasapi.hAvrt);
pContext->wasapi.hAvrt = NULL;
}
}
}
...
...
@@ -20461,6 +20446,18 @@ size, allocate a block of memory of that size and then call AudioObjectGetProper
AudioDeviceID's so just do "dataSize/sizeof(AudioDeviceID)" to know the device count.
*/
#if defined(MA_APPLE_MOBILE)
static void ma_device__on_notification_interruption_began(ma_device* pDevice)
{
ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_interruption_began));
}
static void ma_device__on_notification_interruption_ended(ma_device* pDevice)
{
ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_interruption_ended));
}
#endif
static ma_result ma_result_from_OSStatus(OSStatus status)
{
switch (status)
extras/miniaudio_split/miniaudio.h
View file @
3b50a854
/*
Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file.
miniaudio - v0.11.
19 - 2023-11-04
miniaudio - v0.11.
20 - 2023-11-10
David Reid - mackron@gmail.com
...
...
@@ -20,7 +20,7 @@ extern "C" {
#define MA_VERSION_MAJOR 0
#define MA_VERSION_MINOR 11
#define MA_VERSION_REVISION
19
#define MA_VERSION_REVISION
20
#define MA_VERSION_STRING MA_XSTRINGIFY(MA_VERSION_MAJOR) "." MA_XSTRINGIFY(MA_VERSION_MINOR) "." MA_XSTRINGIFY(MA_VERSION_REVISION)
#if defined(_MSC_VER) && !defined(__clang__)
...
...
miniaudio.h
View file @
3b50a854
/*
Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file.
miniaudio - v0.11.20 -
TBD
miniaudio - v0.11.20 -
2023-11-10
David Reid - mackron@gmail.com
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