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
1d310ff0
Commit
1d310ff0
authored
Mar 11, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up.
parent
b2b20ee1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
mini_al.h
mini_al.h
+5
-6
No files found.
mini_al.h
View file @
1d310ff0
...
@@ -7286,12 +7286,12 @@ static mal_result mal_device_init__alsa(mal_context* pContext, mal_device_type t
...
@@ -7286,12 +7286,12 @@ static mal_result mal_device_init__alsa(mal_context* pContext, mal_device_type t
// We may need to scale the size of the buffer depending on the device.
// We may need to scale the size of the buffer depending on the device.
if
(
pDevice
->
usingDefaultBufferSize
)
{
if
(
pDevice
->
usingDefaultBufferSize
)
{
float
bufferSizeScale
=
1
;
mal_snd_pcm_info_t
*
pInfo
=
(
mal_snd_pcm_info_t
*
)
alloca
(((
mal_snd_pcm_info_sizeof_proc
)
pContext
->
alsa
.
snd_pcm_info_sizeof
)());
mal_snd_pcm_info_t
*
pInfo
=
(
mal_snd_pcm_info_t
*
)
alloca
(((
mal_snd_pcm_info_sizeof_proc
)
pContext
->
alsa
.
snd_pcm_info_sizeof
)());
mal_zero_memory
(
pInfo
,
((
mal_snd_pcm_info_sizeof_proc
)
pContext
->
alsa
.
snd_pcm_info_sizeof
)());
mal_zero_memory
(
pInfo
,
((
mal_snd_pcm_info_sizeof_proc
)
pContext
->
alsa
.
snd_pcm_info_sizeof
)());
if
(((
mal_snd_pcm_info_proc
)
pContext
->
alsa
.
snd_pcm_info
)((
mal_snd_pcm_t
*
)
pDevice
->
alsa
.
pPCM
,
pInfo
)
==
0
)
{
if
(((
mal_snd_pcm_info_proc
)
pContext
->
alsa
.
snd_pcm_info
)((
mal_snd_pcm_t
*
)
pDevice
->
alsa
.
pPCM
,
pInfo
)
==
0
)
{
float
bufferSizeScale
=
1
;
const
char
*
deviceName
=
((
mal_snd_pcm_info_get_name_proc
)
pContext
->
alsa
.
snd_pcm_info_get_name
)(
pInfo
);
const
char
*
deviceName
=
((
mal_snd_pcm_info_get_name_proc
)
pContext
->
alsa
.
snd_pcm_info_get_name
)(
pInfo
);
if
(
deviceName
!=
NULL
)
{
if
(
deviceName
!=
NULL
)
{
if
(
strcmp
(
deviceName
,
"default"
)
==
0
)
{
if
(
strcmp
(
deviceName
,
"default"
)
==
0
)
{
...
@@ -12273,7 +12273,7 @@ mal_result mal_context_init_backend_apis__nix(mal_context* pContext)
...
@@ -12273,7 +12273,7 @@ mal_result mal_context_init_backend_apis__nix(mal_context* pContext)
mal_result
mal_context_init_backend_apis
(
mal_context
*
pContext
)
mal_result
mal_context_init_backend_apis
(
mal_context
*
pContext
)
{
{
mal_result
result
=
MAL_NO_BACKEND
;
mal_result
result
;
#ifdef MAL_WIN32
#ifdef MAL_WIN32
result
=
mal_context_init_backend_apis__win32
(
pContext
);
result
=
mal_context_init_backend_apis__win32
(
pContext
);
#else
#else
...
@@ -12285,7 +12285,7 @@ mal_result mal_context_init_backend_apis(mal_context* pContext)
...
@@ -12285,7 +12285,7 @@ mal_result mal_context_init_backend_apis(mal_context* pContext)
mal_result
mal_context_uninit_backend_apis
(
mal_context
*
pContext
)
mal_result
mal_context_uninit_backend_apis
(
mal_context
*
pContext
)
{
{
mal_result
result
=
MAL_NO_BACKEND
;
mal_result
result
;
#ifdef MAL_WIN32
#ifdef MAL_WIN32
result
=
mal_context_uninit_backend_apis__win32
(
pContext
);
result
=
mal_context_uninit_backend_apis__win32
(
pContext
);
#else
#else
...
@@ -14383,11 +14383,10 @@ mal_uint64 mal_dsp_read_frames_ex(mal_dsp* pDSP, mal_uint64 frameCount, void* pF
...
@@ -14383,11 +14383,10 @@ mal_uint64 mal_dsp_read_frames_ex(mal_dsp* pDSP, mal_uint64 frameCount, void* pF
// Slower path - where the real work is done.
// Slower path - where the real work is done.
mal_uint8
pFrames
[
2
][
MAL_MAX_CHANNELS
*
512
*
MAL_MAX_PCM_SAMPLE_SIZE_IN_BYTES
];
mal_uint8
pFrames
[
2
][
MAL_MAX_CHANNELS
*
512
*
MAL_MAX_PCM_SAMPLE_SIZE_IN_BYTES
];
mal_format
pFramesFormat
[
2
];
mal_format
pFramesFormat
[
2
];
mal_uint32
iFrames
=
0
;
// <-- Used as an index into pFrames and cycles between 0 and 1.
mal_uint64
totalFramesRead
=
0
;
mal_uint64
totalFramesRead
=
0
;
while
(
frameCount
>
0
)
{
while
(
frameCount
>
0
)
{
iFrames
=
0
;
mal_uint32
iFrames
=
0
;
// <-- Used as an index into pFrames and cycles between 0 and 1.
mal_uint32
framesToRead
=
mal_countof
(
pFrames
[
0
])
/
(
mal_max
(
pDSP
->
config
.
channelsIn
,
pDSP
->
config
.
channelsOut
)
*
MAL_MAX_PCM_SAMPLE_SIZE_IN_BYTES
);
mal_uint32
framesToRead
=
mal_countof
(
pFrames
[
0
])
/
(
mal_max
(
pDSP
->
config
.
channelsIn
,
pDSP
->
config
.
channelsOut
)
*
MAL_MAX_PCM_SAMPLE_SIZE_IN_BYTES
);
if
(
framesToRead
>
frameCount
)
{
if
(
framesToRead
>
frameCount
)
{
...
...
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