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
49b01043
Commit
49b01043
authored
Nov 11, 2017
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OSS: Fix a bug when starting a playback device.
parent
375cdd68
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
mini_al.h
mini_al.h
+3
-5
No files found.
mini_al.h
View file @
49b01043
...
@@ -6475,12 +6475,9 @@ static mal_result mal_device__start_backend__oss(mal_device* pDevice)
...
@@ -6475,12 +6475,9 @@ static mal_result mal_device__start_backend__oss(mal_device* pDevice)
// call to read().
// call to read().
if
(
pDevice
->
type
==
mal_device_type_playback
)
{
if
(
pDevice
->
type
==
mal_device_type_playback
)
{
// Playback.
// Playback.
mal_uint32
samplesRead
=
mal_device__read_frames_from_client
(
pDevice
,
pDevice
->
oss
.
fragmentSizeInFrames
,
pDevice
->
oss
.
pIntermediaryBuffer
);
mal_device__read_frames_from_client
(
pDevice
,
pDevice
->
oss
.
fragmentSizeInFrames
,
pDevice
->
oss
.
pIntermediaryBuffer
);
if
(
samplesRead
==
0
)
{
return
mal_post_error
(
pDevice
,
"[OSS] Failed to read initial chunk of data from the client."
,
MAL_FAILED_TO_READ_DATA_FROM_CLIENT
);
}
int
bytesWritten
=
write
(
pDevice
->
oss
.
fd
,
pDevice
->
oss
.
pIntermediaryBuffer
,
samplesRead
*
mal_get_sample_size_in_bytes
(
pDevice
->
internalFormat
));
int
bytesWritten
=
write
(
pDevice
->
oss
.
fd
,
pDevice
->
oss
.
pIntermediaryBuffer
,
pDevice
->
oss
.
fragmentSizeInFrames
*
pDevice
->
internalChannels
*
mal_get_sample_size_in_bytes
(
pDevice
->
internalFormat
));
if
(
bytesWritten
==
-
1
)
{
if
(
bytesWritten
==
-
1
)
{
return
mal_post_error
(
pDevice
,
"[OSS] Failed to send initial chunk of data to the device."
,
MAL_FAILED_TO_SEND_DATA_TO_DEVICE
);
return
mal_post_error
(
pDevice
,
"[OSS] Failed to send initial chunk of data to the device."
,
MAL_FAILED_TO_SEND_DATA_TO_DEVICE
);
}
}
...
@@ -10246,6 +10243,7 @@ void mal_pcm_f32_to_s32(int* pOut, const float* pIn, unsigned int count)
...
@@ -10246,6 +10243,7 @@ void mal_pcm_f32_to_s32(int* pOut, const float* pIn, unsigned int count)
// - ALSA: Add support for excluding the "null" device using the alsa.excludeNullDevice context config variable.
// - ALSA: Add support for excluding the "null" device using the alsa.excludeNullDevice context config variable.
// - ALSA: Fix a bug with channel mapping which causes an assertion to fail.
// - ALSA: Fix a bug with channel mapping which causes an assertion to fail.
// - Fix errors with enumeration when pInfo is set to NULL.
// - Fix errors with enumeration when pInfo is set to NULL.
// - OSS: Fix a bug when starting a device when the client sends 0 samples for the initial buffer fill.
//
//
// v0.4 - 2017-11-05
// v0.4 - 2017-11-05
// - API CHANGE: The log callback is now per-context rather than per-device and as is thus now passed to
// - API CHANGE: The log callback is now per-context rather than per-device and as is thus now passed to
...
...
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