mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 18:13:05 +02:00
Delay start of recording until after beep finishes
This commit is contained in:
parent
d682924b00
commit
c83f82f5da
1 changed files with 8 additions and 4 deletions
|
@ -122,6 +122,7 @@
|
||||||
TICK_SOUND = "assets/sounds/countdown-tick.wav",
|
TICK_SOUND = "assets/sounds/countdown-tick.wav",
|
||||||
START_RECORDING_SOUND = "assets/sounds/start-recording.wav",
|
START_RECORDING_SOUND = "assets/sounds/start-recording.wav",
|
||||||
FINISH_RECORDING_SOUND = "assets/sounds/finish-recording.wav",
|
FINISH_RECORDING_SOUND = "assets/sounds/finish-recording.wav",
|
||||||
|
START_RECORDING_SOUND_DURATION = 1200,
|
||||||
SOUND_VOLUME = 0.2;
|
SOUND_VOLUME = 0.2;
|
||||||
|
|
||||||
function playSound(sound) {
|
function playSound(sound) {
|
||||||
|
@ -166,10 +167,13 @@
|
||||||
recordingState = RECORDING;
|
recordingState = RECORDING;
|
||||||
log("Start recording");
|
log("Start recording");
|
||||||
playSound(startRecordingSound);
|
playSound(startRecordingSound);
|
||||||
startPosition = MyAvatar.position;
|
Script.setTimeout(function () {
|
||||||
startOrientation = MyAvatar.orientation;
|
// Delay start so that start beep is not included in recorded sound.
|
||||||
Recording.startRecording();
|
startPosition = MyAvatar.position;
|
||||||
RecordingIndicator.show();
|
startOrientation = MyAvatar.orientation;
|
||||||
|
Recording.startRecording();
|
||||||
|
RecordingIndicator.show();
|
||||||
|
}, START_RECORDING_SOUND_DURATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
function finishRecording() {
|
function finishRecording() {
|
||||||
|
|
Loading…
Reference in a new issue