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
9972488b
Commit
9972488b
authored
Jul 22, 2020
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some comments to the resource manager example for clarity.
parent
3bcdf394
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
research/_examples/resource_manager.c
research/_examples/resource_manager.c
+10
-1
No files found.
research/_examples/resource_manager.c
View file @
9972488b
...
...
@@ -56,17 +56,26 @@ static ma_thread_result MA_THREADCALL custom_job_thread(void* pUserData)
ma_result
result
;
ma_job
job
;
/*
Retrieve a job from the queue first. This defines what it is you're about to do. By default this will be
blocking. You can initialize the resource manager with MA_RESOURCE_MANAGER_FLAG_NON_BLOCKING to not block in
which case MA_NO_DATA_AVAILABLE will be returned if no jobs are available.
*/
result
=
ma_resource_manager_next_job
(
pResourceManager
,
&
job
);
if
(
result
!=
MA_SUCCESS
)
{
break
;
}
/* Terminate if we got a quit message. */
/*
Terminate if we got a quit message. You don't need to terminate like this, but's a bit more robust. You can
just use a global variable or something similar if it's easier for you particular situation.
*/
if
(
job
.
toc
.
code
==
MA_JOB_QUIT
)
{
printf
(
"CUSTOM JOB THREAD TERMINATING... "
);
break
;
}
/* Call ma_resource_manager_process_job() to actually do the work to process the job. */
printf
(
"PROCESSING IN CUSTOM JOB THREAD: %d
\n
"
,
job
.
toc
.
code
);
ma_resource_manager_process_job
(
pResourceManager
,
&
job
);
}
...
...
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