FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
processing/java/libraries/sound/src/processing/sound/Mix.java at master · h2oop/processing · GitHub
h2oop
processing
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
processing
/
java
/
libraries
/
sound
/
src
/
processing
/
sound
/
Mix.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
42 lines (33 loc) · 888 Bytes
Breadcrumbs
processing
/
java
/
libraries
/
sound
/
src
/
processing
/
sound
/
Mix.java
Copy path
File metadata and controls
42 lines (33 loc) · 888 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package
processing
.
sound
;
import
processing
.
core
.
PApplet
;
public
class
Mix
implements
SoundObject
{
PApplet
parent
;
private
Engine
m_engine
;
private
int
m_nodeId
[] = {-
1
,-
1
};
private
int
[]
m_nodeInIds
;
private
float
[]
m_amps
;
public
Mix
(
PApplet
theParent
) {
this
.
parent
=
theParent
;
parent
.
registerMethod
(
"dispose"
,
this
);
m_engine
.
setPreferences
(
theParent
,
512
,
44100
);
m_engine
.
start
();
}
public
void
play
(
SoundObject
[]
input
,
float
[]
amps
){
m_amps
=
amps
;
for
(
int
i
=
0
;
i
<
input
.
length
;
i
++) {
int
[]
returnId
=
input
[
i
].
returnId
();
m_nodeInIds
[
i
*
2
]=
returnId
[
0
];
m_nodeInIds
[(
i
*
2
)+
1
]=
returnId
[
1
];
}
//m_nodeId = m_engine.mixPlay(input.length, m_nodeInIds, amps);
}
public
int
[]
returnId
(){
return
m_nodeId
;
}
public
void
stop
(){
m_engine
.
synthStop
(
m_nodeId
);
}
public
void
dispose
() {
m_engine
.
synthStop
(
m_nodeId
);
}
}
Back
|
FazBrowse Home
|
New Git URL