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
77990ddf
Commit
77990ddf
authored
Jan 12, 2020
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update dr_wav.
parent
fc3771c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
extras/dr_wav.h
extras/dr_wav.h
+15
-10
No files found.
extras/dr_wav.h
View file @
77990ddf
/*
WAV audio loader and writer. Choice of public domain or MIT-0. See license statements at the end of this file.
dr_wav - v0.11.
2 - 2019-12-0
2
dr_wav - v0.11.
3 - 2020-01-1
2
David Reid - mackron@gmail.com
*/
...
...
@@ -3440,6 +3440,7 @@ drwav_uint64 drwav_read_pcm_frames_s16__ima(drwav* pWav, drwav_uint64 framesToRe
drwav_uint32
iByte
;
drwav_uint8
nibbles
[
4
];
if
(
pWav
->
onRead
(
pWav
->
pUserData
,
&
nibbles
,
4
)
!=
4
)
{
pWav
->
ima
.
cachedFrameCount
=
0
;
return
totalFramesRead
;
}
pWav
->
ima
.
bytesRemainingInBlock
-=
4
;
...
...
@@ -4173,7 +4174,11 @@ void drwav_u8_to_f32(float* pOut, const drwav_uint8* pIn, size_t sampleCount)
}
#else
for
(
i
=
0
;
i
<
sampleCount
;
++
i
)
{
*
pOut
++
=
(
pIn
[
i
]
/
255.0
f
)
*
2
-
1
;
float
x
=
pIn
[
i
];
x
=
x
*
0.00784313725490196078
f
;
/* 0..255 to 0..2 */
x
=
x
-
1
;
/* 0..2 to -1..1 */
*
pOut
++
=
x
;
}
#endif
}
...
...
@@ -4187,7 +4192,7 @@ void drwav_s16_to_f32(float* pOut, const drwav_int16* pIn, size_t sampleCount)
}
for
(
i
=
0
;
i
<
sampleCount
;
++
i
)
{
*
pOut
++
=
pIn
[
i
]
/
32768.0
f
;
*
pOut
++
=
pIn
[
i
]
*
0.000030517578125
f
;
}
}
...
...
@@ -4200,12 +4205,8 @@ void drwav_s24_to_f32(float* pOut, const drwav_uint8* pIn, size_t sampleCount)
}
for
(
i
=
0
;
i
<
sampleCount
;
++
i
)
{
unsigned
int
s0
=
pIn
[
i
*
3
+
0
];
unsigned
int
s1
=
pIn
[
i
*
3
+
1
];
unsigned
int
s2
=
pIn
[
i
*
3
+
2
];
int
sample32
=
(
int
)((
s0
<<
8
)
|
(
s1
<<
16
)
|
(
s2
<<
24
));
*
pOut
++
=
(
float
)(
sample32
/
2147483648.0
);
double
x
=
(
double
)(((
drwav_int32
)(((
drwav_uint32
)(
pIn
[
i
*
3
+
0
])
<<
8
)
|
((
drwav_uint32
)(
pIn
[
i
*
3
+
1
])
<<
16
)
|
((
drwav_uint32
)(
pIn
[
i
*
3
+
2
]))
<<
24
))
>>
8
);
*
pOut
++
=
(
float
)(
x
*
0.00000011920928955078125
);
}
}
...
...
@@ -5051,6 +5052,10 @@ void drwav_free(void* p, const drwav_allocation_callbacks* pAllocationCallbacks)
/*
REVISION HISTORY
================
v0.11.3 - 2020-01-12
- Minor changes to some f32 format conversion routines.
- Minor bug fix for ADPCM conversion when end of file is reached.
v0.11.2 - 2019-12-02
- Fix a possible crash when using custom memory allocators without a custom realloc() implementation.
- Fix an integer overflow bug.
...
...
@@ -5339,7 +5344,7 @@ For more information, please refer to <http://unlicense.org/>
===============================================================================
ALTERNATIVE 2 - MIT No Attribution
===============================================================================
Copyright 20
18
David Reid
Copyright 20
20
David Reid
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
...
...
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