Discussion:
[Audiere-users] Sequential playback without pauses
Michael Klimenko
2006-02-17 20:26:02 UTC
Permalink
Hi!

I'm new to Audiere and I've got some trouble I can't resolve.

I want to create a dynamic music track. I've got several OGG music
fragments, which were created specifically for such purpose:
if you place them one right after another in any sound editor, you'll
got musical theme without any pauses on fragments' splices.

So, I loaded all fragments as streams and tried to play() them one
by one, starting next fragment when the previous one is ended (by
using StopCallback interface). This method did the job, but it has
terrible flaw: there is a small silence interval between my
fragments! It spoils everything!

Is there any method to deal with it?
Matt Campbell
2006-02-17 20:54:03 UTC
Permalink
Hello Michael:

To solve this problem, you'll need to implement a C++ class which
concatenates multiple sample sources. This class could be called
SampleSourceSequence, and it would implement the SampleSource
interface. It would hold a list of SampleSource objects, and its read
method would read from each source in order. The only caveat is that
each source would need to have the same format (channel count, sample
rate, and sample format), unless perhaps you use a resampler.

Actually, a SampleSourceSequence class is useful enough that one should
be included in Audiere itself. Feel free to contribute yours. :-)

BTW, are you using the new 1.9.4 release, or a CVS snapshot?

I hope this helps.
--
Matt Campbell
Lead Programmer
Serotek Corporation
www.freedombox.info
Loading...