summaryrefslogtreecommitdiffstats
path: root/tdehtml/java/org/kde/kjas/server/KJASSoundPlayer.java
blob: a37c2bbd4ede5327086d810682b273e7edec09ac (plain)
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
package org.kde.kjas.server;

import java.applet.*;
import java.net.*;

public class KJASSoundPlayer implements AudioClip
{
    private String file;
    private String contextId;

    public KJASSoundPlayer( String _contextId, URL _file )
    {
        file = _file.toString();
        contextId = _contextId;
        Main.debug("KJASSoundPlayer( URL '" + _file + "')");
    }

    public void loop()
    {
        Main.debug("KJASSoundPlayer loop() URL='" + file + "'");
        Main.protocol.sendAudioClipLoopCommand(contextId, file);
    }

    public void play()
    {
       Main.debug("KJASSoundPlayer play() URL='" + file + "'");
       Main.protocol.sendAudioClipPlayCommand(contextId, file);
    }

    public void stop()
    {
       Main.debug("KJASSoundPlayer stop() URL='" + file + "'");
       Main.protocol.sendAudioClipStopCommand(contextId, file);
    }
}