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
44aa02db
Commit
44aa02db
authored
1 year ago
by
Florent Berthaut
Browse files
Options
Downloads
Patches
Plain Diff
Add return for opening file
parent
51164ed1
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
SConstruct
+9
-0
9 additions, 0 deletions
SConstruct
src/gdpd.cpp
+4
-3
4 additions, 3 deletions
src/gdpd.cpp
src/gdpd.h
+1
-1
1 addition, 1 deletion
src/gdpd.h
src/rtaudio/RtAudio.os
+0
-0
0 additions, 0 deletions
src/rtaudio/RtAudio.os
with
14 additions
and
4 deletions
SConstruct
+
9
−
0
View file @
44aa02db
...
...
@@ -91,8 +91,17 @@ if env["platform"] == "linux":
'
-fPIC
'
,
'
-O3
'
,
'
-ffast-math
'
,
'
-funroll-loops
'
,
'
-fomit-frame-pointer
'
])
env
.
Append
(
CXXFLAGS
=
[
'
-std=c++17
'
])
elif
env
[
"
platform
"
]
==
"
android
"
:
env
.
Append
(
CPPDEFINES
=
[
'
__UNSPECIFIED__
'
,
'
HAVE_LIBDL
'
])
env
.
Append
(
CFLAGS
=
[
'
-Wno-int-to-pointer-cast
'
,
'
-Wno-pointer-to-int-cast
'
,
'
-Wno-discarded-qualifiers
'
,
'
-fPIC
'
,
'
-O3
'
,
'
-ffast-math
'
,
'
-funroll-loops
'
,
'
-fomit-frame-pointer
'
])
env
.
Append
(
CXXFLAGS
=
[
'
-std=c++17
'
])
elif
env
[
"
platform
"
]
==
"
windows
"
:
env
.
Append
(
CPPDEFINES
=
[
'
NOMINMAX
'
,
'
__WINDOWS_DS__
'
,
'
PD_INTERNAL
'
])
elif
env
[
"
platform
"
]
==
"
macos
"
:
env
.
Append
(
CPPDEFINES
=
[
'
NOMINMAX
'
,
'
__MACOSX_CORE__
'
,
'
PD_INTERNAL
'
])
if
env
[
"
platform
"
]
==
"
macos
"
:
library
=
env
.
SharedLibrary
(
...
...
This diff is collapsed.
Click to expand it.
src/gdpd.cpp
+
4
−
3
View file @
44aa02db
...
...
@@ -97,7 +97,6 @@ int GdPd::init_devices(String inputDevice, String outputDevice) {
std
::
string
inpStr
(
inputDevice
.
utf8
().
get_data
());
std
::
string
outStr
(
outputDevice
.
utf8
().
get_data
());
for
(
int
d
=
0
;
d
<
m_audio
.
getDeviceCount
();
d
++
)
{
std
::
string
n
=
m_audio
.
getDeviceInfo
(
d
).
name
;
if
(
n
.
compare
(
inpStr
)
==
0
)
{
...
...
@@ -202,23 +201,25 @@ void GdPd::processAudio(void *outputBuffer, void *inputBuffer,
}
}
void
GdPd
::
openfile
(
godot
::
String
baseStr
,
godot
::
String
dirStr
)
{
bool
GdPd
::
openfile
(
godot
::
String
baseStr
,
godot
::
String
dirStr
)
{
std
::
string
baseS
(
baseStr
.
utf8
().
get_data
());
std
::
string
dirS
(
dirStr
.
utf8
().
get_data
());
if
(
m_patchsMap
.
find
(
baseS
)
!=
m_patchsMap
.
end
())
{
print
(
"Patch "
+
baseS
+
" already opened"
);
return
;
return
true
;
}
pd
::
Patch
p1
=
m_pd
.
openPatch
(
baseS
.
c_str
(),
dirS
.
c_str
());
if
(
!
p1
.
isValid
())
{
print
(
"Could not open patch "
+
baseS
);
return
false
;
}
else
{
print
(
"Opened patch "
+
baseS
);
m_patchsMap
[
baseS
]
=
p1
;
}
return
true
;
}
void
GdPd
::
closefile
(
godot
::
String
baseStr
)
{
...
...
This diff is collapsed.
Click to expand it.
src/gdpd.h
+
1
−
1
View file @
44aa02db
...
...
@@ -76,7 +76,7 @@ public:
int
init
(
int
nbInputs
,
int
nbOutputs
,
int
sampleRate
,
int
bufferSize
);
int
start
();
void
stop
();
void
openfile
(
String
basename
,
String
dirname
);
bool
openfile
(
String
basename
,
String
dirname
);
void
closefile
(
String
basename
);
bool
has_message
();
Array
get_next
();
...
...
This diff is collapsed.
Click to expand it.
src/rtaudio/RtAudio.os
+
0
−
0
View file @
44aa02db
No preview for this file type
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