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
e7940394
Commit
e7940394
authored
Nov 28, 2020
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some bugs with trying to access uninitialized variables.
parent
d6864c5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
miniaudio.h
miniaudio.h
+17
-2
research/miniaudio_engine.h
research/miniaudio_engine.h
+12
-0
No files found.
miniaudio.h
View file @
e7940394
/*
Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file.
miniaudio - v0.10.2
6 - 2020-11-24
miniaudio - v0.10.2
7 - TBD
David Reid - mackron@gmail.com
...
...
@@ -1447,7 +1447,7 @@ extern "C" {
#define MA_VERSION_MAJOR 0
#define MA_VERSION_MINOR 10
#define MA_VERSION_REVISION 2
6
#define MA_VERSION_REVISION 2
7
#define MA_VERSION_STRING MA_XSTRINGIFY(MA_VERSION_MAJOR) "." MA_XSTRINGIFY(MA_VERSION_MINOR) "." MA_XSTRINGIFY(MA_VERSION_REVISION)
#if defined(_MSC_VER) && !defined(__clang__)
...
...
@@ -42869,6 +42869,18 @@ MA_API ma_result ma_data_source_get_data_format(ma_data_source* pDataSource, ma_
ma_uint32 sampleRate;
ma_data_source_callbacks* pCallbacks = (ma_data_source_callbacks*)pDataSource;
if (pFormat != NULL) {
*pFormat = ma_format_unknown;
}
if (pChannels != NULL) {
*pChannels = 0;
}
if (pSampleRate != NULL) {
*pSampleRate = 0;
}
if (pCallbacks == NULL || pCallbacks->onGetDataFormat == NULL) {
return MA_INVALID_ARGS;
}
...
...
@@ -64249,6 +64261,9 @@ The following miscellaneous changes have also been made.
/*
REVISION HISTORY
================
v0.10.27 - TBD
- Fix some bugs with trying to access uninitialized variables.
v0.10.26 - 2020-11-24
- WASAPI: Fix a bug where the exclusive mode format may not be retrieved correctly due to accessing freed memory.
- Fix a bug with ma_waveform where glitching occurs after changing frequency.
research/miniaudio_engine.h
View file @
e7940394
...
...
@@ -3621,11 +3621,15 @@ static ma_result ma_rb_data_source_init(ma_rb* pRB, ma_format format, ma_uint32
return
MA_INVALID_ARGS
;
}
MA_ZERO_OBJECT
(
pDataSource
);
/* For safety. */
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
.
onMap
=
ma_rb_data_source__on_map
;
pDataSource
->
ds
.
onUnmap
=
ma_rb_data_source__on_unmap
;
pDataSource
->
ds
.
onGetDataFormat
=
ma_rb_data_source__on_get_format
;
pDataSource
->
ds
.
onGetCursor
=
NULL
;
pDataSource
->
ds
.
onGetLength
=
NULL
;
pDataSource
->
pRB
=
pRB
;
pDataSource
->
format
=
format
;
pDataSource
->
channels
=
channels
;
...
...
@@ -6149,6 +6153,14 @@ MA_API ma_result ma_resource_manager_data_stream_get_data_format(ma_resource_man
/* We cannot be using the data source after it's been uninitialized. */
MA_ASSERT
(
pDataStream
->
result
!=
MA_UNAVAILABLE
);
if
(
pFormat
!=
NULL
)
{
*
pFormat
=
ma_format_unknown
;
}
if
(
pChannels
!=
NULL
)
{
*
pChannels
=
0
;
}
if
(
pDataStream
==
NULL
)
{
return
MA_INVALID_ARGS
;
}
...
...
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