Displaying 2 results from an estimated 2 matches for "comp_data".
2007 Oct 11
0
12 commits - configure.ac doc/Makefile.am libswfdec/swfdec_as_frame.c libswfdec/swfdec_audio.c libswfdec/swfdec_audio_event.c libswfdec/swfdec_audio_event.h libswfdec/swfdec_shape_parser.c libswfdec/swfdec_sound.c test/sound
...m
+ *
+ * Compares the 2 buffers for every 5.5kHz and complains with a useful
+ * error message if they don't match.
+ *
+ * Returns: TRUE if the 2 files are equal
+ **/
static gboolean
audio_diff (SwfdecBuffer *compare, SwfdecBuffer *original, const char *filename)
{
- guint i;
- gint16 *comp_data, *org_data;
+ guint i, length;
+ gint16 *comp_data, *comp_end, *org_data;
/* must hold since we are rendering it */
- g_assert (compare->length % 2 == 0);
- if (original->length % 2 != 0) {
+ g_assert (compare->length % 4 == 0);
+ if (original->length % 4 != 0) {
g_pri...
2007 Nov 10
0
10 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_movie.c libswfdec/swfdec_movie_clip_loader.c libswfdec/swfdec_movie.h libswfdec/swfdec_resource.c
...100
only dump the samples we care about
diff --git a/test/sound/sound.c b/test/sound/sound.c
index 7b46788..ede8e16 100644
--- a/test/sound/sound.c
+++ b/test/sound/sound.c
@@ -90,8 +90,9 @@ dump:
char *dump = g_strdup_printf ("%s.dump", filename);
/* convert to LE */
comp_data = (gint16 *) compare->data;
- for (i = 0; i < compare->length / 2; i++) {
- comp_data[i] = GINT16_TO_LE (comp_data[i]);
+ for (i = 0; i < compare->length / 64; i++) {
+ comp_data[2 * i] = GINT16_TO_LE (comp_data[i * 16 + 14]);
+ comp_data[2 * i + 1] = GINT16_TO_L...