Warning: session_start(): open(/var/lib/php/sessions/sess_0o7beu4uo056reel43nfdkfqim, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
cmodule AudioClip > DynSCP {
File audioFile;
transient JAmplitudeGraph graph;
transient float[] volumeProfile;
double windowSize = 0.01; // seconds
JComponent visualize2() {
ret withComputing(r updateGraph, graph = swingNu JAmplitudeGraph());
}
void updateGraph enter {
if (!isFile(audioFile))
ret with setComponent(jcenteredbutton("Open audio file...", rThread openFile));
setComponent(graph);
if (volumeProfile == null)
volumeProfile = decodeWAVToMonoSamples_floatVolumeProfile(audioFile, windowSize);
graph?.setValues(volumeProfile);
}
void updateProfile enter {
volumeProfile = null;
updateGraph();
}
void openFile enter {
loadFile(showFileChooser());
}
void loadFile(File f) {
audioFile = f;
updateProfile();
}
}