Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
boytacean
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
João Magalhães
boytacean
Commits
d2bc2be6
Verified
Commit
d2bc2be6
authored
1 year ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
docs: better comments
parent
47ff4f7e
No related branches found
No related tags found
No related merge requests found
Pipeline
#3177
passed
1 year ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontends/sdl/src/main.rs
+2
-12
2 additions, 12 deletions
frontends/sdl/src/main.rs
with
2 additions
and
12 deletions
frontends/sdl/src/main.rs
+
2
−
12
View file @
d2bc2be6
...
...
@@ -473,10 +473,8 @@ impl Emulator {
}
// in case there's new significant new audio data available in
// the emulator we must handle it
by
sending it to the audio callback
// the emulator we must handle it
,
sending it to the audio callback
if
self
.system
.audio_buffer
()
.len
()
>
self
.max_audio_buffer
as
usize
{
// in case the audio subsystem is enabled, then the audio buffer
// must be queued into the SDL audio subsystem
if
let
Some
(
audio
)
=
self
.audio
.as_mut
()
{
let
audio_buffer
=
self
.system
...
...
@@ -486,18 +484,13 @@ impl Emulator {
.collect
::
<
Vec
<
f32
>>
();
audio
.device
.queue_audio
(
&
audio_buffer
)
.unwrap
();
}
// clears the audio buffer to prevent it from
// "exploding" in size, this is required GC operation
self
.system
.clear_audio_buffer
();
}
}
// in case there's pending audio data available in the emulator
// we must handle it
by
sending it to the audio callback
// we must handle it
,
sending it to the audio callback
if
self
.system
.audio_buffer
()
.is_empty
()
{
// in case the audio subsystem is enabled, then the audio buffer
// must be queued into the SDL audio subsystem
if
let
Some
(
audio
)
=
self
.audio
.as_mut
()
{
let
audio_buffer
=
self
.system
...
...
@@ -507,9 +500,6 @@ impl Emulator {
.collect
::
<
Vec
<
f32
>>
();
audio
.device
.queue_audio
(
&
audio_buffer
)
.unwrap
();
}
// clears the audio buffer to prevent it from
// "exploding" in size, this is required GC operation
self
.system
.clear_audio_buffer
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment