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
ae46e989
Commit
ae46e989
authored
Apr 25, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OpenSL: Add support for retrieving detailed device info.
parent
5bba3c8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
mini_al.h
mini_al.h
+23
-1
No files found.
mini_al.h
View file @
ae46e989
...
@@ -2423,7 +2423,7 @@ mal_uint64 mal_sine_wave_read(mal_sine_wave* pSignWave, mal_uint64 count, float*
...
@@ -2423,7 +2423,7 @@ mal_uint64 mal_sine_wave_read(mal_sine_wave* pSignWave, mal_uint64 count, float*
#else
#else
#define MAL_NO_XGETBV
#define MAL_NO_XGETBV
#endif
#endif
#elif
defined(__GNUC__) || defined(__clang__
)
#elif
(defined(__GNUC__) || defined(__clang__)) && !defined(MAL_ANDROID
)
static MAL_INLINE void mal_cpuid(int info[4], int fid)
static MAL_INLINE void mal_cpuid(int info[4], int fid)
{
{
__asm__ (
__asm__ (
...
@@ -12538,6 +12538,8 @@ mal_result mal_context_get_device_info__opensl(mal_context* pContext, mal_device
...
@@ -12538,6 +12538,8 @@ mal_result mal_context_get_device_info__opensl(mal_context* pContext, mal_device
mal_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), (const char*)desc.deviceName, (size_t)-1);
mal_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), (const char*)desc.deviceName, (size_t)-1);
}
}
goto return_detailed_info;
#else
#else
goto return_default_device;
goto return_default_device;
#endif
#endif
...
@@ -12557,6 +12559,26 @@ return_default_device:
...
@@ -12557,6 +12559,26 @@ return_default_device:
mal_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MAL_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);
mal_strncpy_s(pDeviceInfo->name, sizeof(pDeviceInfo->name), MAL_DEFAULT_CAPTURE_DEVICE_NAME, (size_t)-1);
}
}
goto return_detailed_info;
return_detailed_info:
// For now we're just outputting a set of values that are supported by the API but not necessarily supported
// by the device natively. Later on we should work on this so that it more closely reflects the device's
// actual native format.
pDeviceInfo->minChannels = 1;
pDeviceInfo->maxChannels = 2;
pDeviceInfo->minSampleRate = 8000;
pDeviceInfo->maxSampleRate = 48000;
pDeviceInfo->formatCount = 2;
pDeviceInfo->formats[0] = mal_format_u8;
pDeviceInfo->formats[1] = mal_format_s16;
#if defined(MAL_ANDROID) && __ANDROID_API__ >= 21
pDeviceInfo->formats[pDeviceInfo->formatCount] = mal_format_f32;
pDeviceInfo->formatCount += 1;
#endif
return MAL_SUCCESS;
return MAL_SUCCESS;
}
}
...
...
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