Hi,
I’m using the (audio) spectrum plugin (spectrum) in my c++ application and have written the message handler to capture the GST_MESSAGE_ELEMENT messages and read the frequency samples. This works great when I use the spectrum plugin with the multi-channel parameter set to false (by using the sample application code here: spectrum), but when I set the multi-channel parameter to true to capture frequency values on a channel by channel basis (ie stereo) I can’t figure out how to read them. In non multi-channel mode the plugin stores the message data in a list, but in the multichannel case it stores them as an array, so my question is basically how can I read the array data. I’ve tried to use gst_value_array_get_value instead of gst_value_list_get_value but either it just doesn’t compile or returns bad data, so I’m missing something. I can read the array size (of 2, as I have two stereo channels), but I can’t figure out how the data in each array element is stored. Is it a raw buffer (of floats) in which case I need to do something with gst buffer reading? Or is it stored some other way?
Any help would be very much appreciated.
Mike