For example, I need to start

Sound A at 1.00 seconds
Sound B at 1.25 seconds
Sound C at 2.00 seconds
Sound B at 2.50 seconds

Each sound is stored in an .ogg file, and each is about 4 seconds long. (What I’m doing is allowing players to program a simple sequencer.)

One way I thought to do this is to create a user defined (silent) stream and then add sync points, but I’ve discovered that sync points are not supported in user-defined streams. Is there a totally different approach I should use?

I could create a very long silent .ogg file, play that, and then add sync points to that, but that seems like a really bad hack. (And huge waste of disk space, since players’ compositions can go on for a few minutes.)

  • You must to post comments

Some additional info:

The sound clips are each 2-4 seconds long
They always start on 1 second boundaries
They are composed so that any two together will sound good when played offset by 0,1,2,3, etc, seconds. If they are offset by, for example, 0.9 seconds, they won’t sound good.

What if I were to make a 1 second silent .ogg file and use a callback when it completes to restart it, and to play any clips that should start at that time offset? Can you think of any latencies that would creep up there?

Previously I was polling each frame to trigger these, which caused some obvious problems.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.