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) {
20
20
format =
21
21
GST_AUDIO_CAPS_MAKE ("audio/x-raw, "
22
22
"format = (string) " GST_AUDIO_NE (
23
- S16 ) ", "
23
+ F32 ) ", "
24
24
"layout = (string) interleaved, "
25
25
"channels = (int) { 2 }, "
26
26
"rate = (int) { 44100 }, "
Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ static gboolean gst_projectm_setup(GstGLBaseAudioVisualizer *glav) {
256
256
257
257
// Calculate required samples per frame
258
258
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 ;
260
260
261
261
// get GStreamer video format and map it to the corresponding OpenGL pixel
262
262
// format
@@ -336,8 +336,8 @@ static gboolean gst_projectm_render(GstGLBaseAudioVisualizer *glav,
336
336
// audioMap.size / 8, audio->offset, audio->offset_end,
337
337
// bscope->ainfo.rate, bscope->vinfo.fps_n, bscope->req_spf);
338
338
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 );
341
341
342
342
// GST_DEBUG_OBJECT(plugin, "Audio Data: %d %d %d %d", ((gint16
343
343
// *)audioMap.data)[100], ((gint16 *)audioMap.data)[101], ((gint16
You can’t perform that action at this time.
0 commit comments