Synced audio

Started by hukka,

hukka

I want to implement a "preview channel" feature to my little DJ'ing software, so that for example the Line Out on my soundcard would be for master output and Rear Out would be for headphone previewing. The user could toggle if a song would be heard on the master out, preview channel or both.
What's the best way to output audio so that the outputs are synchronized as good as possible?

fredvs

Hi
1- Create 2 streams from the same file, one with front flag, one with rear flag.
2- Play both stream.
3 - Zis done....

hukka


QuoteHi
1- Create 2 streams from the same file, one with front flag, one with rear flag.
2- Play both stream.
3 - Zis done....

If I simply do that, they aren't in perfect sync. The other stream will be behind just a little, but enough to be annoying...

fredvs

Hi

Use then getposition of the first stream and setposition for second stream just before playing second stream...

Ian @ un4seen

Try linking the channels (BASS_ChannelSetLink) - that can be used to play/stop multiple channels simultaneously. For seeking (which I guess you'll need), you'll have to stop them, seek both to the position you want, then start them playing again.

hukka


QuoteTry linking the channels (BASS_ChannelSetLink) - that can be used to play/stop multiple channels simultaneously. For seeking (which I guess you'll need), you'll have to stop them, seek both to the position you want, then start them playing again.

That's exactly what I did just five minutes ago, then I read your reply. Yes, that works, thanks Ian :o)