finnkuusisto / TinySound

Simple library for playing sounds and music in Java
http://finnkuusisto.github.com/TinySound
BSD 2-Clause "Simplified" License
99 stars 26 forks source link

InputStreams must support mark/reset to load AudioInputStreams #7

Closed finnkuusisto closed 12 years ago

finnkuusisto commented 12 years ago

Apparently, if you load an AudioInputStream from an InputStream, that stream must support mark/reset functionality (at least on some systems?). Using a URL would possibly be more reliable. This would require changing to interface, removing the loading functions that take InputStreams.

finnkuusisto commented 12 years ago

I removed the part of the interface that took an InputStream and switched internal usage to URLs. Another solution would have been to wrap all InputStreams with BufferedInputStreams, but I like this solution as it reduces the interface slightly, specifically a part of the interface that was less likely to be used.