[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

crogers at google.com crogers at google.com
Wed Dec 22 12:59:21 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit c00a8ceb179497cc5e645e36fde7709469d5cdf7
Author: crogers at google.com <crogers at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 3 18:51:45 2010 +0000

    2010-09-03  Chris Rogers  <crogers at google.com>
    
            Reviewed by Kenneth Russell.
    
            Add AudioListener files
            https://bugs.webkit.org/show_bug.cgi?id=45006
    
            No new tests since audio API is not yet implemented.
    
            * webaudio: Added.
            * webaudio/AudioListener.cpp: Added.
            (WebCore::AudioListener::AudioListener):
            * webaudio/AudioListener.h: Added.
            (WebCore::AudioListener::create):
            (WebCore::AudioListener::setPosition):
            (WebCore::AudioListener::position):
            (WebCore::AudioListener::setOrientation):
            (WebCore::AudioListener::orientation):
            (WebCore::AudioListener::setUpVector):
            (WebCore::AudioListener::upVector):
            (WebCore::AudioListener::setVelocity):
            (WebCore::AudioListener::velocity):
            (WebCore::AudioListener::setDopplerFactor):
            (WebCore::AudioListener::dopplerFactor):
            (WebCore::AudioListener::setSpeedOfSound):
            (WebCore::AudioListener::speedOfSound):
            * webaudio/AudioListener.idl: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66750 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c8d2028..152e644 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,33 @@
 2010-09-03  Chris Rogers  <crogers at google.com>
 
+        Reviewed by Kenneth Russell.
+
+        Add AudioListener files
+        https://bugs.webkit.org/show_bug.cgi?id=45006
+
+        No new tests since audio API is not yet implemented.
+
+        * webaudio: Added.
+        * webaudio/AudioListener.cpp: Added.
+        (WebCore::AudioListener::AudioListener):
+        * webaudio/AudioListener.h: Added.
+        (WebCore::AudioListener::create):
+        (WebCore::AudioListener::setPosition):
+        (WebCore::AudioListener::position):
+        (WebCore::AudioListener::setOrientation):
+        (WebCore::AudioListener::orientation):
+        (WebCore::AudioListener::setUpVector):
+        (WebCore::AudioListener::upVector):
+        (WebCore::AudioListener::setVelocity):
+        (WebCore::AudioListener::velocity):
+        (WebCore::AudioListener::setDopplerFactor):
+        (WebCore::AudioListener::dopplerFactor):
+        (WebCore::AudioListener::setSpeedOfSound):
+        (WebCore::AudioListener::speedOfSound):
+        * webaudio/AudioListener.idl: Added.
+
+2010-09-03  Chris Rogers  <crogers at google.com>
+
         Unreviewed
 
         Add WebCore/webaudio and WebCore/platform/audio/mac directories in preparation for landing reviewed patches
diff --git a/WebCore/webaudio/AudioListener.cpp b/WebCore/webaudio/AudioListener.cpp
new file mode 100644
index 0000000..44fb02c
--- /dev/null
+++ b/WebCore/webaudio/AudioListener.cpp
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(WEB_AUDIO)
+
+#include "AudioListener.h"
+
+#include "AudioBus.h"
+
+namespace WebCore {
+
+AudioListener::AudioListener()
+    : m_position(0, 0, 0)
+    , m_orientation(0.0, 0.0, -1.0)
+    , m_upVector(0.0, 1.0, 0.0)
+    , m_velocity(0, 0, 0)
+    , m_dopplerFactor(1.0)
+    , m_speedOfSound(343.3)
+{
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_AUDIO)
diff --git a/WebCore/webaudio/AudioListener.h b/WebCore/webaudio/AudioListener.h
new file mode 100644
index 0000000..2ac1520
--- /dev/null
+++ b/WebCore/webaudio/AudioListener.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef AudioListener_h
+#define AudioListener_h
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/Vector3.h>
+
+namespace WebCore {
+
+// AudioListener maintains the state of the listener in the audio scene as defined in the OpenAL specification.
+
+class AudioListener : public RefCounted<AudioListener> {
+public:
+    static PassRefPtr<AudioListener> create()
+    {
+        return adoptRef(new AudioListener());
+    }
+
+    // Position
+    void setPosition(double x, double y, double z) { setPosition(Vector3(x, y, z)); }
+    void setPosition(const Vector3 &position) { m_position = position; }
+    const Vector3& position() const { return m_position; }
+
+    // Orientation
+    void setOrientation(double x, double y, double z, double upX, double upY, double upZ)
+    {
+        setOrientation(Vector3(x, y, z));
+        setUpVector(Vector3(upX, upY, upZ));
+    }
+    void setOrientation(const Vector3 &orientation) { m_orientation = orientation; }
+    const Vector3& orientation() const { return m_orientation; }
+
+    // Up-vector
+    void setUpVector(const Vector3 &upVector) { m_upVector = upVector; }
+    const Vector3& upVector() const { return m_upVector; }
+
+    // Velocity
+    void setVelocity(double x, double y, double z) { setVelocity(Vector3(x, y, z)); }
+    void setVelocity(const Vector3 &velocity) { m_velocity = velocity; }
+    const Vector3& velocity() const { return m_velocity; }
+
+    // Doppler factor
+    void setDopplerFactor(double dopplerFactor) { m_dopplerFactor = dopplerFactor; }
+    double dopplerFactor() const { return m_dopplerFactor; }
+
+    // Speed of sound
+    void setSpeedOfSound(double speedOfSound) { m_speedOfSound = speedOfSound; }
+    double speedOfSound() const { return m_speedOfSound; }
+
+private:
+    AudioListener();
+
+    // Position / Orientation
+    Vector3 m_position;
+    Vector3 m_orientation;
+    Vector3 m_upVector;
+
+    Vector3 m_velocity;
+
+    double m_dopplerFactor;
+    double m_speedOfSound;
+};
+
+} // WebCore
+
+#endif // AudioListener_h
diff --git a/WebCore/webaudio/AudioListener.idl b/WebCore/webaudio/AudioListener.idl
new file mode 100644
index 0000000..cf6d8cf
--- /dev/null
+++ b/WebCore/webaudio/AudioListener.idl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module audio {
+    interface [
+        Conditional=WEB_AUDIO
+    ] AudioListener {
+        attribute float dopplerFactor;  // same as OpenAL (default 1.0)
+        attribute float speedOfSound;   // in meters / second (default 343.3)
+
+        void setPosition(in float x, in float y, in float z);
+        void setOrientation(in float x, in float y, in float z, in float xUp, in float yUp, in float zUp);
+        void setVelocity(in float x, in float y, in float z);
+    };
+}

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list