20 May '13 - 08:33 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Sample loop points  (Read 1420 times)
Mop
Posts: 1


« on: 4 Oct '06 - 19:06 »
Reply with quoteQuote

I have a simple module-like system for which I need playback implemented.  It consists of 30 or so 16-bit samples, to be played back over 8 channels.  These samples need to be decompressed (I have code in place to do this already) and used from memory.  Each sample has a pre-defined loop point, as with most module-type samples--the sample plays to the end, then continues from the loop position on to the end repeatedly until it is halted. Your documentation (Bass.BASS_SampleLoad) claims that non-complete-sample looping is not possible, but that it could be achieved through streaming.  Could someone give an example of how this would be accomplished?

Thanks.

Mop.
Logged
Ian @ un4seen
Administrator
Posts: 15244


« Reply #1 on: 5 Oct '06 - 20:18 »
Reply with quoteQuote

Yep, you can do custom looping with a stream by setting a "mix-time" POS sync (BASS_ChannelSetSync) at the end point, and then seeking (BASS_ChannelSetPosition) to the start point in the sync's SYNCPROC callback. Checkout the CUSTLOOP example for a demonstration.
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines