gishara
gishara

Reputation: 845

Java Sound Demo - Problem

I have downloaded and run the Java sound demo available on http://java.sun.com/. When I run the capture/playback example I can record and playback my voice. But after I save the voice in to a wav file, I can't playback it and get an error as,

Unable to reset the stream java.io.IOException: mark/reset not supported

Can you tell me why?

Thanks a lot.

Upvotes: 4

Views: 722

Answers (1)

Mia Clarke
Mia Clarke

Reputation: 8204

According to this (very old) bug report:

This bug is caused primarily by a recent change in PushBackInputStream: AudioInputStream used PushBackInputStream internally in order to cope with irregular frame size reads of the underlying input stream.

It looks like the problem is that AudioInputStream does not support reset(), which is causing this problem. The suggested work-around is to use java 1.4.1 to run the demo. Of course, I expect that this is changed in the main API, so when you develop this yourself, you should have no problem doing it with Java 6.

Upvotes: 2

Related Questions