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
94406c3c
Commit
94406c3c
authored
May 21, 2019
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update dr_flac and dr_wav.
parent
8a680049
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
42 deletions
+55
-42
extras/dr_flac.h
extras/dr_flac.h
+45
-35
extras/dr_wav.h
extras/dr_wav.h
+10
-7
No files found.
extras/dr_flac.h
View file @
94406c3c
This diff is collapsed.
Click to expand it.
extras/dr_wav.h
View file @
94406c3c
/*
WAV audio loader and writer. Choice of public domain or MIT-0. See license statements at the end of this file.
dr_wav - v0.9.
1 - 2019-05-05
dr_wav - v0.9.
2 - 2019-05-21
David Reid - mackron@gmail.com
*/
...
...
@@ -2040,7 +2040,7 @@ drwav_bool32 drwav_init_ex(drwav* pWav, drwav_read_proc onRead, drwav_seek_proc
drwav_uint32
drwav_riff_chunk_size_riff
(
drwav_uint64
dataChunkSize
)
{
if
(
dataChunkSize
<=
(
0xFFFFFFFF
-
36
))
{
if
(
dataChunkSize
<=
(
0xFFFFFFFF
UL
-
36
))
{
return
36
+
(
drwav_uint32
)
dataChunkSize
;
}
else
{
return
0xFFFFFFFF
;
...
...
@@ -2049,10 +2049,10 @@ drwav_uint32 drwav_riff_chunk_size_riff(drwav_uint64 dataChunkSize)
drwav_uint32
drwav_data_chunk_size_riff
(
drwav_uint64
dataChunkSize
)
{
if
(
dataChunkSize
<=
0xFFFFFFFF
)
{
if
(
dataChunkSize
<=
0xFFFFFFFF
UL
)
{
return
(
drwav_uint32
)
dataChunkSize
;
}
else
{
return
0xFFFFFFFF
;
return
0xFFFFFFFF
UL
;
}
}
...
...
@@ -2121,7 +2121,7 @@ drwav_bool32 drwav_init_write__internal(drwav* pWav, const drwav_data_format* pF
so for the sake of simplicity I'm not doing any validation for that.
*/
if
(
pFormat
->
container
==
drwav_container_riff
)
{
if
(
initialDataChunkSize
>
(
0xFFFFFFFF
-
36
))
{
if
(
initialDataChunkSize
>
(
0xFFFFFFFF
UL
-
36
))
{
return
DRWAV_FALSE
;
/* Not enough room to store every sample. */
}
}
...
...
@@ -3195,8 +3195,8 @@ void drwav_u8_to_s16(drwav_int16* pOut, const drwav_uint8* pIn, size_t sampleCou
size_t
i
;
for
(
i
=
0
;
i
<
sampleCount
;
++
i
)
{
int
x
=
pIn
[
i
];
r
=
x
-
12
8
;
r
=
r
<<
8
;
r
=
x
<<
8
;
r
=
r
-
3276
8
;
pOut
[
i
]
=
(
short
)
r
;
}
}
...
...
@@ -4675,6 +4675,9 @@ void drwav_free(void* pDataReturnedByOpenAndRead)
/*
REVISION HISTORY
================
v0.9.2 - 2019-05-21
- Fix warnings.
v0.9.1 - 2019-05-05
- Add support for C89.
- Change license to choice of public domain or MIT-0.
...
...
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