0
0

Hi,
I didn’t found any solution on how to play two streams (or samples) alternating
without a gap between them.
With using “FSOUND_HW2D” the hole between them is minimal but still there.

Am I missing something or will there something come to solve the problems?

Okay, I could write the whole data directly to the stream, but then I have to do all decompression
by myself and so it would nearly be the same work as writing it directly to the sounddevice.

How about ‘play_this_after_current_is_finished’ or a ‘start_play_after_x_ms’ with giving the rest time
off the current playing stream?

my test code
[code:1bvhi1a3]
FSOUND_Init(44100, 32, 0);
stream[0] = FSOUND_Stream_Open("sinus.wav",FSOUND_HW2D ,0,0);
stream[1] = FSOUND_Stream_Open("sinus.wav",FSOUND_HW2D ,0,0);
int cur = 0;

do {
int c = FSOUND_Stream_Play(FSOUND_FREE,stream[cur]);
while (FSOUND_IsPlaying(c));
cur = 1-cur;
} while (1);[/code:1bvhi1a3]

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.