Originally, it is very complicated from the microphone to get audio input, and it is very simple to have Javasound already packaged. You can use AUDIOCAPTURE to complete.
The playback of chat room audio is generally completed: The AudioPlayStream class is responsible. The chat room is more complicated or the combination of audio flow and multi-threaded. 1 A session that needs to be created for each chat, is a client connection. 2 Need to create a thread corresponding to the session to send an audio stream. 3 Create a thread that receives the audio stream, after receiving, play. Technical difficulties: 1. Look at the following code: while (! Thread.currentthread (). Interrupted ())) {Try {nbr = pbis.read (data); if (nbr == -1) {c = true; Break;} PBL.Write (DATA, 0, NBREAD);} catch (ioexception e) {system.exit (1);}}
The above is: while (! Thread.currentthread (). Interrupted ())) This sentence, what is the case? Is SYSTEM.EXIT (1) this is not exiting the current thread?
2, while ((! Thread.currentthread (). Interrupted ())) {b = mis.read (CV, 0, BS); SS.WRITE (CV, 0, B);} Taking voice using this way Input, if the line is computed, print an error message.
http://www-106.ibm.com/developerWorks/websphere/zones/voice/
It is now possible to achieve a distribution chat, using GSM voice compression, but it is found that even if the client and server are also delayed in the local area. There is still no buffering processing yet, it is time to chat, if the speech is fast, the accepted speed is slow, there may be problems. 20040710 TCF
SourceForge.net7 Best Reception Equipment: Audacity
TCP-based local area network multiple users communications, file transfer procedures detailed
http://www.vckbase.com/document/viewdoc/?id=349
Japanese written: http://www.asahi-net.or.jp/~vz4h-sruz/ipmsg-eng.html
It is now found that the above ideas is actually close to voice email: