// This method does not return until the audio file is completely loaded
clip.open(ais);
// Start playing
clip.start();
This code works fine on windows. But when i try on my mac. It gave me an exception.
java.lang.IllegalArgumentException: No line matching interface Clip supporting format PCM_SIGNED 44100.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian, and buffers of 9838592 to 9838592 bytes is supported.
The line in bold is the line that is throwing that error.
Normally, I admit when a title is clickbait (unfortunately, it's become somewhat necessary in AI-dominated news sections today), but in this case, all supported versions is implied and doesn't need to be spelled out in the title. Of course, I'm covering a Patch Tuesday update but that is only available to supported Windows SKUs. All our coverage relates to supported Windows software and SKUs only unless we expressly state that it's "unsupported", "unofficial", or "third-party". I'm sorry, but supported/official SKUs don't need to be spelled out as such in every Neowin headline.
But the reality is it will work for people's needs, and they don't care about the technology that makes it.
Clearly not everyone's needs, but that low end space where personal laptops were only used to type emails, watch content and browse websites, but they didn't want to do that on a small screen device. Heck, writing that out I can now see the connection and reason it'll do so well.
Apple is about experience. If the experience is bad, they don't release it. Low end Windows laptop manufacturers up until this point have not taken that into consideration ever before, so slow laggy usage with brittle slimey plastic shells were common. I hope that the low end space at least creates better physical products that last a bit longer, and if Microsoft get their act together, they could also have a solid OS on such low end hardware that would actually make the experience work for what the hardware was intended for.
The fact that the CPU is a "cellphone", sorry mobile phone processor is irrelevant. It's about the experience, and so far, that sounds quite solid.
Recent Achievements
Jordan Smith earned a badge Week One Done
BizSAR earned a badge Reacting Well
AndreaB earned a badge First Post
Huge Trailer earned a badge Week One Done
Classifyskilleducation earned a badge Week One Done
Question
donchen
Hi guys,
Below is a code that i use to play sound
This code works fine on windows. But when i try on my mac. It gave me an exception.
java.lang.IllegalArgumentException: No line matching interface Clip supporting format PCM_SIGNED 44100.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian, and buffers of 9838592 to 9838592 bytes is supported.
The line in bold is the line that is throwing that error.
Any idea how to solve ?
Link to comment
https://www.neowin.net/forum/topic/662026-java-sound/Share on other sites
13 answers to this question
Recommended Posts