gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. 6b83cf65303ae6cd95bf


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. 6b83cf65303ae6cd95bfc0ab2b2711ad6f464286
Date: Mon, 22 Nov 2010 13:47:10 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  6b83cf65303ae6cd95bfc0ab2b2711ad6f464286 (commit)
      from  15f1a99f4745977e74b66882def0b5fab770cbb8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=6b83cf65303ae6cd95bfc0ab2b2711ad6f464286


commit 6b83cf65303ae6cd95bfc0ab2b2711ad6f464286
Author: Petter Reinholdtsen <address@hidden>
Date:   Mon Nov 22 14:46:40 2010 +0100

    Keep original gain value to avoid rounding errors on query.

diff --git a/libmedia/gst/AudioInputGst.cpp b/libmedia/gst/AudioInputGst.cpp
index acf7230..afbb460 100644
--- a/libmedia/gst/AudioInputGst.cpp
+++ b/libmedia/gst/AudioInputGst.cpp
@@ -61,7 +61,7 @@ GnashAudioPrivate::GnashAudioPrivate() {
 AudioInputGst::AudioInputGst() 
     :
     _activityLevel(-1),
-    _gain(0),
+    _gain(50),
     _index(0),
     _muted(true),
     _rate(8000),
@@ -305,7 +305,7 @@ AudioInputGst::audioChangeSourceBin(GnashAudioPrivate 
*audio)
     command = g_strdup_printf ("%s name=audioSource device=%s ! capsfilter 
name=capsfilter 
caps=audio/x-raw-int,signed=true,channels=2,rate=%i;audio/x-raw-float,channels=2,rate=%i
 ! rgvolume pre-amp=%f",
         audio->_audioDevice->getGstreamerSrc(),
         audio->_audioDevice->getDevLocation(),
-        _rate, _rate, _gain);
+        _rate, _rate, gstgain());
     
     log_debug ("GstPipeline command is: %s\n", command);
     
@@ -361,7 +361,7 @@ AudioInputGst::audioCreateSourceBin(GnashAudioPrivate 
*audio)
     command = g_strdup_printf ("%s name=audioSource device=%s ! capsfilter 
name=capsfilter 
caps=audio/x-raw-int,signed=true,channels=2,rate=%i;audio/x-raw-float,channels=2,rate=%i
 ! rgvolume pre-amp=%f",
         audio->_audioDevice->getGstreamerSrc(),
         audio->_audioDevice->getDevLocation(),
-        _rate, _rate, _gain);
+        _rate, _rate, gstgain());
     
     log_debug ("GstPipeline command is: %s", command);
     
diff --git a/libmedia/gst/AudioInputGst.h b/libmedia/gst/AudioInputGst.h
index 626a52e..5b95212 100644
--- a/libmedia/gst/AudioInputGst.h
+++ b/libmedia/gst/AudioInputGst.h
@@ -265,7 +265,7 @@ public:
     /// it here?
     virtual void setGain(double g) {
         assert (g >= 0 && g <= 100);
-        _gain = (g - 50) * 1.2;
+        _gain = g;
         audioChangeSourceBin(getGlobalAudio());
     }
 
@@ -275,7 +275,7 @@ public:
     /// TODO: shouldn't we query the value from the input rather than storing
     /// it here?
     virtual double gain() const {
-        return (_gain / 1.2) + 50;
+        return _gain;
     }
     
     virtual void setIndex(int i) {
@@ -506,7 +506,9 @@ private:
     ///   structure currently being worked with.
     GnashAudioPrivate* getGlobalAudio() {return _globalAudio;}
     
-    
+    /// Interface range is 0..100, gst range is -60 to 60
+    double gstgain() { return (gain() - 50) * 1.2; }
+
 private:
     
     /// \var _audioVect

-----------------------------------------------------------------------

Summary of changes:
 libmedia/gst/AudioInputGst.cpp |    6 +++---
 libmedia/gst/AudioInputGst.h   |    8 +++++---
 2 files changed, 8 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]