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