Skip to content

Commit

Permalink
value-arrays are deprecated, access list_rms as an normal array
Browse files Browse the repository at this point in the history
  • Loading branch information
MaZderMind committed Jan 11, 2015
1 parent b52144e commit d90d14b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/gstaudiovisual.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,12 @@ gst_audio_visual_message (GstAudioVisual * visual, GstMessage * message)
INFO (" channel: %d, RMS=%f dB, peak=%f dB, decay=%f dB, "
"normalized-RMS=%f", i, rms_dB, peak_dB, decay_dB, rms);
}
} else if (G_VALUE_HOLDS (list_rms, G_TYPE_VALUE_ARRAY)) {
GValueArray *va = (GValueArray *) g_value_get_boxed (list_rms);
} else if (G_VALUE_HOLDS (list_rms, G_TYPE_ARRAY)) {
GArray *va = (GArray *) g_value_get_boxed (list_rms);
gdouble v = 0.0;
channels = va->n_values;
channels = va->len;
for (i = 0; i < channels; ++i) {
value = g_value_array_get_nth (va, i);
value = g_array_index (va, GValue*, i);
rms_dB = g_value_get_double (value);

/* converting from dB to normal gives us a value between 0.0 and 1.0
Expand Down

0 comments on commit d90d14b

Please sign in to comment.