For a Clip
that can use the available (to the app.) RAM see BigClip
.
..the BigClip
class through a outof memory exception.
It would in a JRE with standard memory. I have a DukeBox for my music collection. It plays typical MP3s (stereo, 16 bit, 44.1KHz) of up to 20 minutes length within 512 Meg of memory assigned to the app.
You still have not specified what format the sound is, so it is impossible to say how much memory the 160 minutes of audio would require, beyond 'a lot'.
OTOH, you might find the time required to load each BigClip
individually, is not very long. My software is designed to load directly off local disk and is wrapped in a default ProgressMonitorInputStream
. The progress dialog only appear rarely - and only for tracks that play in excess of 12-14 minutes. Doing it 'one at a time' might work within the standard memory, for your sound samples.
..4 minutes long each and I have 40..
The size in memory required to contain that 160 minutes of audio would differ by a factor of (BOTE) 16 - between a high (44100 KHz)/low (11025 KHz) sampling rate, mono/stereo and 8/16 bit representation audio format.
Lower resolution
160 min *
60 SecPerMin *
11025 KHz *
1 mono *
1 byte (8 bit)
=
105,840,000 bytes
Or approximately 105 meg for the lower limit.