[gnome-sound-recorder] recorder: copy the peaks to the recording
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder] recorder: copy the peaks to the recording
- Date: Sun, 16 Aug 2020 13:20:37 +0000 (UTC)
commit 0ce49c7fa3e7aeee7a3f4f8c2a19187cf7bde0b9
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Sun Aug 16 15:20:14 2020 +0200
recorder: copy the peaks to the recording
this should fix an issue when the file is still being written & the recorder peaks gets cleaned.
src/recorder.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/recorder.js b/src/recorder.js
index 7cbb1c0..bfaaccb 100644
--- a/src/recorder.js
+++ b/src/recorder.js
@@ -157,8 +157,8 @@ var Recorder = new GObject.registerClass({
if (this.file && this.file.query_exists(null) && this._peaks.length > 0) {
- const recording = new Recording(this.file);
- recording.peaks = this._peaks;
+ let recording = new Recording(this.file);
+ recording.peaks = this._peaks.slice();
this._peaks.length = 0;
return recording;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]