[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog backend/sound_handler_sdl.cpp [release-0-
From: |
Tomas Groth |
Subject: |
[Gnash-commit] gnash ChangeLog backend/sound_handler_sdl.cpp [release-0-8-0] |
Date: |
Fri, 08 Jun 2007 11:40:42 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch: release-0-8-0
Changes by: Tomas Groth <tgc> 07/06/08 11:40:41
Modified files:
. : ChangeLog
backend : sound_handler_sdl.cpp
Log message:
* backend/sound_handler_sdl.cpp: Fixed an assertion fault
when non-mp3 audio was looping.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&only_with_tag=release-0-8-0&r1=1.3451.2.47&r2=1.3451.2.48
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_sdl.cpp?cvsroot=gnash&only_with_tag=release-0-8-0&r1=1.68&r2=1.68.4.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3451.2.47
retrieving revision 1.3451.2.48
diff -u -b -r1.3451.2.47 -r1.3451.2.48
--- ChangeLog 8 Jun 2007 08:18:00 -0000 1.3451.2.47
+++ ChangeLog 8 Jun 2007 11:40:40 -0000 1.3451.2.48
@@ -1,3 +1,8 @@
+2007-06-08 Tomas Groth Christensen <address@hidden>
+
+ * backend/sound_handler_sdl.cpp: Fixed an assertion fault
+ when non-mp3 audio was looping.
+
2007-06-07 Udo Giacomozzi <address@hidden>
* server/edit_text_character.cpp: replace WIDTH_FUDGE with PADDING_TWIPS
Index: backend/sound_handler_sdl.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_sdl.cpp,v
retrieving revision 1.68
retrieving revision 1.68.4.1
diff -u -b -r1.68 -r1.68.4.1
--- backend/sound_handler_sdl.cpp 31 May 2007 16:42:06 -0000 1.68
+++ backend/sound_handler_sdl.cpp 8 Jun 2007 11:40:41 -0000 1.68.4.1
@@ -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.68 2007/05/31 16:42:06 strk Exp $
+// $Id: sound_handler_sdl.cpp,v 1.68.4.1 2007/06/08 11:40:41 tgc Exp $
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -155,7 +155,7 @@
// @@ does a negative handle_id have any meaning ?
// should we change it to unsigned instead ?
if (handle_id < 0 || (unsigned int) handle_id+1 > m_sound_data.size()) {
- return 1;
+ return -1;
}
int start_size = 0;
sound_data* sounddata = m_sound_data[handle_id];
@@ -187,11 +187,10 @@
sounddata->data_size += adjusted_size;
std::vector<active_sound*> asounds = sounddata->m_active_sounds;
+ // If playback has already started, we also update the active
sounds
for(uint32_t i=0; i < asounds.size(); i++) {
active_sound* sound = asounds[i];
- sound->set_data(sounddata->data);
- sound->data_size = sounddata->data_size;
- sound->position = sounddata->data_size;
+ sound->raw_data_size = sounddata->data_size;
sound->set_raw_data(sounddata->data);
}
}
@@ -312,7 +311,8 @@
sound->raw_data_size = sounddata->data_size;
sound->set_raw_data(sounddata->data);
sound->raw_position = 0;
- sound->position = sounddata->data_size;
+ sound->position = 0;
+ sound->data_size = 0;
}
@@ -766,6 +766,19 @@
}
+ // If this isn't MP3 (which means its NATIVE16)
there is nothing to decode,
+ // reusing the available data is the only
option.
+ if (sounddata->format != 2) {
+ if (index < buffer_length) {
+ sound->loop_count--;
+ sound->raw_position = 0;
+ unsigned int mix_length =
((buffer_length - index) > sound->raw_data_size ? sound->raw_data_size :
(buffer_length - index));
+ do_mixing(stream+index, sound,
sound->get_raw_data_ptr(sound->raw_position),
+ mix_length,
sounddata->volume);
+ }
+ continue;
+ }
+
// Then we decode some data
// We loop until the size of the decoded sound
is greater than the buffer size,
// or there is no more to decode.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog backend/sound_handler_sdl.cpp [release-0-8-0],
Tomas Groth <=