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
31793a3f
Commit
31793a3f
authored
Aug 25, 2020
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiment with fixing a looping bug.
parent
19c52c98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
research/ma_engine.h
research/ma_engine.h
+7
-2
No files found.
research/ma_engine.h
View file @
31793a3f
...
...
@@ -2198,6 +2198,7 @@ static ma_result ma_resource_manager_data_buffer_init_nolock(ma_resource_manager
}
/* The existing node may be in the middle of loading. We need to wait for the node to finish loading before going any further. */
/* TODO: This needs to be improved so that when loading asynchronously we post a message to the job queue instead of just waiting. */
while
(
pDataBuffer
->
pNode
->
result
==
MA_BUSY
)
{
ma_yield
();
}
...
...
@@ -5360,8 +5361,12 @@ static void ma_engine_mix_sound(ma_engine* pEngine, ma_sound_group* pGroup, ma_s
/* If we reached the end of the sound we'll want to mark it as at the end and stop it. This should never be returned for looping sounds. */
if
(
result
==
MA_AT_END
)
{
ma_sound_stop_internal
(
pSound
);
c89atomic_exchange_32
(
&
pSound
->
atEnd
,
MA_TRUE
);
/* This will be set to false in ma_sound_start(). */
if
(
pSound
->
isLooping
)
{
ma_sound_seek_to_pcm_frame
(
pSound
,
0
);
}
else
{
ma_sound_stop_internal
(
pSound
);
c89atomic_exchange_32
(
&
pSound
->
atEnd
,
MA_TRUE
);
/* This will be set to false in ma_sound_start(). */
}
}
pSound
->
runningTimeInEngineFrames
+=
offsetInFrames
+
framesProcessed
;
...
...
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