Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
plugin-GUI
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
Model registry
Operate
Environments
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
yehaojie
plugin-GUI
Commits
56937928
Commit
56937928
authored
12 years ago
by
aacuevas
Browse files
Options
Downloads
Patches
Plain Diff
Prevented segfault when starting with no data channels
parent
f549c233
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Source/Processors/AudioNode.cpp
+25
-22
25 additions, 22 deletions
Source/Processors/AudioNode.cpp
with
25 additions
and
22 deletions
Source/Processors/AudioNode.cpp
+
25
−
22
View file @
56937928
...
...
@@ -166,32 +166,35 @@ void AudioNode::process(AudioSampleBuffer &buffer,
// clear the left and right channels
buffer
.
clear
(
0
,
0
,
buffer
.
getNumSamples
());
buffer
.
clear
(
1
,
0
,
buffer
.
getNumSamples
());
for
(
int
i
=
2
;
i
<
buffer
.
getNumChannels
();
i
++
)
if
(
channelPointers
.
size
()
>
0
)
{
if
(
channelPointers
[
i
-
2
]
->
isMonitored
)
for
(
int
i
=
2
;
i
<
buffer
.
getNumChannels
();
i
++
)
{
buffer
.
addFrom
(
0
,
// destination channel
0
,
// destination start sample
buffer
,
// source
i
,
// source channel
0
,
// source start sample
buffer
.
getNumSamples
(),
// number of samples
volume
// gain to apply
);
buffer
.
addFrom
(
1
,
// destination channel
0
,
// destination start sample
buffer
,
// source
i
,
// source channel
0
,
// source start sample
buffer
.
getNumSamples
(),
// number of samples
volume
// gain to apply
);
}
if
(
channelPointers
[
i
-
2
]
->
isMonitored
)
{
buffer
.
addFrom
(
0
,
// destination channel
0
,
// destination start sample
buffer
,
// source
i
,
// source channel
0
,
// source start sample
buffer
.
getNumSamples
(),
// number of samples
volume
// gain to apply
);
buffer
.
addFrom
(
1
,
// destination channel
0
,
// destination start sample
buffer
,
// source
i
,
// source channel
0
,
// source start sample
buffer
.
getNumSamples
(),
// number of samples
volume
// gain to apply
);
}
}
}
}
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