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
d98e3798
Commit
d98e3798
authored
Nov 28, 2020
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Silence some warnings.
parent
61fed4c9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
research/miniaudio_engine.h
research/miniaudio_engine.h
+17
-4
No files found.
research/miniaudio_engine.h
View file @
d98e3798
...
@@ -1854,15 +1854,15 @@ MA_API ma_result ma_effect_process_pcm_frames_with_conversion(ma_effect* pEffect
...
@@ -1854,15 +1854,15 @@ MA_API ma_result ma_effect_process_pcm_frames_with_conversion(ma_effect* pEffect
for
(
iInputStream
=
0
;
iInputStream
<
inputStreamCount
;
iInputStream
+=
1
)
{
for
(
iInputStream
=
0
;
iInputStream
<
inputStreamCount
;
iInputStream
+=
1
)
{
ppEffectInBuffer
[
iInputStream
]
=
ma_offset_ptr
(
effectInBuffer
,
effectInBufferCap
*
iInputStream
);
ppEffectInBuffer
[
iInputStream
]
=
ma_offset_ptr
(
effectInBuffer
,
effectInBufferCap
*
iInputStream
);
ma_convert_pcm_frames_format_and_channels
(
ppEffectInBuffer
,
effectFormatIn
,
effectChannelsIn
,
ppRunningFramesIn
,
formatIn
,
channelsIn
,
framesToProcessThisIterationIn
,
ma_dither_mode_none
);
ma_convert_pcm_frames_format_and_channels
(
ppEffectInBuffer
[
iInputStream
],
effectFormatIn
,
effectChannelsIn
,
ppRunningFramesIn
[
iInputStream
]
,
formatIn
,
channelsIn
,
framesToProcessThisIterationIn
,
ma_dither_mode_none
);
}
}
if
(
effectFormatOut
==
formatOut
&&
effectChannelsOut
==
channelsOut
)
{
if
(
effectFormatOut
==
formatOut
&&
effectChannelsOut
==
channelsOut
)
{
/* Fast path. No output format conversion required. */
/* Fast path. No output format conversion required. */
ma_effect_process_pcm_frames_ex
(
pEffect
,
inputStreamCount
,
ppEffectInBuffer
,
&
framesToProcessThisIterationIn
,
pRunningFramesOut
,
&
framesToProcessThisIterationOut
);
ma_effect_process_pcm_frames_ex
(
pEffect
,
inputStreamCount
,
(
const
void
**
)
&
ppEffectInBuffer
[
0
]
,
&
framesToProcessThisIterationIn
,
pRunningFramesOut
,
&
framesToProcessThisIterationOut
);
}
else
{
}
else
{
/* Slow path. Output format conversion required. */
/* Slow path. Output format conversion required. */
ma_effect_process_pcm_frames_ex
(
pEffect
,
inputStreamCount
,
ppEffectInBuffer
,
&
framesToProcessThisIterationIn
,
effectOutBuffer
,
&
framesToProcessThisIterationOut
);
ma_effect_process_pcm_frames_ex
(
pEffect
,
inputStreamCount
,
(
const
void
**
)
&
ppEffectInBuffer
[
0
]
,
&
framesToProcessThisIterationIn
,
effectOutBuffer
,
&
framesToProcessThisIterationOut
);
ma_convert_pcm_frames_format_and_channels
(
pRunningFramesOut
,
formatOut
,
channelsOut
,
effectOutBuffer
,
effectFormatOut
,
effectChannelsOut
,
framesToProcessThisIterationOut
,
ma_dither_mode_none
);
ma_convert_pcm_frames_format_and_channels
(
pRunningFramesOut
,
formatOut
,
channelsOut
,
effectOutBuffer
,
effectFormatOut
,
effectChannelsOut
,
framesToProcessThisIterationOut
,
ma_dither_mode_none
);
}
}
}
}
...
@@ -3617,12 +3617,16 @@ static ma_result ma_rb_data_source__on_get_format(ma_data_source* pDataSource, m
...
@@ -3617,12 +3617,16 @@ static ma_result ma_rb_data_source__on_get_format(ma_data_source* pDataSource, m
static
ma_result
ma_rb_data_source_init
(
ma_rb
*
pRB
,
ma_format
format
,
ma_uint32
channels
,
ma_rb_data_source
*
pDataSource
)
static
ma_result
ma_rb_data_source_init
(
ma_rb
*
pRB
,
ma_format
format
,
ma_uint32
channels
,
ma_rb_data_source
*
pDataSource
)
{
{
if
(
p
RB
==
NULL
)
{
if
(
p
DataSource
==
NULL
)
{
return
MA_INVALID_ARGS
;
return
MA_INVALID_ARGS
;
}
}
MA_ZERO_OBJECT
(
pDataSource
);
/* For safety. */
MA_ZERO_OBJECT
(
pDataSource
);
/* For safety. */
if
(
pRB
==
NULL
)
{
return
MA_INVALID_ARGS
;
}
pDataSource
->
ds
.
onRead
=
NULL
;
pDataSource
->
ds
.
onRead
=
NULL
;
pDataSource
->
ds
.
onSeek
=
NULL
;
/* We can't really seek in a ring buffer - there's no notion of a beginning and an end in a ring buffer. */
pDataSource
->
ds
.
onSeek
=
NULL
;
/* We can't really seek in a ring buffer - there's no notion of a beginning and an end in a ring buffer. */
pDataSource
->
ds
.
onMap
=
ma_rb_data_source__on_map
;
pDataSource
->
ds
.
onMap
=
ma_rb_data_source__on_map
;
...
@@ -4182,6 +4186,11 @@ MA_API ma_result ma_job_queue_free(ma_job_queue* pQueue, ma_job* pJob)
...
@@ -4182,6 +4186,11 @@ MA_API ma_result ma_job_queue_free(ma_job_queue* pQueue, ma_job* pJob)
#endif
#endif
/* MurmurHash3. Based on code from https://github.com/PeterScott/murmur3/blob/master/murmur3.c (public domain). */
/* MurmurHash3. Based on code from https://github.com/PeterScott/murmur3/blob/master/murmur3.c (public domain). */
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
static
MA_INLINE
ma_uint32
ma_rotl32
(
ma_uint32
x
,
ma_int8
r
)
static
MA_INLINE
ma_uint32
ma_rotl32
(
ma_uint32
x
,
ma_int8
r
)
{
{
return
(
x
<<
r
)
|
(
x
>>
(
32
-
r
));
return
(
x
<<
r
)
|
(
x
>>
(
32
-
r
));
...
@@ -4250,6 +4259,10 @@ static ma_uint32 ma_hash_32(const void* key, int len, ma_uint32 seed)
...
@@ -4250,6 +4259,10 @@ static ma_uint32 ma_hash_32(const void* key, int len, ma_uint32 seed)
return
h1
;
return
h1
;
}
}
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
#pragma GCC diagnostic push
#endif
/* End MurmurHash3 */
/* End MurmurHash3 */
static
ma_uint32
ma_hash_string_32
(
const
char
*
str
)
static
ma_uint32
ma_hash_string_32
(
const
char
*
str
)
...
...
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