26 May '13 - 03:57 *
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: select a start point for a track  (Read 433 times)
TG
Posts: 5


« on: 30 Oct '11 - 10:12 »
Reply with quoteQuote

Is it possible to start a track at other than the beginning , ie delay by 30secs etc
I am using BASS.dll with VB6

Thanks

TG
Logged
Wishmaster
Posts: 124


« Reply #1 on: 30 Oct '11 - 15:16 »
Reply with quoteQuote

HI  use BASSmix

Example
Add a channel to a mixer, delaying the start by 1 second and limiting the duration to 2 seconds.
QWORD start=BASS_ChannelSeconds2Bytes(mixer, 1); // delay
QWORD length=BASS_ChannelSeconds2Bytes(mixer, 2); // duration
BASS_Mixer_StreamAddChannelEx(mixer, channel, 0, start, length); // add the channel

Logged
TG
Posts: 5


« Reply #2 on: 2 Nov '11 - 18:52 »
Reply with quoteQuote

Thanks - that worked a treat to delay start of track and play a length -
Is it possible to start part of the way through a track immediately ?  ie miss out first 2 secs

Regards
TG
Logged
User137
Posts: 10


« Reply #3 on: 3 Nov '11 - 05:32 »
Reply with quoteQuote

You can set track position with code too. This is part of my pascal class code:
procedure TBassSound.SetPosition(p: QWORD);
begin
  if loaded then
    BASS_ChannelSetPosition(channel, p, BASS_POS_BYTE);
end;

procedure TBassSound.SetTimePos(p: TTime);
begin
  SetPosition(BASS_ChannelSeconds2Bytes(channel, p*86400));
end;
.. where TTime is double type, and 1.0 is 1 full day.
Logged
TG
Posts: 5


« Reply #4 on: 5 Nov '11 - 17:41 »
Reply with quoteQuote

Thanks, I have managed to 'massage' that into my VB code and appears to do exactly what I want - Many thanks  Smiley
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines