File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const gchar *get_audio_sink_cap(unsigned int type) {
2020 format =
2121 GST_AUDIO_CAPS_MAKE ("audio/x-raw, "
2222 "format = (string) " GST_AUDIO_NE (
23- S16 ) ", "
23+ F32 ) ", "
2424 "layout = (string) interleaved, "
2525 "channels = (int) { 2 }, "
2626 "rate = (int) { 44100 }, "
Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ static gboolean gst_projectm_setup(GstGLBaseAudioVisualizer *glav) {
256256
257257 // Calculate required samples per frame
258258 bscope -> req_spf =
259- (bscope -> ainfo .channels * bscope -> ainfo .rate * 2 ) / bscope -> vinfo .fps_n ;
259+ (bscope -> ainfo .channels * bscope -> ainfo .rate * 4 ) / bscope -> vinfo .fps_n ;
260260
261261 // get GStreamer video format and map it to the corresponding OpenGL pixel
262262 // format
@@ -336,8 +336,8 @@ static gboolean gst_projectm_render(GstGLBaseAudioVisualizer *glav,
336336 // audioMap.size / 8, audio->offset, audio->offset_end,
337337 // bscope->ainfo.rate, bscope->vinfo.fps_n, bscope->req_spf);
338338
339- projectm_pcm_add_int16 (plugin -> priv -> handle , (gint16 * )audioMap .data ,
340- audioMap .size / 4 , PROJECTM_STEREO );
339+ projectm_pcm_add_float (plugin -> priv -> handle , (gfloat * )audioMap .data ,
340+ audioMap .size / 8 , PROJECTM_STEREO );
341341
342342 // GST_DEBUG_OBJECT(plugin, "Audio Data: %d %d %d %d", ((gint16
343343 // *)audioMap.data)[100], ((gint16 *)audioMap.data)[101], ((gint16
You can’t perform that action at this time.
0 commit comments