cillian64 / thegrid

The·Grid - Interactive polychromatic lighting array
http://www.thegrid.fish/
2 stars 6 forks source link

MPE timing issues #11

Open adamgreig opened 10 years ago

adamgreig commented 10 years ago

Waveform gets out of sync with actual audio time and/or frames get out of sync.

cillian64 commented 10 years ago

MPE code to seek pyglet looks legit, and pyglet reports playtime which matches what you'd expect. Suspect pyglet is getting desynced internally, probably related to buffers. Probably related to this old reported bug. Had a quick browse through pyglet audioplayer code and it all looks legit and tries to clear buffers upon seeking, but it's hard to tell. Could be an OS buffer issue. Will investigate ugly bodges -- letting the audio play while repeatedly clicking the desired time quickly seems to solve the problem, might be able to automate this.

cillian64 commented 10 years ago

(To clarify the actual problem is nothing to do with frames, the pyglet audioplayer time gets out of sync with its reported time and the time MPE expects. This happens upon seeking the audio, most obviously when paused.