Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Gdpd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
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
IVMI
Gdpd
Commits
27b11bf6
Commit
27b11bf6
authored
1 year ago
by
Florent Berthaut
Browse files
Options
Downloads
Patches
Plain Diff
Fixed crash on receiving messages
parent
3dd916f2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
demo/Main.tscn
+3
-3
3 additions, 3 deletions
demo/Main.tscn
src/gdpd.cpp
+5
-2
5 additions, 2 deletions
src/gdpd.cpp
with
8 additions
and
5 deletions
demo/Main.tscn
+
3
−
3
View file @
27b11bf6
...
...
@@ -9,9 +9,9 @@ func _ready():
pass
func _process(delta):
#
while _gdpd.has_message() :
#
var msg = _gdpd.get_next()
#
print(\"got message from pd \", msg)
while _gdpd.has_message() :
var msg = _gdpd.get_next()
print(\"got message from pd \", msg)
pass
func _load_patch(pd_patch) :
...
...
This diff is collapsed.
Click to expand it.
src/gdpd.cpp
+
5
−
2
View file @
27b11bf6
...
...
@@ -182,6 +182,7 @@ int GdPd::start() {
}
void
GdPd
::
stop
()
{
m_init
=
false
;
m_audio
.
stopStream
();
m_audio
.
closeStream
();
m_pd
.
computeAudio
(
false
);
...
...
@@ -235,8 +236,10 @@ void GdPd::subscribe(String symbStr) {
}
bool
GdPd
::
has_message
()
{
//receive new messages
m_pd
.
receiveMessages
();
if
(
m_init
)
{
//receive new messages
m_pd
.
receiveMessages
();
}
//return if more than one message
int
size
=
m_messages
->
size
();
...
...
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