1

できればskype4java(または誰かが方法を知っている場合は他のもの)を使用して、進行中のすべてのSkype通話でサウンドを再生したいと思います

これは私がこれまでに持っているコードですが、機能していません。何を変更すればよいですか? それとも、これを達成するために何か他のものを使用する方が簡単ですか?

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();
    }
}
}
4

0 に答える 0