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
154bb46b
Commit
154bb46b
authored
Oct 07, 2019
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update dr_wav.
parent
25b8d2e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1634 additions
and
1007 deletions
+1634
-1007
extras/dr_wav.h
extras/dr_wav.h
+1621
-1003
miniaudio.h
miniaudio.h
+13
-4
No files found.
extras/dr_wav.h
View file @
154bb46b
This source diff could not be displayed because it is too large. You can
view the blob
instead.
miniaudio.h
View file @
154bb46b
...
@@ -33576,7 +33576,8 @@ ma_result ma_decoder_internal_on_seek_to_pcm_frame__wav(ma_decoder* pDecoder, ma
...
@@ -33576,7 +33576,8 @@ ma_result ma_decoder_internal_on_seek_to_pcm_frame__wav(ma_decoder* pDecoder, ma
ma_result ma_decoder_internal_on_uninit__wav(ma_decoder* pDecoder)
ma_result ma_decoder_internal_on_uninit__wav(ma_decoder* pDecoder)
{
{
drwav_close((drwav*)pDecoder->pInternalDecoder);
drwav_uninit((drwav*)pDecoder->pInternalDecoder);
ma_free(pDecoder->pInternalDecoder);
return MA_SUCCESS;
return MA_SUCCESS;
}
}
...
@@ -33593,9 +33594,14 @@ ma_result ma_decoder_init_wav__internal(const ma_decoder_config* pConfig, ma_dec
...
@@ -33593,9 +33594,14 @@ ma_result ma_decoder_init_wav__internal(const ma_decoder_config* pConfig, ma_dec
ma_assert(pConfig != NULL);
ma_assert(pConfig != NULL);
ma_assert(pDecoder != NULL);
ma_assert(pDecoder != NULL);
/* Try opening the decoder first. */
pWav = (drwav*)ma_malloc(sizeof(*pWav));
pWav = drwav_open(ma_decoder_internal_on_read__wav, ma_decoder_internal_on_seek__wav, pDecoder);
if (pWav == NULL) {
if (pWav == NULL) {
return MA_OUT_OF_MEMORY;
}
/* Try opening the decoder first. */
if (!drwav_init(pWav, ma_decoder_internal_on_read__wav, ma_decoder_internal_on_seek__wav, pDecoder, NULL)) {
ma_free(pWav);
return MA_ERROR;
return MA_ERROR;
}
}
...
@@ -33645,7 +33651,8 @@ ma_result ma_decoder_init_wav__internal(const ma_decoder_config* pConfig, ma_dec
...
@@ -33645,7 +33651,8 @@ ma_result ma_decoder_init_wav__internal(const ma_decoder_config* pConfig, ma_dec
result = ma_decoder__init_dsp(pDecoder, pConfig, ma_decoder_internal_on_read_pcm_frames__wav);
result = ma_decoder__init_dsp(pDecoder, pConfig, ma_decoder_internal_on_read_pcm_frames__wav);
if (result != MA_SUCCESS) {
if (result != MA_SUCCESS) {
drwav_close(pWav);
drwav_uninit(pWav);
ma_free(pWav);
return result;
return result;
}
}
...
@@ -34166,6 +34173,7 @@ ma_result ma_decoder_init_mp3__internal(const ma_decoder_config* pConfig, ma_dec
...
@@ -34166,6 +34173,7 @@ ma_result ma_decoder_init_mp3__internal(const ma_decoder_config* pConfig, ma_dec
mp3Config.outputChannels = 2;
mp3Config.outputChannels = 2;
mp3Config.outputSampleRate = (pConfig->sampleRate != 0) ? pConfig->sampleRate : 44100;
mp3Config.outputSampleRate = (pConfig->sampleRate != 0) ? pConfig->sampleRate : 44100;
if (!drmp3_init(pMP3, ma_decoder_internal_on_read__mp3, ma_decoder_internal_on_seek__mp3, pDecoder, &mp3Config)) {
if (!drmp3_init(pMP3, ma_decoder_internal_on_read__mp3, ma_decoder_internal_on_seek__mp3, pDecoder, &mp3Config)) {
ma_free(pMP3);
return MA_ERROR;
return MA_ERROR;
}
}
...
@@ -34183,6 +34191,7 @@ ma_result ma_decoder_init_mp3__internal(const ma_decoder_config* pConfig, ma_dec
...
@@ -34183,6 +34191,7 @@ ma_result ma_decoder_init_mp3__internal(const ma_decoder_config* pConfig, ma_dec
result = ma_decoder__init_dsp(pDecoder, pConfig, ma_decoder_internal_on_read_pcm_frames__mp3);
result = ma_decoder__init_dsp(pDecoder, pConfig, ma_decoder_internal_on_read_pcm_frames__mp3);
if (result != MA_SUCCESS) {
if (result != MA_SUCCESS) {
drmp3_uninit(pMP3);
ma_free(pMP3);
ma_free(pMP3);
return result;
return result;
}
}
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