J
John
Hi,
I receive audio via a socket. I receive 16-bit, mono, 8000sps data. I
can play this out the speaker using Java Sound perfectly. It's
wonderful how much easier this is than DirectX.
Anyway, I need to be able to save the data I receive for later play
back. I was going to write the Wave header myself, but it seems like
there should be some way to write out the data using Java Sound.
I create a ByteArrayInputStream. I create an AudioInputStream from
this. I then call AudioSystem.write() using the AudioInputStream and a
FileOutputStream.
I can hear the sounds, but it has pops in it. I'm guessing that it is
writing out a WAVE header for every call to AudioSystem.write(). How do
I tell it that I'm going to call AudioSystem.write() many times and
only write out one header?
I tried using AU and got the same results.
THANKS!
John
I receive audio via a socket. I receive 16-bit, mono, 8000sps data. I
can play this out the speaker using Java Sound perfectly. It's
wonderful how much easier this is than DirectX.
Anyway, I need to be able to save the data I receive for later play
back. I was going to write the Wave header myself, but it seems like
there should be some way to write out the data using Java Sound.
I create a ByteArrayInputStream. I create an AudioInputStream from
this. I then call AudioSystem.write() using the AudioInputStream and a
FileOutputStream.
I can hear the sounds, but it has pops in it. I'm guessing that it is
writing out a WAVE header for every call to AudioSystem.write(). How do
I tell it that I'm going to call AudioSystem.write() many times and
only write out one header?
I tried using AU and got the same results.
THANKS!
John