Class ThincSMsgSoundPlay
java.lang.Object
ThincMsg
ThincSMsg
ThincSMsgSound
ThincSMsgSoundPlay
public final class ThincSMsgSoundPlay
- extends ThincSMsgSound
class for creating and getting sound stream.
- Author:
- Young Jin Yoon
- See Also:
ThincSMsgSound
Method Summary |
private void |
playSound(javax.sound.sampled.SourceDataLine src,
int size,
int timestamp)
playSound()
play the sound by using write method from SourceDataLine object. |
void |
process()
process()
get the stream from the server and try to play it. if it is the
first stream from the server, save the information for stream
in the hash table. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MESSAGE_TYPE
public static final int MESSAGE_TYPE
- See Also:
- Constant Field Values
MESSAGE_SIZE
public static final int MESSAGE_SIZE
- See Also:
- Constant Field Values
ThincSMsgSoundPlay
public ThincSMsgSoundPlay(ThincSoundHandler h)
- creates ThincSMsgSoundPlay object.
- Parameters:
h
- ThincSoundHandler
to handle the message
process
public void process()
throws ThincException
- process()
get the stream from the server and try to play it. if it is the
first stream from the server, save the information for stream
in the hash table.
- Specified by:
process
in class ThincMsg
- Throws:
ThincException
playSound
private void playSound(javax.sound.sampled.SourceDataLine src,
int size,
int timestamp)
throws ThincException
- playSound()
play the sound by using write method from
SourceDataLine
object.
- Throws:
ThincException