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
b213f5e0
Commit
b213f5e0
authored
Jul 30, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sndio: Add some notes for future reference.
parent
68997e3b
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 @
b213f5e0
...
@@ -14947,11 +14947,33 @@ mal_result mal_context_init__coreaudio(mal_context* pContext)
...
@@ -14947,11 +14947,33 @@ mal_result mal_context_init__coreaudio(mal_context* pContext)
#ifdef MAL_HAS_SNDIO
#ifdef MAL_HAS_SNDIO
#include <fcntl.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/stat.h>
//#include <sndio.h>
// Only supporting OpenBSD. To get working on FreeBSD (and possibly others):
//
// Device Enumeration
// ------------------
// On OpenBSD and NetBSD mini_al will just enumerate over the "/dev/audio" devices. On FreeBSD this will need to
// change to loop over OSS devices.
//
// Device Caps
// -----------
// The sndio API does not appear to have a way to retrieve a device's _actual_ hardware configuration which makes
// the implementation of mal_get_device_info() difficult. Currently this is just hard coded to specific values,
// but a more optimal solution would be to query the device caps from the sys/audioio.h or sys/soundcard.h APIs,
// depending on the BSD flavor.
//
// Device Initialization
// ---------------------
// mini_al uses SIO_DEVANY ("default") for the default device, however this does not work very well on FreeBSD in
// my testing (and possibly NetBSD - I have not tested). Settings this to "rsnd/0" appears to fix it, but then that
// doesn't work properly on OpenBSD in my testing.
#if defined(__NetBSD__) || defined(__OpenBSD__)
#if defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/audioio.h>
#include <sys/audioio.h>
#endif
#endif
#if defined(__FreeBSD__) || defined(__DragonFly__)
#include <sys/soundcard.h>
#endif
#define MAL_SIO_DEVANY "default"
#define MAL_SIO_DEVANY "default"
#define MAL_SIO_PLAY 1
#define MAL_SIO_PLAY 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