How long of a .wav file is a Clip
supposed to play? This method only works for short files (like <2 secs). Playing MP3 using Java Sound API and How do you play a long AudioClip? show how to play long audio files, but how long of a file was a Clip
meant to play?
1 Answers
..how long of a file was a
Clip
meant to play?
'Short'. It has never been defined explicitly. In some non-Oracle/Sun VMs it depended only on the size of available memory (I was originally developing an app. using Clip
to load large sound files on an Ubuntu OS using a non-Sun JRE, and was most irritated to discover it would fail completely when using Sun's).
As far as the Sun/Oracle JRE goes, my last testing suggested the 'size' was not inherently the duration of the clip, but the amount of sound data that was loaded (once resolved to PCM). I.E. a mono, 8 bit sample at 11.025 KHz could be 16 times longer in duration than another that was encoded as stereo, 16 bit at 44.1KHz. Bottom line..
The Oracle JRE could load exactly 1 second of stereo/16 bit/44.1 KHz. Not suited to playing a typical MP3, so that is when I developed BigClip
.
And I now notice that info. on 'size' was given in one of the linked questions..

- 168,117
- 40
- 217
- 433
-
I noticed the info. I just wanted to know if there was a specific limit. – Justin Sep 22 '13 at 02:43