Movie Module Progress: Week 3
So some really good news today! I finally got video working this week, along with proper video synchronization, all without audio information. This bodes well for the rest of the module. I discovered I can’t use SDL audio, as SDL spawns a thread I have no control over, with only occassional callbacks. This does not work in Python, as it is not threadsafe to access Python objects or methods without proper synchronization primitives.
Rene suggested I pass back a buffer of the sound data, to be passed to say a pygame.mixer.Sound or pygame.mixer.Channel object. However, that doesn’t quite work as the Sound object copies the buffer passed into it, and shares no data with the buffer. The issue is that I’m trying to keep the threading as small as possible, so if anyone has any good suggestions for doing sound, I’d love to hear them!
Comments are off for this post