goxr3plus / java-stream-player

🌌Java Advanced Audio Controller Library (WAV, AU, AIFF, MP3, OGG VORBIS, FLAC, MONKEY's AUDIO and SPEEX audio formats )
GNU General Public License v3.0
147 stars 33 forks source link

Why do you test for open? #37

Open HelgeStenstrom opened 5 years ago

HelgeStenstrom commented 5 years ago

https://github.com/goxr3plus/java-stream-player/blob/4991e4acc52041ca1529404d176c57b4171eba94/src/main/java/com/goxr3plus/streamplayer/stream/StreamPlayer.java#L529

On the line above the test, you just opened the sourceDataLine. Don't you trust that it worked? If it didn't work, if the line wasn't opened, isn't that a reason to throw an exception, rather than silently ignore the failure?

goxr3plus commented 5 years ago

Yep let's combine it with #36 and code a solution :)