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
5f85f42b
Commit
5f85f42b
authored
Aug 25, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix NetBSD build.
parent
581b90d2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
mini_al.h
mini_al.h
+9
-9
No files found.
mini_al.h
View file @
5f85f42b
...
...
@@ -18317,13 +18317,11 @@ void mal_device_uninit__audio4(mal_device* pDevice)
mal_result mal_device_init_fd__audio4(mal_context* pContext, const mal_device_config* pConfig, mal_device_type deviceType, mal_device* pDevice)
{
mal_result result;
const char* pDeviceName;
int fd;
int fdFlags = 0;
#if !defined(MAL_AUDIO4_USE_NEW_API) /* Old API */
audio_info_t fdInfo;
mal_device_info nativeInfo;
#else
struct audio_swpar fdPar;
#endif
...
...
@@ -18376,7 +18374,7 @@ mal_result mal_device_init_fd__audio4(mal_context* pContext, const mal_device_co
fdInfo.play.sample_rate = pConfig->sampleRate;
}
if (fd, AUDIO_SETINFO, &fdInfo) < 0) {
if (
ioctl(
fd, AUDIO_SETINFO, &fdInfo) < 0) {
close(fd);
return mal_post_error(pDevice, MAL_LOG_LEVEL_ERROR, "[audio4] Failed to set device format. AUDIO_SETINFO failed.", MAL_FORMAT_NOT_SUPPORTED);
}
...
...
@@ -18572,21 +18570,23 @@ mal_result mal_device_start__audio4(mal_device* pDevice)
}
#endif
mal_result mal_device_stop_fd__audio4(int fd)
mal_result mal_device_stop_fd__audio4(
mal_device* pDevice,
int fd)
{
if (
pDevice->audio4.fdCapture
== -1) {
if (
fd
== -1) {
return MAL_INVALID_ARGS;
}
#if !defined(MAL_AUDIO4_USE_NEW_API)
if (ioctl(
pDevice->audio4.fdCapture
, AUDIO_FLUSH, 0) < 0) {
if (ioctl(
fd
, AUDIO_FLUSH, 0) < 0) {
return mal_post_error(pDevice, MAL_LOG_LEVEL_ERROR, "[audio4] Failed to stop device. AUDIO_FLUSH failed.", MAL_FAILED_TO_STOP_BACKEND_DEVICE);
}
#else
if (ioctl(
pDevice->audio4.fdCapture
, AUDIO_STOP, 0) < 0) {
if (ioctl(
fd
, AUDIO_STOP, 0) < 0) {
return mal_post_error(pDevice, MAL_LOG_LEVEL_ERROR, "[audio4] Failed to stop device. AUDIO_STOP failed.", MAL_FAILED_TO_STOP_BACKEND_DEVICE);
}
#endif
return MAL_SUCCESS;
}
mal_result mal_device_stop__audio4(mal_device* pDevice)
...
...
@@ -18594,14 +18594,14 @@ mal_result mal_device_stop__audio4(mal_device* pDevice)
mal_assert(pDevice != NULL);
if (pDevice->type == mal_device_type_capture || pDevice->type == mal_device_type_duplex) {
mal_result result = mal_device_stop_fd__audio4(pDevice->audio4.fdCapture);
mal_result result = mal_device_stop_fd__audio4(pDevice
, pDevice
->audio4.fdCapture);
if (result != MAL_SUCCESS) {
return result;
}
}
if (pDevice->type == mal_device_type_playback || pDevice->type == mal_device_type_duplex) {
mal_result result = mal_device_stop_fd__audio4(pDevice->audio4.fdPlayback);
mal_result result = mal_device_stop_fd__audio4(pDevice
, pDevice
->audio4.fdPlayback);
if (result != MAL_SUCCESS) {
return result;
}
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