I would like to play a sound in all ongoing skype calls, prefferably using skype4java (or something else if someone knows how)
This is the code I have so far but it is not working, what should I change? or is it just easier to use something else to accomplish this?
public class exampleplaysoundincall {
public static void main(String[] args) {
MakeSound s=new MakeSound();
File f = new File(".\\wavfile.wav");
s.skypesound(f);
}
public void skypesound(File sound){
Connector instance = Win32Connector.getInstance();
instance.setApplicationName("soundmaker");
System.out.println("Metod runs");
try {
System.out.println("Running:"+Skype.isRunning());
} catch (SkypeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("Installed:"+Skype.isInstalled());
try {
Call[] active = Skype.getAllActiveCalls();
for (int i = 0; i < active.length; i++) {
System.out.println("active call nr:"+i);
active[i].setFileCaptureMic(sound) ;
active[i].setFileInput(sound);
//active[i].clearFileInput();
}
} catch (SkypeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}