Displaying 8 results from an estimated 8 matches for "n_envelopes".
Did you mean:
envelopes
2007 Oct 31
0
5 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_audio.c libswfdec/swfdec_sound.c libswfdec/swfdec_xml.c
...swfdec_sound.c b/libswfdec/swfdec_sound.c
index 0e7f831..3e9da94 100644
--- a/libswfdec/swfdec_sound.c
+++ b/libswfdec/swfdec_sound.c
@@ -303,8 +303,7 @@ swfdec_sound_parse_chunk (SwfdecSwfDecoder *s, SwfdecBits *b, int id)
int has_loops;
int has_out_point;
int has_in_point;
- guint i, j, n_envelopes;
- GArray *envelopes;
+ guint i, j;
SwfdecSound *sound;
SwfdecSoundChunk *chunk;
@@ -352,47 +351,29 @@ swfdec_sound_parse_chunk (SwfdecSwfDecoder *s, SwfdecBits *b, int id)
chunk->loop_count = 1;
}
if (has_envelope) {
- n_envelopes = swfdec_bits_get_u8 (b);
- if (n_env...
2007 Oct 29
0
2 commits - libswfdec/swfdec_sound.c libswfdec/swfdec_text_field_movie.c
...a/libswfdec/swfdec_sound.c
+++ b/libswfdec/swfdec_sound.c
@@ -351,6 +351,7 @@ swfdec_sound_parse_chunk (SwfdecSwfDecoder *s, SwfdecBits *b, int id)
chunk->loop_count = 1;
}
if (has_envelope) {
+ SWFDEC_FIXME ("support for sound envelopes not implemented");
chunk->n_envelopes = swfdec_bits_get_u8 (b);
chunk->envelope = g_new (SwfdecSoundEnvelope, chunk->n_envelopes);
SWFDEC_LOG (" n_envelopes = %u", chunk->n_envelopes);
@@ -366,7 +367,7 @@ swfdec_sound_parse_chunk (SwfdecSwfDecoder *s, SwfdecBits *b, int id)
if (i > 0 && chu...
2007 Nov 18
0
3 commits - libswfdec/swfdec_audio_event.c libswfdec/swfdec_sound.c
...remove)
return 0;
}
-static double
+static guint16
swfdec_audio_event_get_envelop_volume (SwfdecAudioEvent *event, guint pos,
guint offset, guint channel)
{
double distance;
- g_return_val_if_fail (SWFDEC_IS_AUDIO_EVENT (event), 1);
- g_return_val_if_fail (pos <= event->n_envelopes, 1);
- g_return_val_if_fail (channel == 0 || channel == 1, 1);
+ g_return_val_if_fail (SWFDEC_IS_AUDIO_EVENT (event), 32768);
+ g_return_val_if_fail (pos <= event->n_envelopes, 32768);
+ g_return_val_if_fail (channel == 0 || channel == 1, 32768);
if (event->n_envelopes == 0)
-...
2007 Oct 31
0
2 commits - libswfdec/swfdec_sound.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie_html.c
...nd envelope parsing better
diff --git a/libswfdec/swfdec_sound.c b/libswfdec/swfdec_sound.c
index 3e9da94..06022bc 100644
--- a/libswfdec/swfdec_sound.c
+++ b/libswfdec/swfdec_sound.c
@@ -356,7 +356,7 @@ swfdec_sound_parse_chunk (SwfdecSwfDecoder *s, SwfdecBits *b, int id)
SWFDEC_LOG (" n_envelopes = %u", chunk->n_envelopes);
}
- for (i = 0; i < chunk->n_envelopes; i++) {
+ for (i = 0; i < chunk->n_envelopes && swfdec_bits_left (b); i++) {
chunk->envelope[i].offset = swfdec_bits_get_u32 (b);
if (i > 0 && chunk->envelope[i-1].offset...
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
...hich to start playing */
guint stop_sample; /* first sample to not play anymore or 0 for playing all */
- guint loop_count; /* amount of times this sample still needs to be played back */
+ guint n_loops; /* amount of times this sample still needs to be played back */
guint n_envelopes; /* amount of points in the envelope */
SwfdecSoundEnvelope * envelope; /* volume envelope or NULL if none */
/* dynamic data */
SwfdecBuffer * decoded; /* the decoded buffer we play back */
SwfdecAudioFormat decoded_format; /* format of the decoded buffer */
guint offset; /*...
2007 Mar 29
0
libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_audio_event.h libswfdec/swfdec_audio_flv.h libswfdec/swfdec_audio_stream.h libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_buffer.h libswfdec/swfdec_cache.c
.../* don't restart if already playing */
- unsigned int start_sample; /* sample at which to start playing */
- unsigned int stop_sample; /* first sample to not play anymore */
- unsigned int loop_count; /* amount of times this sample should be played back */
- unsigned int n_envelopes; /* amount of points in the envelope */
+ guint start_sample; /* sample at which to start playing */
+ guint stop_sample; /* first sample to not play anymore */
+ guint loop_count; /* amount of times this sample should be played back */
+ guint n_envelopes; /* amount of points i...
2007 Mar 29
0
Branch 'as' - 9 commits - libswfdec-gtk/swfdec_playback_alsa.c libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c
.../* don't restart if already playing */
- unsigned int start_sample; /* sample at which to start playing */
- unsigned int stop_sample; /* first sample to not play anymore */
- unsigned int loop_count; /* amount of times this sample should be played back */
- unsigned int n_envelopes; /* amount of points in the envelope */
+ guint start_sample; /* sample at which to start playing */
+ guint stop_sample; /* first sample to not play anymore */
+ guint loop_count; /* amount of times this sample should be played back */
+ guint n_envelopes; /* amount of points i...
2007 Nov 20
0
19 commits - libswfdec/swfdec_audio_event.c libswfdec/swfdec_bits.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_image.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h
..._event.c
+++ b/libswfdec/swfdec_audio_event.c
@@ -114,7 +114,7 @@ swfdec_audio_event_render (SwfdecAudio *audio, gint16* dest, guint start,
return;
pos = 0;
- for (i = 0; i < dest_end - dest; i++) {
+ for (i = 0; i < (guint) (dest_end - dest); i++) {
while (pos < event->n_envelopes &&
event->envelope[pos].offset <= global_offset + (i / 2))
pos++;
commit bfa2b4da3e775c50d550e58cecdea4f745fdeaa7
Author: Benjamin Otte <otte at gnome.org>
Date: Tue Nov 20 10:03:36 2007 +0100
add setMask function
diff --git a/libswfdec/swfdec_initialize.as b/li...