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
ae88112e
Commit
ae88112e
authored
Oct 30, 2020
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Version 0.10.21
parent
447e22e0
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
450 additions
and
167 deletions
+450
-167
extras/miniaudio_split/miniaudio.c
extras/miniaudio_split/miniaudio.c
+365
-162
extras/miniaudio_split/miniaudio.h
extras/miniaudio_split/miniaudio.h
+83
-3
miniaudio.h
miniaudio.h
+2
-2
No files found.
extras/miniaudio_split/miniaudio.c
View file @
ae88112e
This diff is collapsed.
Click to expand it.
extras/miniaudio_split/miniaudio.h
View file @
ae88112e
/*
/*
Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file.
Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file.
miniaudio - v0.10.2
0 - 2020-10-06
miniaudio - v0.10.2
1 - 2020-10-30
David Reid - mackron@gmail.com
David Reid - mackron@gmail.com
...
@@ -20,7 +20,7 @@ extern "C" {
...
@@ -20,7 +20,7 @@ extern "C" {
#define MA_VERSION_MAJOR 0
#define MA_VERSION_MAJOR 0
#define MA_VERSION_MINOR 10
#define MA_VERSION_MINOR 10
#define MA_VERSION_REVISION 2
0
#define MA_VERSION_REVISION 2
1
#define MA_VERSION_STRING MA_XSTRINGIFY(MA_VERSION_MAJOR) "." MA_XSTRINGIFY(MA_VERSION_MINOR) "." MA_XSTRINGIFY(MA_VERSION_REVISION)
#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__)
#if defined(_MSC_VER) && !defined(__clang__)
...
@@ -1525,6 +1525,8 @@ typedef enum
...
@@ -1525,6 +1525,8 @@ typedef enum
ma_backend_null
/* <-- Must always be the last item. Lowest priority, and used as the terminator for backend enumeration. */
ma_backend_null
/* <-- Must always be the last item. Lowest priority, and used as the terminator for backend enumeration. */
}
ma_backend
;
}
ma_backend
;
#define MA_BACKEND_COUNT (ma_backend_null+1)
/*
/*
The callback for processing audio data from the device.
The callback for processing audio data from the device.
...
@@ -2474,7 +2476,7 @@ struct ma_device
...
@@ -2474,7 +2476,7 @@ struct ma_device
ma_uint32
currentPeriodFramesRemainingPlayback
;
ma_uint32
currentPeriodFramesRemainingPlayback
;
ma_uint32
currentPeriodFramesRemainingCapture
;
ma_uint32
currentPeriodFramesRemainingCapture
;
ma_uint64
lastProcessedFramePlayback
;
ma_uint64
lastProcessedFramePlayback
;
ma_uint
32
lastProcessedFrameCapture
;
ma_uint
64
lastProcessedFrameCapture
;
ma_bool32
isStarted
;
ma_bool32
isStarted
;
}
null_device
;
}
null_device
;
#endif
#endif
...
@@ -3674,6 +3676,84 @@ Retrieves a friendly name for a backend.
...
@@ -3674,6 +3676,84 @@ Retrieves a friendly name for a backend.
*/
*/
MA_API
const
char
*
ma_get_backend_name
(
ma_backend
backend
);
MA_API
const
char
*
ma_get_backend_name
(
ma_backend
backend
);
/*
Determines whether or not the given backend is available by the compilation environment.
*/
MA_API
ma_bool32
ma_is_backend_enabled
(
ma_backend
backend
);
/*
Retrieves compile-time enabled backends.
Parameters
----------
pBackends(out, optional)
A pointer to the buffer that will receive the enabled backends. Set to NULL to retrieve the backend count. Setting
the capacity of the buffer to `MA_BUFFER_COUNT` will guarantee it's large enough for all backends.
backendCap(in)
The capacity of the `pBackends` buffer.
pBackendCount(out)
A pointer to the variable that will receive the enabled backend count.
Return Value
------------
MA_SUCCESS if successful.
MA_INVALID_ARGS if `pBackendCount` is NULL.
MA_NO_SPACE if the capacity of `pBackends` is not large enough.
If `MA_NO_SPACE` is returned, the `pBackends` buffer will be filled with `*pBackendCount` values.
Thread Safety
-------------
Safe.
Callback Safety
---------------
Safe.
Remarks
-------
If you want to retrieve the number of backends so you can determine the capacity of `pBackends` buffer, you can call
this function with `pBackends` set to NULL.
This will also enumerate the null backend. If you don't want to include this you need to check for `ma_backend_null`
when you enumerate over the returned backends and handle it appropriately. Alternatively, you can disable it at
compile time with `MA_NO_NULL`.
The returned backends are determined based on compile time settings, not the platform it's currently running on. For
example, PulseAudio will be returned if it was enabled at compile time, even when the user doesn't actually have
PulseAudio installed.
Example 1
---------
The example below retrieves the enabled backend count using a fixed sized buffer allocated on the stack. The buffer is
given a capacity of `MA_BACKEND_COUNT` which will guarantee it'll be large enough to store all available backends.
Since `MA_BACKEND_COUNT` is always a relatively small value, this should be suitable for most scenarios.
```
ma_backend enabledBackends[MA_BACKEND_COUNT];
size_t enabledBackendCount;
result = ma_get_enabled_backends(enabledBackends, MA_BACKEND_COUNT, &enabledBackendCount);
if (result != MA_SUCCESS) {
// Failed to retrieve enabled backends. Should never happen in this example since all inputs are valid.
}
```
See Also
--------
ma_is_backend_enabled()
*/
MA_API
ma_result
ma_get_enabled_backends
(
ma_backend
*
pBackends
,
size_t
backendCap
,
size_t
*
pBackendCount
);
/*
/*
Determines whether or not loopback mode is support by a backend.
Determines whether or not loopback mode is support by a backend.
*/
*/
...
...
miniaudio.h
View file @
ae88112e
/*
/*
Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file.
Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file.
miniaudio - v0.10.21 -
TBD
miniaudio - v0.10.21 -
2020-10-30
David Reid - mackron@gmail.com
David Reid - mackron@gmail.com
...
@@ -62859,7 +62859,7 @@ The following miscellaneous changes have also been made.
...
@@ -62859,7 +62859,7 @@ The following miscellaneous changes have also been made.
/*
/*
REVISION HISTORY
REVISION HISTORY
================
================
v0.10.21 -
TBD
v0.10.21 -
2020-10-30
- Add ma_is_backend_enabled() and ma_get_enabled_backends() for retrieving enabled backends at run-time.
- Add ma_is_backend_enabled() and ma_get_enabled_backends() for retrieving enabled backends at run-time.
- WASAPI: Fix a copy and paste bug relating to loopback mode.
- WASAPI: Fix a copy and paste bug relating to loopback mode.
- Core Audio: Fix a bug when using multiple contexts.
- Core Audio: Fix a bug when using multiple contexts.
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