in my demo lib project, i have a background image with the brightness of the image connected to the demo audio, so that it flashes to the audio. however, it seems that the audio samples change too quickly for the image renderer, and these "tears" happen as a result
you can really see it here:
and here's what my code looks like (approximately):
i'm trying to fix it by linearly interpolating the samples, but that doesn't get rid of it completely. i'm thinking about implementing some kind of downsampling or rms, but i don't know how to actually implement either of these
Code: Select all
flash = abs(demo_sound_pcm_stream[demo_sound_pcm_stream_ptr * demo_sound_channels]) + 1) pixi(cover, 0, 0, get_color(flash, flash, flash), ((demo_xsize / cover_xsize)), ((demo_xsize / cover_xsize)))
what can i do? thank you!