[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. 55fa23f03065f7d622ca
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. 55fa23f03065f7d622ca0ffbf4a458b65adf9aac |
Date: |
Fri, 19 Nov 2010 12:33:29 +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 55fa23f03065f7d622ca0ffbf4a458b65adf9aac (commit)
via 6fb63b99267a934d23ffb5aeb1b77ac8615e364c (commit)
from c56b63ed2d5ebcdbb133fc86540b8612e5aa28cd (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=55fa23f03065f7d622ca0ffbf4a458b65adf9aac
commit 55fa23f03065f7d622ca0ffbf4a458b65adf9aac
Merge: 6fb63b9 c56b63e
Author: Sandro Santilli <address@hidden>
Date: Fri Nov 19 13:33:14 2010 +0100
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/gnash
http://git.savannah.gnu.org/cgit//commit/?id=6fb63b99267a934d23ffb5aeb1b77ac8615e364c
commit 6fb63b99267a934d23ffb5aeb1b77ac8615e364c
Author: Sandro Santilli <address@hidden>
Date: Fri Nov 19 13:32:29 2010 +0100
MovieTester: keep not of the samples fetched on advance, so that lost ones
(partials) are fetched on next advance.
diff --git a/testsuite/MovieTester.cpp b/testsuite/MovieTester.cpp
index ce5dd85..4bbefdb 100644
--- a/testsuite/MovieTester.cpp
+++ b/testsuite/MovieTester.cpp
@@ -72,7 +72,8 @@ namespace gnash {
MovieTester::MovieTester(const std::string& url)
:
- _forceRedraw(true)
+ _forceRedraw(true),
+ _samplesFetched(0)
{
// Initialize the testing media handlers
@@ -233,25 +234,30 @@ MovieTester::render()
}
void
-MovieTester::advanceClock(unsigned long ms)
+MovieTester::advanceClock(unsigned long ms_current)
{
- _clock.advance(ms);
+ _clock.advance(ms_current);
if ( _sound_handler ) {
+
+ unsigned int ms = _clock.elapsed();
+
// We need to fetch as many samples
// as needed for a theoretical 44100hz loop.
// That is 44100 samples each second.
// 44100/1000 = x/ms
// x = (44100*ms) / 1000
unsigned int nSamples = (441*ms) / 10;
- if ( ms%10 ) {
- log_error("MovieTester::advanceClock: %d ms lost in sound
advancement",
- ms%10);
- }
// We double because sound_handler interface takes
// "mono" samples... (eh.. would be wise to change)
unsigned int toFetch = nSamples*2;
+
+ // Now substract what we fetched already
+ toFetch -= _samplesFetched;
+
+ // And update _samplesFetched..
+ _samplesFetched += toFetch;
log_debug("advanceClock(%d) needs to fetch %d samples", ms, toFetch);
diff --git a/testsuite/MovieTester.h b/testsuite/MovieTester.h
index 0da7e32..a8ffa4a 100644
--- a/testsuite/MovieTester.h
+++ b/testsuite/MovieTester.h
@@ -373,7 +373,9 @@ private:
/// Virtual clock to use to let test runners
/// control time flow
ManualClock _clock;
- //std::auto_ptr<VirtualClock> _clock;
+
+ /// number of samples fetched
+ unsigned int _samplesFetched;
};
// exp2 isn't part of standard C++, so is defined here in case the compiler
-----------------------------------------------------------------------
Summary of changes:
testsuite/MovieTester.cpp | 20 +++++++++++++-------
testsuite/MovieTester.h | 4 +++-
2 files changed, 16 insertions(+), 8 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. 55fa23f03065f7d622ca0ffbf4a458b65adf9aac,
Sandro Santilli <=