20 May '13 - 03:43 *
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: Request: VB6 code example: LOOPING  (Read 13004 times)
Ryzer
Posts: 73


« on: 22 Aug '03 - 11:04 »
Reply with quoteQuote

Hi,

I'm creating a DJ Studio and I want to add a LOOPING function in it. I have 3 buttons:
- LOOP IN: Click this while playing song and it will set the startpoint of the loop.
- LOOP OUT: Click this while playing after you clicked on LOOP IN and it will set the endpoint of the loop and it will jump to startpoint. Now the song has to stay in the loop beginning from startpoint to endpoint.
- END LOOP: If you click this, your song will not jump to startpoint anymore when it reaches endpoint but it will continue the song.

Now I know you have to do the looping with some other stream etc but I can't figure out how to do it and there are no examples for it. So here I am requesting an example (VB6 please) that makes it possible to go into a loop, and leave it, WITHOUT any hops. I bet if someone creates a good example that it'll be added in the next BASS version under examples? *looks @ Ian*  Smiley

Thanks,
Ryzer
Logged
Creadig
Posts: 71


« Reply #1 on: 24 Aug '03 - 03:04 »
Reply with quoteQuote

I`am using this code for a loop

When activate the loop: start a timer control

TIMER CODE:

   Dim StartByte As Long
   Dim EndByte As Long
   Dim ActualByte As Long
   
   StartByte = CLng(xxxx) 'xxx= Start pos. in bytes
   EndByte = CLng(xxxx) 'End pos. in bytes
   ActualByte = CLng(xxxx) 'current playing pos. in bytes
   
   'calculations
   EndByte = (EndByte / 6000) / 3
   ActualByte = (ActualByte / 6000) / 3
   
   'change the stream position for a cue start

   Do While ActualByte >= EndByte
       'sets the file position to start position
       Stream01SetPosition StartByte, 2
       Exit Do
   Loop


When deactivate the loop: END timer control

i hope this help.  Wink
Logged
autumn_water
Posts: 6


« Reply #2 on: 24 Aug '03 - 04:16 »
Reply with quoteQuote

Hello,
 I've just sent it  to u ,  Grin . Wish u the best thing as u wish it to be ...
 If u have difficuty , please mail to me,OK  Smiley
Cheerio
                                        :)autumn_water:)
Logged
Ryzer
Posts: 73


« Reply #3 on: 7 Sep '03 - 11:59 »
Reply with quoteQuote

Creadig that was the method I was using, but it's not perfect enough Wink
Logged
Creadig
Posts: 71


« Reply #4 on: 8 Sep '03 - 17:46 »
Reply with quoteQuote

Yeap!. I hope somebody can do it better.
Is the only code i have and it`s no perfect but it`s works.

Smiley
Logged
Creadig
Posts: 71


« Reply #5 on: 19 Sep '03 - 05:24 »
Reply with quoteQuote

autumn_water... can you send me the sample of loop???  Embarrassed
i want to try it.

Thanks  Wink
Logged
Daner
Posts: 13


Re!
« Reply #6 on: 26 Sep '03 - 15:43 »
Reply with quoteQuote

Hi autumn_water! Could you send me the example, pls!! Thank you very much.
danergo@freemail.hu
Logged
alex_privy
Posts: 9


« Reply #7 on: 28 Sep '03 - 17:20 »
Reply with quoteQuote

Hi Autumn_Water can you send also to me your code so I can help you, please?
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines