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
bf60b961
Commit
bf60b961
authored
Dec 12, 2021
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation about object management.
parent
23e87698
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
miniaudio.h
miniaudio.h
+9
-1
No files found.
miniaudio.h
View file @
bf60b961
...
@@ -30,7 +30,15 @@ In miniaudio, objects are transparent structures. Unlike many other libraries, t
...
@@ -30,7 +30,15 @@ In miniaudio, objects are transparent structures. Unlike many other libraries, t
to opaque objects which means you need to allocate memory for objects yourself. In the examples
to opaque objects which means you need to allocate memory for objects yourself. In the examples
presented in this documentation you will often see objects declared on the stack. You need to be
presented in this documentation you will often see objects declared on the stack. You need to be
careful when translating these examples to your own code so that you don't accidentally declare
careful when translating these examples to your own code so that you don't accidentally declare
your objects on the stack and then cause them to become invalid once the function returns.
your objects on the stack and then cause them to become invalid once the function returns. In
addition, you must ensure the memory address of your objects remain the same throughout their
lifetime. You therefore cannot be making copies of your objects.
A config/init pattern is used throughout the entire library. The idea is that you set up a config
object and pass that into the initialization routine. The config object can be allocated on the
stack and does not need to be maintained after initialization of the corresponding object. The
advantage to this system is that the config object can be initialized with logical defaults and new
properties added to it without breaking the API.
1.1. Low Level API
1.1. Low Level API
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