Using minim to load 300 wavs
in
Core Library Questions
•
2 years ago
Hi,
I'm using minim to access the sample data of 300 wav files. This is done in a thread. The loading starts quickly then gradually slows until at about 250 the loading grinds to a stop. I thought it might be a memory issue but the total size of all the wavs is about 200kb.
- loadThread = new Thread() {
- public void run() {
- int numLoaded = 0;
- for (HTRFPoint p : htrfPoints) {
- p.loadData();
- numLoaded++;
- main.println(numLoaded + " files of " + htrfPoints.size() + " loaded.");
- }
- main.println("All files loaded.");
- }
- };
- loadThread.start();
- public void loadData() {
- AudioSample sample = main.minim.loadSample(dir.getAbsolutePath(), 512);
- data[0] = sample.getChannel(1);
- data[1] = sample.getChannel(2);
- sample = null;
- }
Cheers,
Rob
1