Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Choppy audio with wav and displayio graphics at same time
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Choppy audio with wav and displayio graphics at same time

by kevinjwalters on Wed Jun 10, 2020 7:51 pm

I've been experimenting with moving around some displayio objects while audio plays and the audio gets a bit choppy. I was moving a 16x16 sprite with transparent colour 0 at scale=6 by changing its x property. It's loaded with adafruit_imageload. The movement occurs every 120ms or 50ms and that makes the audio choppy. I don't think it's losing samples, just stopping for fractions of a second. I have auto_refresh on for the screen. I've reduced the scale to 3 and things seem better but perhaps not quite perfect. The audio is playing from 16k 8bit unsigned mono files using WaveFile. This is on a CPB (i.e. pwm audio) with 5.3.0.

Is the conflict between audio and displayio expected? Are there any general tips on how to do these type of animations with audio running?

kevinjwalters
 
Posts: 634
Joined: Sun Oct 01, 2017 3:15 pm

Re: Choppy audio with wav and displayio graphics at same tim

by siddacious on Tue Jun 16, 2020 7:58 pm

I am not going to be useful here, but I can find someone who might be!

siddacious
 
Posts: 271
Joined: Fri Apr 21, 2017 3:09 pm

Please be positive and constructive with your questions and comments.