[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-277-g83c8c45 |
Date: |
Fri, 15 Apr 2011 16:07:26 +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 83c8c4530f0cda3163c0654bbb9f9a4577e25aa9 (commit)
via acde549921e80d717dd634688c8667c3498136bd (commit)
via efc1c72251ea10711d59d1e3a478e62fc9c2da1f (commit)
via bf3baf4a4b72647f7e8a7a8995d7571d083726bf (commit)
via 6617dadb1a8fab666a19a1420b410efbb31b8c33 (commit)
via c9c761d1467d707fcb73e74f1e236bd9f03d2055 (commit)
from cccdbe9fbf889549d7e48db4a358f91b2dbcf8a3 (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=83c8c4530f0cda3163c0654bbb9f9a4577e25aa9
commit 83c8c4530f0cda3163c0654bbb9f9a4577e25aa9
Author: Sandro Santilli <address@hidden>
Date: Fri Apr 15 16:24:21 2011 +0200
Drop unused variables
diff --git a/libcore/asobj/Sound_as.cpp b/libcore/asobj/Sound_as.cpp
index ee23eb5..99760b5 100644
--- a/libcore/asobj/Sound_as.cpp
+++ b/libcore/asobj/Sound_as.cpp
@@ -337,8 +337,6 @@ Sound_as::update()
{
probeAudio();
- VM& vm = getVM(owner());
-
if (active()) {
owner().set_member(NSV::PROP_DURATION, getDuration());
owner().set_member(NSV::PROP_POSITION, getPosition());
@@ -450,7 +448,6 @@ Sound_as::attachSound(int si, const std::string& name)
soundId = si;
soundName = name;
- VM& vm = getVM(owner());
owner().set_member(NSV::PROP_DURATION, getDuration());
owner().set_member(NSV::PROP_POSITION, getPosition());
@@ -587,7 +584,6 @@ Sound_as::loadSound(const std::string& file, bool streaming)
startProbeTimer();
- VM& vm = getVM(owner());
owner().set_member(NSV::PROP_DURATION, getDuration());
owner().set_member(NSV::PROP_POSITION, getPosition());
}
http://git.savannah.gnu.org/cgit//commit/?id=acde549921e80d717dd634688c8667c3498136bd
commit acde549921e80d717dd634688c8667c3498136bd
Author: Sandro Santilli <address@hidden>
Date: Fri Apr 15 16:17:02 2011 +0200
Add test for Sound.position and Sound.duration when playing embedded sound
(tests fix for bug #33091)
diff --git a/testsuite/misc-ming.all/eventSoundTest1.c
b/testsuite/misc-ming.all/eventSoundTest1.c
index 5e25f79..7863648 100644
--- a/testsuite/misc-ming.all/eventSoundTest1.c
+++ b/testsuite/misc-ming.all/eventSoundTest1.c
@@ -138,11 +138,13 @@ runAttachedSoundsTest(SWFMovie mo, SWFSound so, int*
frame)
frameDesc[4] = "Nothing";
add_actions(mo, "t = _root.createEmptyMovieClip('mc', 9);"
- "cs = 0; cs2 = 0;"
+ "cs = 0; cs2 = 0; onLoadCalls = 0; onLoadCalls2 = 0;"
"s = new Sound(mc);"
"s2 = new Sound(mc);"
"s.attachSound('es');"
"s2.attachSound('es');"
+ "s.onLoad = function() { onLoadCalls++; };"
+ "s2.onLoad = function() { onLoadCalls2++; };"
"s.onSoundComplete = function() { cs++; };"
"s2.onSoundComplete = function() { cs2++; };"
);
@@ -167,16 +169,31 @@ runAttachedSoundsTest(SWFMovie mo, SWFSound so, int*
frame)
add_actions(mo, "s.start();");
}
- add_actions(mo, "xcheck_equals(cs, 1);");
+ xcheck_equals(mo, "cs", "1");
SWFMovie_nextFrame(mo);
- add_actions(mo, "xcheck_equals(cs, 2);");
+ xcheck_equals(mo, "cs", "2");
// Check that Sound.onSoundComplete isn't executed if the Sound is
// deleted. This only passes currently because onSoundComplete is never
// called under any circumstances for embedded sounds.
- add_actions(mo, "check_equals(cs2, 0);");
+ check_equals(mo, "cs2", "0");
+
+ // Check that Sound.onLoad isn't executed for embedded sounds
+ check_equals(mo, "onLoadCalls", "0");
+ check_equals(mo, "onLoadCalls2", "0");
+
+ check_equals(mo, "s.duration", "3000");
+
+ /* about 2/3 of the sound is played a this time. exact time
+ * is unreliable outside of controlled testing infrastructure:
+ * PP 10 gives 1997 ms, gtk-gnash gives 1973.
+ * MovieTester (controlling exact timeing) gives plain 2000
+ */
+ /* add_actions(mo, "note('Position: '+s.position);"); */
+ check_equals(mo, "Math.round(s.position/1000)", "2");
+
add_actions(mo, "s.stop();");
printFrameInfo(mo, i, frameDesc[i]);
http://git.savannah.gnu.org/cgit//commit/?id=efc1c72251ea10711d59d1e3a478e62fc9c2da1f
commit efc1c72251ea10711d59d1e3a478e62fc9c2da1f
Author: Sandro Santilli <address@hidden>
Date: Fri Apr 15 15:48:22 2011 +0200
Add test for Sound.postition and Sound.duration (they fail for loaded mp3)
diff --git a/testsuite/actionscript.all/Sound.as
b/testsuite/actionscript.all/Sound.as
index 1af1658..b54d4a2 100644
--- a/testsuite/actionscript.all/Sound.as
+++ b/testsuite/actionscript.all/Sound.as
@@ -28,7 +28,7 @@ rcsid="$Id: Sound.as,v 1.1 2008/06/17 12:42:22 strk Exp $";
endOfTest = function()
{
#if OUTPUT_VERSION > 5
- check_totals(108);
+ check_totals(111);
#else
check_totals(94);
#endif
@@ -250,6 +250,8 @@ s.onSoundComplete = function()
trace("onSoundComplete called");
pass("onSoundComplete called");
+ xcheck_equals(s.position, 209);
+
// fixing this might fix google dict
// See https://savannah.gnu.org/bugs/index.php?31314
check(s.onLoadCalled);
@@ -265,6 +267,8 @@ s.onSoundComplete = function()
s.onLoad = function(arg)
{
trace("onLoad called");
+ xcheck_equals(s.duration, 209);
+ check_equals(s.position, 0);
s.onLoadCalled = true;
s.onLoadArg = arg;
};
http://git.savannah.gnu.org/cgit//commit/?id=bf3baf4a4b72647f7e8a7a8995d7571d083726bf
commit bf3baf4a4b72647f7e8a7a8995d7571d083726bf
Author: Sandro Santilli <address@hidden>
Date: Fri Apr 15 15:44:18 2011 +0200
Use named strings for "duration" and "position"
diff --git a/libcore/asobj/Sound_as.cpp b/libcore/asobj/Sound_as.cpp
index 118f0c5..ee23eb5 100644
--- a/libcore/asobj/Sound_as.cpp
+++ b/libcore/asobj/Sound_as.cpp
@@ -340,9 +340,8 @@ Sound_as::update()
VM& vm = getVM(owner());
if (active()) {
- // TODO: use named strings for "duration" and "position"
- owner().set_member(getURI(vm, "duration"), getDuration());
- owner().set_member(getURI(vm, "position"), getPosition());
+ owner().set_member(NSV::PROP_DURATION, getDuration());
+ owner().set_member(NSV::PROP_POSITION, getPosition());
}
}
@@ -452,8 +451,8 @@ Sound_as::attachSound(int si, const std::string& name)
soundName = name;
VM& vm = getVM(owner());
- owner().set_member(getURI(vm, "duration"), getDuration());
- owner().set_member(getURI(vm, "position"), getPosition());
+ owner().set_member(NSV::PROP_DURATION, getDuration());
+ owner().set_member(NSV::PROP_POSITION, getPosition());
}
@@ -589,8 +588,8 @@ Sound_as::loadSound(const std::string& file, bool streaming)
startProbeTimer();
VM& vm = getVM(owner());
- owner().set_member(getURI(vm, "duration"), getDuration());
- owner().set_member(getURI(vm, "position"), getPosition());
+ owner().set_member(NSV::PROP_DURATION, getDuration());
+ owner().set_member(NSV::PROP_POSITION, getPosition());
}
sound::InputStream*
http://git.savannah.gnu.org/cgit//commit/?id=6617dadb1a8fab666a19a1420b410efbb31b8c33
commit 6617dadb1a8fab666a19a1420b410efbb31b8c33
Author: Sandro Santilli <address@hidden>
Date: Fri Apr 15 15:44:00 2011 +0200
Add "duration" and "position" named strings
diff --git a/libcore/namedStrings.cpp b/libcore/namedStrings.cpp
index b346338..a6255fa 100644
--- a/libcore/namedStrings.cpp
+++ b/libcore/namedStrings.cpp
@@ -55,6 +55,7 @@ static const string_table::svt preload_names[] =
string_table::svt( "d", NSV::PROP_D ),
string_table::svt( "data", NSV::PROP_DATA ),
string_table::svt( "decode", NSV::PROP_DECODE ),
+ string_table::svt( "duration", NSV::PROP_DURATION ),
string_table::svt( "e", NSV::PROP_E ),
string_table::svt( "escape", NSV::PROP_ESCAPE ),
string_table::svt( "_droptarget", NSV::PROP_uDROPTARGET ),
@@ -121,6 +122,7 @@ static const string_table::svt preload_names[] =
string_table::svt( "_root", NSV::PROP_uROOT ),
string_table::svt( "_global", NSV::PROP_uGLOBAL ),
string_table::svt( "__proto__", NSV::PROP_uuPROTOuu ),
+ string_table::svt( "position", NSV::PROP_POSITION ),
string_table::svt( "prototype", NSV::PROP_PROTOTYPE ),
string_table::svt( "push", NSV::PROP_PUSH ),
string_table::svt( "__resolve", NSV::PROP_uuRESOLVE ),
diff --git a/libcore/namedStrings.h b/libcore/namedStrings.h
index 285757b..c53acf4 100644
--- a/libcore/namedStrings.h
+++ b/libcore/namedStrings.h
@@ -68,6 +68,7 @@ enum NamedStrings {
PROP_D,
PROP_DATA,
PROP_DECODE,
+ PROP_DURATION,
PROP_E,
PROP_ENABLED,
PROP_ESCAPE,
@@ -81,6 +82,7 @@ enum NamedStrings {
PROP_LENGTH,
PROP_LOADED,
PROP_METH,
+ PROP_POSITION,
PROP_PROTOTYPE,
PROP_PUSH,
PROP_R,
http://git.savannah.gnu.org/cgit//commit/?id=c9c761d1467d707fcb73e74f1e236bd9f03d2055
commit c9c761d1467d707fcb73e74f1e236bd9f03d2055
Author: Sandro Santilli <address@hidden>
Date: Fri Apr 15 15:33:48 2011 +0200
Do not stop probeTimer while playing embedded sound. Fixes bug #33091.
diff --git a/libcore/asobj/Sound_as.cpp b/libcore/asobj/Sound_as.cpp
index 2af3c99..118f0c5 100644
--- a/libcore/asobj/Sound_as.cpp
+++ b/libcore/asobj/Sound_as.cpp
@@ -340,6 +340,7 @@ Sound_as::update()
VM& vm = getVM(owner());
if (active()) {
+ // TODO: use named strings for "duration" and "position"
owner().set_member(getURI(vm, "duration"), getDuration());
owner().set_member(getURI(vm, "position"), getPosition());
}
@@ -349,11 +350,7 @@ void
Sound_as::probeAudio()
{
- if (!_mediaParser) {
- log_debug("Sound_as::probeAudio: no parser, nothing to probe for");
- stopProbeTimer();
- return;
- }
+ if (!_mediaParser) return; // nothing to do here w/out a media parser
if ( ! _soundLoaded ) {
#ifdef GNASH_DEBUG_SOUND_AS
-----------------------------------------------------------------------
Summary of changes:
libcore/asobj/Sound_as.cpp | 22 +++++++---------------
libcore/namedStrings.cpp | 2 ++
libcore/namedStrings.h | 2 ++
testsuite/actionscript.all/Sound.as | 6 +++++-
testsuite/misc-ming.all/eventSoundTest1.c | 25 +++++++++++++++++++++----
5 files changed, 37 insertions(+), 20 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-277-g83c8c45,
Sandro Santilli <=