M
Matthew Zimmer
Hi all,
I currently have a baduk game online that is written in java. I am
trying to add a new feature to it: the ability for someone playing a
game to chat with people watching it. Here's the basic setup:
- I have a central server that runs everything.
- All communication from one client to another goes through the server.
- One client will speak into their microphone, and anybody who chooses
to and is listening to the game will hear what they say.
I've been playing around with the JMF and have become fairly frustrated
with the lack of decent examples. Here's what I've managed to accomplish:
- I can record from a microphone.
- I can play back a file that is saved from the microphone.
- I have all the connections to the server set up.
For the recording and the playing I've been using the classes in
javax.sound.sampled.
Here's what I haven't managed to figure out:
- How can I break up the input from the microphone into small packets
and send them one at a time.
- Then, when I receive the small packet, how can I actually play them.
Everything I've been reading says to use RTP. However, I would rather
not use RTP as I have all the issues solved with transmitting the data
to and from the clients and the servers, including all the issues of who
should get what sound when. Is there some other mechanism I can use to
break up the audio sound, and if so does anybody know of any good
references to help with this?
Thanks,
Matthew Zimmer
I currently have a baduk game online that is written in java. I am
trying to add a new feature to it: the ability for someone playing a
game to chat with people watching it. Here's the basic setup:
- I have a central server that runs everything.
- All communication from one client to another goes through the server.
- One client will speak into their microphone, and anybody who chooses
to and is listening to the game will hear what they say.
I've been playing around with the JMF and have become fairly frustrated
with the lack of decent examples. Here's what I've managed to accomplish:
- I can record from a microphone.
- I can play back a file that is saved from the microphone.
- I have all the connections to the server set up.
For the recording and the playing I've been using the classes in
javax.sound.sampled.
Here's what I haven't managed to figure out:
- How can I break up the input from the microphone into small packets
and send them one at a time.
- Then, when I receive the small packet, how can I actually play them.
Everything I've been reading says to use RTP. However, I would rather
not use RTP as I have all the issues solved with transmitting the data
to and from the clients and the servers, including all the issues of who
should get what sound when. Is there some other mechanism I can use to
break up the audio sound, and if so does anybody know of any good
references to help with this?
Thanks,
Matthew Zimmer