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
902df086
Commit
902df086
authored
Jan 08, 2022
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a bug with encoders where a file handle can be left unclosed.
parent
700dba14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
miniaudio.h
miniaudio.h
+21
-8
No files found.
miniaudio.h
View file @
902df086
/*
/*
Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file.
Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file.
miniaudio - v0.11.
3 - 2022-01-07
miniaudio - v0.11.
4 - TBD
David Reid - mackron@gmail.com
David Reid - mackron@gmail.com
...
@@ -3634,7 +3634,7 @@ extern "C" {
...
@@ -3634,7 +3634,7 @@ extern "C" {
#define MA_VERSION_MAJOR 0
#define MA_VERSION_MAJOR 0
#define MA_VERSION_MINOR 11
#define MA_VERSION_MINOR 11
#define MA_VERSION_REVISION
3
#define MA_VERSION_REVISION
4
#define MA_VERSION_STRING MA_XSTRINGIFY(MA_VERSION_MAJOR) "." MA_XSTRINGIFY(MA_VERSION_MINOR) "." MA_XSTRINGIFY(MA_VERSION_REVISION)
#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__)
#if defined(_MSC_VER) && !defined(__clang__)
...
@@ -61605,12 +61605,9 @@ MA_API ma_result ma_encoder_init__internal(ma_encoder_write_proc onWrite, ma_enc
...
@@ -61605,12 +61605,9 @@ MA_API ma_result ma_encoder_init__internal(ma_encoder_write_proc onWrite, ma_enc
/* Getting here means we should have our backend callbacks set up. */
/* Getting here means we should have our backend callbacks set up. */
if (result == MA_SUCCESS) {
if (result == MA_SUCCESS) {
result = pEncoder->onInit(pEncoder);
result = pEncoder->onInit(pEncoder);
if (result != MA_SUCCESS) {
return result;
}
}
}
return
MA_SUCCESS
;
return
result
;
}
}
MA_API size_t ma_encoder__on_write_stdio(ma_encoder* pEncoder, const void* pBufferIn, size_t bytesToWrite)
MA_API size_t ma_encoder__on_write_stdio(ma_encoder* pEncoder, const void* pBufferIn, size_t bytesToWrite)
...
@@ -61641,7 +61638,13 @@ MA_API ma_result ma_encoder_init_file(const char* pFilePath, const ma_encoder_co
...
@@ -61641,7 +61638,13 @@ MA_API ma_result ma_encoder_init_file(const char* pFilePath, const ma_encoder_co
pEncoder->pFile = pFile;
pEncoder->pFile = pFile;
return ma_encoder_init__internal(ma_encoder__on_write_stdio, ma_encoder__on_seek_stdio, NULL, pEncoder);
result = ma_encoder_init__internal(ma_encoder__on_write_stdio, ma_encoder__on_seek_stdio, NULL, pEncoder);
if (result != MA_SUCCESS) {
fclose(pFile);
return result;
}
return MA_SUCCESS;
}
}
MA_API ma_result ma_encoder_init_file_w(const wchar_t* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder)
MA_API ma_result ma_encoder_init_file_w(const wchar_t* pFilePath, const ma_encoder_config* pConfig, ma_encoder* pEncoder)
...
@@ -61662,7 +61665,13 @@ MA_API ma_result ma_encoder_init_file_w(const wchar_t* pFilePath, const ma_encod
...
@@ -61662,7 +61665,13 @@ MA_API ma_result ma_encoder_init_file_w(const wchar_t* pFilePath, const ma_encod
pEncoder->pFile = pFile;
pEncoder->pFile = pFile;
return ma_encoder_init__internal(ma_encoder__on_write_stdio, ma_encoder__on_seek_stdio, NULL, pEncoder);
result = ma_encoder_init__internal(ma_encoder__on_write_stdio, ma_encoder__on_seek_stdio, NULL, pEncoder);
if (result != MA_SUCCESS) {
fclose(pFile);
return result;
}
return MA_SUCCESS;
}
}
MA_API ma_result ma_encoder_init(ma_encoder_write_proc onWrite, ma_encoder_seek_proc onSeek, void* pUserData, const ma_encoder_config* pConfig, ma_encoder* pEncoder)
MA_API ma_result ma_encoder_init(ma_encoder_write_proc onWrite, ma_encoder_seek_proc onSeek, void* pUserData, const ma_encoder_config* pConfig, ma_encoder* pEncoder)
...
@@ -89538,6 +89547,10 @@ There have also been some other smaller changes added to this release.
...
@@ -89538,6 +89547,10 @@ There have also been some other smaller changes added to this release.
/*
/*
REVISION HISTORY
REVISION HISTORY
================
================
v0.11.4 - TBD
- Fix a bug when initializing an encoder from a file where the file handle does not get closed in
the event of an error.
v0.11.3 - 2022-01-07
v0.11.3 - 2022-01-07
- Add a new flag for nodes called MA_NODE_FLAG_SILENT_OUTPUT which tells miniaudio that the
- Add a new flag for nodes called MA_NODE_FLAG_SILENT_OUTPUT which tells miniaudio that the
output of the node should always be treated as silence. This gives miniaudio an optimization
output of the node should always be treated as silence. This gives miniaudio an optimization
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