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
2d885e9d
Commit
2d885e9d
authored
Mar 05, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for JACK to the Windows build.
parent
effed2d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
mini_al.h
mini_al.h
+6
-4
No files found.
mini_al.h
View file @
2d885e9d
...
...
@@ -240,6 +240,7 @@ extern "C" {
#if defined(MAL_WIN32_DESKTOP) // DirectSound and WinMM backends are only supported on desktop's.
#define MAL_SUPPORT_DSOUND
#define MAL_SUPPORT_WINMM
#define MAL_SUPPORT_JACK // JACK is technically supported on Windows, but I don't know how many people use it in practice...
#endif
// Don't support WASAPI on older versions of MSVC for now.
...
...
@@ -8504,6 +8505,7 @@ mal_result mal_device_init__jack(mal_context* pContext, mal_device_type type, ma
mal_assert
(
pDevice
!=
NULL
);
(
void
)
pContext
;
(
void
)
pDeviceID
;
// Only supporting default devices with JACK.
// Open the client.
size_t
maxClientNameSize
=
((
mal_jack_client_name_size_proc
)
pContext
->
jack
.
jack_client_name_size
)();
// Includes null terminator.
...
...
@@ -8560,7 +8562,7 @@ mal_result mal_device_init__jack(mal_context* pContext, mal_device_type type, ma
pDevice
->
jack
.
pPorts
[
pDevice
->
internalChannels
]
=
((
mal_jack_port_register_proc
)
pContext
->
jack
.
jack_port_register
)((
mal_jack_client_t
*
)
pDevice
->
jack
.
pClient
,
name
,
MAL_JACK_DEFAULT_AUDIO_TYPE
,
clientPortFlags
,
0
);
if
(
pDevice
->
jack
.
pPorts
[
pDevice
->
internalChannels
]
==
NULL
)
{
((
mal_jack_free_proc
)
pContext
->
jack
.
jack_free
)(
ppPorts
);
((
mal_jack_free_proc
)
pContext
->
jack
.
jack_free
)(
(
void
*
)
ppPorts
);
mal_device_uninit__jack
(
pDevice
);
return
mal_post_error
(
pDevice
,
"[JACK] Failed to register ports."
,
MAL_FAILED_TO_OPEN_BACKEND_DEVICE
);
}
...
...
@@ -8568,7 +8570,7 @@ mal_result mal_device_init__jack(mal_context* pContext, mal_device_type type, ma
pDevice
->
internalChannels
+=
1
;
}
((
mal_jack_free_proc
)
pContext
->
jack
.
jack_free
)(
ppPorts
);
((
mal_jack_free_proc
)
pContext
->
jack
.
jack_free
)(
(
void
*
)
ppPorts
);
ppPorts
=
NULL
;
// We set the sample rate here, but apparently this can change. This is incompatible with mini_al, so changing sample rates will not be supported.
...
...
@@ -8630,13 +8632,13 @@ static mal_result mal_device__start_backend__jack(mal_device* pDevice)
}
if
(
resultJACK
!=
0
)
{
((
mal_jack_free_proc
)
pContext
->
jack
.
jack_free
)(
ppServerPorts
);
((
mal_jack_free_proc
)
pContext
->
jack
.
jack_free
)(
(
void
*
)
ppServerPorts
);
((
mal_jack_deactivate_proc
)
pContext
->
jack
.
jack_deactivate
)((
mal_jack_client_t
*
)
pDevice
->
jack
.
pClient
);
return
mal_post_error
(
pDevice
,
"[JACK] Failed to connect ports."
,
MAL_ERROR
);
}
}
((
mal_jack_free_proc
)
pContext
->
jack
.
jack_free
)(
ppServerPorts
);
((
mal_jack_free_proc
)
pContext
->
jack
.
jack_free
)(
(
void
*
)
ppServerPorts
);
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