FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

added windows 64 bit support and made platform specific library loader. · HipHopScoreboard/processing@53fc01d · GitHub

Repository navigation

Commit 53fc01d

Browse files
committed
added windows 64 bit support and made platform specific library loader.
1 parent 83c4e20 commit 53fc01d

7 files changed

Lines changed: 179 additions & 164 deletions

File tree

2.66 MB
Binary file not shown.
6.1 MB
Binary file not shown.
304 KB
Binary file not shown.
2.27 MB
Binary file not shown.
89.3 KB
Binary file not shown.
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
all:
2-
3-
g++ -Ic:/Java/jdk1.8.0_11/include -Ic:/Java/jdk1.8.0_11/include/win32 -I./include -std=c++11 -g -c processing_sound_MethClaInterface.cpp;
4-
g++ -dynamiclib -lmethcla -L../../library/windows32/ -o libMethClaInterface.dll *.o;
5-
6-
clean:
7-
rm *.o
8-
rm *.dll
9-
10-
install:
11-
cp libMethClaInterface.dll ../../lib/windows32
1+
all:
2+
3+
g++ -Ic:/Java/jdk1.8.0_11/include -Ic:/Java/jdk1.8.0_11/include/win32 -I./include -std=c++11 -g -c processing_sound_MethClaInterface.cpp;
4+
g++ -shared -lmethcla -L../../library/windows64/ -static-libgcc -static-libstdc++ -o libMethClaInterface.dll *.o;
5+
6+
clean:
7+
rm *.o
8+
rm *.dll
9+
10+
install:
11+
cp libMethClaInterface.dll ../../lib/windows64
Lines changed: 168 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -1,153 +1,168 @@
1-
package processing.sound;
2-
3-
public class MethClaInterface
4-
{
5-
// load Library
6-
static {
7-
System.loadLibrary("MethClaInterface");
8-
}
9-
// Functions I want
10-
11-
public native int[] mixPlay(int[] input, float[] amp);
12-
13-
14-
// Engine
15-
16-
public native int engineNew(int sampleRate, int bufferSize );
17-
18-
public native void engineStart();
19-
20-
public native void engineStop();
21-
22-
// general Synth methods
23-
24-
public native void synthStop(int[] nodeId);
25-
26-
// general Oscillator methods
27-
28-
public native void oscSet(float freq, float amp, float add, float pos, int[] nodeId);
29-
30-
public native void oscAudioSet(int[] freqId, int[] ampId, int[] addId, int[] posId, int[] nodeId);
31-
32-
// Sine Wave Oscillator
33-
34-
public native int[] sinePlay(float freq, float amp, float add, float pos);
35-
36-
//Saw Wave Oscillator
37-
38-
public native int[] sawPlay(float freq, float amp, float add, float pos);
39-
40-
//Square Wave Oscillator
41-
42-
public native int[] sqrPlay(float freq, float amp, float add, float pos);
43-
44-
public native void sqrSet(float freq, float amp, float add, float pos, int[] nodeId);
45-
46-
// Triangle Wave Oscillator
47-
48-
public native int[] triPlay(float freq, float amp, float add, float pos);
49-
50-
// Pulse Wave Oscillator
51-
52-
public native int[] pulsePlay(float freq, float width, float amp, float add, float pos);
53-
54-
public native void pulseSet(float freq, float width, float amp, float add, float pos, int[] nodeId);
55-
56-
// Audio In
57-
58-
public native int[] audioInPlay(float amp, float add, float pos, int in);
59-
60-
public native void audioInSet(float amp, float add, float pos, int[] nodeId);
61-
62-
// SoundFile
63-
64-
public native int[] soundFileInfo(String path);
65-
66-
public native int[] soundFilePlayMono(float rate, float pos, float amp, float add, boolean loop, String path, float dur, int cue);
67-
68-
public native int[] soundFilePlayMulti(float rate, float amp, float add, boolean loop, String path, float dur, int cue);
69-
70-
public native void soundFileSetMono(float rate, float pos, float amp, float add, int[] nodeId);
71-
72-
public native void soundFileSetStereo(float rate, float amp, float add, int[] nodeId);
73-
74-
// White Noise
75-
76-
public native int[] whiteNoisePlay(float amp, float add, float pos);
77-
78-
public native void whiteNoiseSet(float amp, float add, float pos, int[] nodeId);
79-
80-
// Pink Noise
81-
82-
public native int[] pinkNoisePlay(float amp, float add, float pos);
83-
84-
public native void pinkNoiseSet(float amp, float add, float pos, int[] nodeId);
85-
86-
// Brown Noise
87-
88-
public native int[] brownNoisePlay(float amp, float add, float pos);
89-
90-
public native void brownNoiseSet(float amp, float add, float pos, int[] nodeId);
91-
92-
// Envelope
93-
94-
public native int[] envelopePlay(int[] input, float attackTime, float sustainTime, float sustainLevel, float releaseTime);
95-
96-
public native int doneAfter(float seconds);
97-
98-
// Filters
99-
100-
public native int[] highPassPlay(int[] input, float freq);
101-
102-
public native int[] lowPassPlay(int[] input, float freq);
103-
104-
public native int[] bandPassPlay(int[] input, float freq, float bw);
105-
106-
public native void filterSet(float freq, int nodeId);
107-
108-
public native void filterBwSet(float freq, float bw, int nodeId);
109-
110-
111-
// Delay
112-
113-
public native int[] delayPlay(int[] input, float maxDelayTime, float delayTime, float feedBack);
114-
115-
public native void delaySet(float delayTime, float feedBack, int nodeId);
116-
117-
// Reverb
118-
119-
public native int[] reverbPlay(int[] input, float room, float damp, float wet);
120-
121-
public native void reverbSet(float room, float damp, float wet, int nodeId);
122-
123-
// Patch cable
124-
125-
//public native int out(int[] in, int[] out);
126-
127-
// Pan + Out
128-
129-
public native void out(int out, int[] nodeId);
130-
131-
// connect
132-
133-
// public native void connect(int nodeIdOut, int nodeIdIn);
134-
135-
// Descriptors
136-
137-
// Amplitude Follower
138-
139-
public native long amplitude(int[] nodeId);
140-
141-
public native float poll_amplitude(long ptr);
142-
143-
public native void destroy_amplitude(long ptr);
144-
145-
// FFT
146-
147-
public native long fft(int[] nodeId, int fftSize);
148-
149-
public native float[] poll_fft(long ptr);
150-
151-
public native void destroy_fft(long ptr);
152-
153-
}
1+
package processing.sound;
2+
3+
public class MethClaInterface
4+
{
5+
6+
// load Library
7+
static {
8+
String osName = System.getProperty("os.name");
9+
String arch = System.getProperty("os.arch");
10+
11+
if (osName.startsWith("Win")){
12+
System.loadLibrary("LIBWINPTHREAD-1");
13+
System.loadLibrary("LIBSNDFILE-1");
14+
System.loadLibrary("LIBMPG123-0");
15+
System.loadLibrary("LIBMETHCLA");
16+
System.loadLibrary("LIBMETHCLAINTERFACE");
17+
}
18+
else if (osName.startsWith("Mac")){
19+
System.loadLibrary("MethClaInterface");
20+
}
21+
else if (osName.equals("Linux")){
22+
System.loadLibrary("MethClaInterface");
23+
}
24+
}
25+
// Functions I want
26+
27+
// Engine
28+
29+
public native int[] mixPlay(int[] input, float[] amp);
30+
31+
public native int engineNew(int sampleRate, int bufferSize );
32+
33+
public native void engineStart();
34+
35+
public native void engineStop();
36+
37+
// general Synth methods
38+
39+
public native void synthStop(int[] nodeId);
40+
41+
// general Oscillator methods
42+
43+
public native void oscSet(float freq, float amp, float add, float pos, int[] nodeId);
44+
45+
public native void oscAudioSet(int[] freqId, int[] ampId, int[] addId, int[] posId, int[] nodeId);
46+
47+
// Sine Wave Oscillator
48+
49+
public native int[] sinePlay(float freq, float amp, float add, float pos);
50+
51+
//Saw Wave Oscillator
52+
53+
public native int[] sawPlay(float freq, float amp, float add, float pos);
54+
55+
//Square Wave Oscillator
56+
57+
public native int[] sqrPlay(float freq, float amp, float add, float pos);
58+
59+
public native void sqrSet(float freq, float amp, float add, float pos, int[] nodeId);
60+
61+
// Triangle Wave Oscillator
62+
63+
public native int[] triPlay(float freq, float amp, float add, float pos);
64+
65+
// Pulse Wave Oscillator
66+
67+
public native int[] pulsePlay(float freq, float width, float amp, float add, float pos);
68+
69+
public native void pulseSet(float freq, float width, float amp, float add, float pos, int[] nodeId);
70+
71+
// Audio In
72+
73+
public native int[] audioInPlay(float amp, float add, float pos, int in);
74+
75+
public native void audioInSet(float amp, float add, float pos, int[] nodeId);
76+
77+
// SoundFile
78+
79+
public native int[] soundFileInfo(String path);
80+
81+
public native int[] soundFilePlayMono(float rate, float pos, float amp, float add, boolean loop, String path, float dur, int cue);
82+
83+
public native int[] soundFilePlayMulti(float rate, float amp, float add, boolean loop, String path, float dur, int cue);
84+
85+
public native void soundFileSetMono(float rate, float pos, float amp, float add, int[] nodeId);
86+
87+
public native void soundFileSetStereo(float rate, float amp, float add, int[] nodeId);
88+
89+
// White Noise
90+
91+
public native int[] whiteNoisePlay(float amp, float add, float pos);
92+
93+
public native void whiteNoiseSet(float amp, float add, float pos, int[] nodeId);
94+
95+
// Pink Noise
96+
97+
public native int[] pinkNoisePlay(float amp, float add, float pos);
98+
99+
public native void pinkNoiseSet(float amp, float add, float pos, int[] nodeId);
100+
101+
// Brown Noise
102+
103+
public native int[] brownNoisePlay(float amp, float add, float pos);
104+
105+
public native void brownNoiseSet(float amp, float add, float pos, int[] nodeId);
106+
107+
// Envelope
108+
109+
public native int[] envelopePlay(int[] input, float attackTime, float sustainTime, float sustainLevel, float releaseTime);
110+
111+
public native int doneAfter(float seconds);
112+
113+
// Filters
114+
115+
public native int[] highPassPlay(int[] input, float freq);
116+
117+
public native int[] lowPassPlay(int[] input, float freq);
118+
119+
public native int[] bandPassPlay(int[] input, float freq, float bw);
120+
121+
public native void filterSet(float freq, int nodeId);
122+
123+
public native void filterBwSet(float freq, float bw, int nodeId);
124+
125+
126+
// Delay
127+
128+
public native int[] delayPlay(int[] input, float maxDelayTime, float delayTime, float feedBack);
129+
130+
public native void delaySet(float delayTime, float feedBack, int nodeId);
131+
132+
// Reverb
133+
134+
public native int[] reverbPlay(int[] input, float room, float damp, float wet);
135+
136+
public native void reverbSet(float room, float damp, float wet, int nodeId);
137+
138+
// Patch cable
139+
140+
//public native int out(int[] in, int[] out);
141+
142+
// Pan + Out
143+
144+
public native void out(int out, int[] nodeId);
145+
146+
// connect
147+
148+
// public native void connect(int nodeIdOut, int nodeIdIn);
149+
150+
// Descriptors
151+
152+
// Amplitude Follower
153+
154+
public native long amplitude(int[] nodeId);
155+
156+
public native float poll_amplitude(long ptr);
157+
158+
public native void destroy_amplitude(long ptr);
159+
160+
// FFT
161+
162+
public native long fft(int[] nodeId, int fftSize);
163+
164+
public native float[] poll_fft(long ptr);
165+
166+
public native void destroy_fft(long ptr);
167+
168+
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL