Simplify function names

This commit is contained in:
Luke Murphy 2019-12-18 22:26:56 +07:00
parent 11f9d7aa57
commit 556d058189
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -14,7 +14,7 @@ var recordingTimeout = 30000; // 30 seconds (in milliseconds)
var newSoundJustRecorded = false;
var shapes = [];
function doRecording() {
function record() {
/**
* Starting recording.
**/
@ -23,7 +23,7 @@ function doRecording() {
}
}
function doStopping() {
function stop() {
/**
* Stop recording a new recording.
**/
@ -33,7 +33,7 @@ function doStopping() {
}
}
function doPlaying() {
function play() {
/**
* Play the recording.
**/
@ -42,7 +42,7 @@ function doPlaying() {
}
}
function doArchiving() {
function archive() {
/**
* Send the recording to the back-end.
**/
@ -72,19 +72,19 @@ function setupRecording() {
// TODO: buttons are just for experimenting ...
recordButton = createButton("record");
recordButton.position(10, 90);
recordButton.mousePressed(doRecording);
recordButton.mousePressed(record);
stopButton = createButton("stop");
stopButton.position(120, 90);
stopButton.mousePressed(doStopping);
stopButton.mousePressed(stop);
playButton = createButton("play");
playButton.position(210, 90);
playButton.mousePressed(doPlaying);
playButton.mousePressed(play);
playButton = createButton("archive");
playButton.position(300, 90);
playButton.mousePressed(doArchiving);
playButton.mousePressed(archive);
}
function getSoundInfo() {