Java Sound Demo - Problem

I downloaded and launched a Java sound demo at http://java.sun.com/ . When I run the capture / playback example, I can record and play my voice. But after saving the voice in the wav file, I can not play it and get an error message like

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

Can you tell me why?

Thank you very much.

+4
source share
1 answer

According to this (very old) error report :

This error is caused primarily by a recent change to PushBackInputStream: Used by AudioInputStream PushBackInputStream inside internally to handle the irregular frame size that reads the base input stream.

It seems that the problem is that AudioInputStream does not support reset() , which causes this problem. The suggested approach is to use java 1.4.1 to run the demo. Of course, I expect this to be changed in the main API, so when you develop it yourself, you should not have a problem with Java 6.

+2
source

Source: https://habr.com/ru/post/1344580/


All Articles