[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog backend/sound_handler_gst.cpp b...
From: |
Tomas Groth |
Subject: |
[Gnash-commit] gnash ChangeLog backend/sound_handler_gst.cpp b... |
Date: |
Wed, 08 Aug 2007 10:39:50 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Tomas Groth <tgc> 07/08/08 10:39:50
Modified files:
. : ChangeLog
backend : sound_handler_gst.cpp sound_handler_sdl.cpp
Log message:
* backend/sound_handler_{sdl,gst}.cpp: Detect and fix if a
soundstream
is out of sync (after position-jump or general out of sync
issue),
fixes bug #20681.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3963&r2=1.3964
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_gst.cpp?cvsroot=gnash&r1=1.58&r2=1.59
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_sdl.cpp?cvsroot=gnash&r1=1.78&r2=1.79
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3963
retrieving revision 1.3964
diff -u -b -r1.3963 -r1.3964
--- ChangeLog 8 Aug 2007 09:14:14 -0000 1.3963
+++ ChangeLog 8 Aug 2007 10:39:49 -0000 1.3964
@@ -1,5 +1,11 @@
2007-08-08 Tomas Groth Christensen <address@hidden>
+ * backend/sound_handler_{sdl,gst}.cpp: Detect and fix if a soundstream
+ is out of sync (after position-jump or general out of sync issue),
+ fixes bug #20681.
+
+2007-08-08 Tomas Groth Christensen <address@hidden>
+
* backend/sound_handler_sdl.cpp: Fix counting of samples played,
and use the output samplerate to calculate the playhead position
in time, fixes/improves bug #20684.
Index: backend/sound_handler_gst.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_gst.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- backend/sound_handler_gst.cpp 7 Aug 2007 16:27:37 -0000 1.58
+++ backend/sound_handler_gst.cpp 8 Aug 2007 10:39:50 -0000 1.59
@@ -20,7 +20,7 @@
// Based on sound_handler_sdl.cpp by Thatcher Ulrich http://tulrich.com 2003
// which has been donated to the Public Domain.
-/* $Id: sound_handler_gst.cpp,v 1.58 2007/08/07 16:27:37 tgc Exp $ */
+/* $Id: sound_handler_gst.cpp,v 1.59 2007/08/08 10:39:50 tgc Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -275,12 +275,15 @@
sound_data* sounddata = m_sound_data[sound_handle];
// If this is called from a streamsoundblocktag, we only start if this
- // sound isn't already playing. If a gst_element-struct is existing we
- // assume it is also playing.
+ // sound isn't already playing. If a active_sound-struct is existing we
+ // assume it is also playing. If necessary we do some sync'ing
if (start_position > 0 && sounddata->m_gst_elements.size() > 0) {
+ // This is the ugly sync'ing. If the renderer-sync'ing to the
timeline
+ // works, this should only be needed when we're
position-jumping in streams.
+ int diff = abs(sounddata->m_gst_elements[0]->position -
start_position);
+ if (diff > 2000) sounddata->m_gst_elements[0]->position =
start_position;
return;
}
-
// Make sure sound actually got some data
if (sounddata->data_size < 1) {
IF_VERBOSE_MALFORMED_SWF(
Index: backend/sound_handler_sdl.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_sdl.cpp,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -b -r1.78 -r1.79
--- backend/sound_handler_sdl.cpp 8 Aug 2007 09:14:14 -0000 1.78
+++ backend/sound_handler_sdl.cpp 8 Aug 2007 10:39:50 -0000 1.79
@@ -18,7 +18,7 @@
// Based on sound_handler_sdl.cpp by Thatcher Ulrich http://tulrich.com 2003
// which has been donated to the Public Domain.
-// $Id: sound_handler_sdl.cpp,v 1.78 2007/08/08 09:14:14 tgc Exp $
+// $Id: sound_handler_sdl.cpp,v 1.79 2007/08/08 10:39:50 tgc Exp $
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -244,8 +244,12 @@
// If this is called from a streamsoundblocktag, we only start if this
// sound isn't already playing. If a active_sound-struct is existing we
- // assume it is also playing.
+ // assume it is also playing. If necessary we do some sync'ing
if (start_position > 0 && sounddata->m_active_sounds.size() > 0) {
+ // This is the ugly sync'ing. If the renderer-sync'ing to the
timeline
+ // works, this should only be needed when we're
position-jumping in streams.
+ int diff = abs(sounddata->m_active_sounds[0]->position -
start_position);
+ if (diff > 2000) sounddata->m_active_sounds[0]->position =
start_position;
return;
}