[gnome-sound-recorder] waveform.js: Set the pipeline to null if we've created it to generate a play waveform.



commit 51fac613b63d46425da322d76390d75ec9b80d72
Author: Meg Ford <meg387 gmail com>
Date:   Tue Jan 28 13:38:05 2014 -0600

    waveform.js: Set the pipeline to null if we've created it to generate a play waveform.

 src/waveform.js |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/waveform.js b/src/waveform.js
index 57b3bd0..68f36a0 100644
--- a/src/waveform.js
+++ b/src/waveform.js
@@ -152,7 +152,7 @@ const WaveForm = new Lang.Class({
     },
 
     startGeneration: function() {
-        this.pipeline.set_state(Gst.State.PLAYING)
+        this.pipeline.set_state(Gst.State.PLAYING);
     },
 
     stopGeneration: function() {
@@ -253,6 +253,10 @@ const WaveForm = new Lang.Class({
     
     endDrawing: function() {
         let width = this._grid.get_allocated_width();
+        
+        if(this.pipeline)
+            this.stopGeneration();
+            
         this.count = 0;
         peaks.length = 0;
         this.drawing.destroy();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]