Hi all,
I have a Processing program that talks via a network socket to veejay, a vjing software.
I noticed a strange behavior with Client.available().
The idea is that my method timeouts if the bytes are not received within 200ms.
While my dev computer (an i686 running linux) behaves correctly, the two other computers (two x86_64 running linux, ubuntu or archlinux) show me mesages like:
timed out while waiting for bytes (1008/8)
8 being the number of bytes I'd want to receive, and 1008 being the result of Client.available().
public byte[] read_control(int numtoread) {
// vims_control is a Client bound to 127.0.0.1:3490
byte answer[] = new byte[numtoread];
int timeout = parent.millis() + 200;
while(vims_control.available() < numtoread) {
if(parent.millis() > timeout) {
parent.println("timed out while waiting for bytes ("
+ vims_control.available() + "/"
+ numtoread + ")");
break;
}
};
vims_control.readBytes(answer);
return answer;
}
I'm not sure the problem lies in Processing or Java. So any idea about where to check or how to do this properly is welcome.
Can it be there's some kind of buffering at the java or system level ?
Hi all,
I'm using Processing on Linux, and I have to use Jack (that works) because I mix sound from multiple software (one being processing, the other being veejay).
Wether it's with Alsa or Jack, Minim shows no controller for audio outputs because of a limitation of the java sound api on Linux.
What I want to do is crossfade two audio files, like I fade out file1 while fading in file2. It works on Mac (with cracks, but it works).
So my question is, how can I control the volume of a sample in software ? Like the equivalent of pure-data's [*~] ?
I'm trying to display a sequence of videos (like hundreds so an array is not a option), with no interruption between the last frame of a video and the first frame of the next one. I'm using gsvideo 0.9 with processing 1.5 on a linux computer. Gstreamer is fairly recent (0.10 and so).
Here is a reduced sample code of what I want to do. At first the video is looping, just to show it's a loop. Then the program switches between two files. This shows a glitch. For that example, the two files are the same loop so we can clearly see the problem.
Maybe I'm doing something wrong, should I use something like Offscreen buffers ? If so how ?