26 May '13 - 00:34 *
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: Fast seeking  (Read 2394 times)
Ingolf
Posts: 81


« on: 6 Feb '03 - 13:43 »
Reply with quoteQuote

I managed to get a file playing in reverse, but my buffer is very small so my app does a lot of file seeking, which gives me a cpu usage of like 50% on my 2.04ghz computer.

What is the best way to solve this? I thought of creating an internal buffer to store the data and read it from there or something. I checked out Ian's reverse code, but it looks to me like there is just a large buffer. I could be wrong.
Logged
Ian @ un4seen
Administrator
Posts: 15276


« Reply #1 on: 6 Feb '03 - 19:20 »
Reply with quoteQuote

The process of playing in reverse involves decoding a bit, reversing it, and then seeking back to do the next block. Using a smaller buffer obviously increases the number of times it has to stop/seek/start - that's more CPU used on the overhead, and not the actual decoding/reversing of the stream data.

So, in conclusion, use a larger buffer Smiley ... 2 seconds should be ok.

Note that the decoding/reversing buffer is not the same thing as the playback buffer... you can use a large buffer for decoding/reversing the data, and still use a small buffer length for playback.
Logged
Ingolf
Posts: 81


« Reply #2 on: 6 Feb '03 - 20:22 »
Reply with quoteQuote

I understand, then I am doing the right thing. Thanks!
Logged
Richard_b
Posts: 28


« Reply #3 on: 7 Feb '03 - 09:47 »
Reply with quoteQuote

Is ians code for playing backwards available? Id love to see it and incorporate it in my code. Cheers
Logged
Ingolf
Posts: 81


« Reply #4 on: 7 Feb '03 - 10:01 »
Reply with quoteQuote

Yep, check this out:

http://www.un4seen.com/YaBB.cgi?board=bass&action=display&num=1019597935#2
Logged
Richard_b
Posts: 28


« Reply #5 on: 7 Feb '03 - 10:08 »
Reply with quoteQuote

OK ..sadly Im a vb developer....soI dont get the code...can it be done in VB? Any ideas how I make it work?
Logged
Ingolf
Posts: 81


« Reply #6 on: 7 Feb '03 - 10:16 »
Reply with quoteQuote

Yeah I know how, but don't know VB, hehehe.
Logged
Richard_b
Posts: 28


« Reply #7 on: 7 Feb '03 - 11:07 »
Reply with quoteQuote

OK...does anyone else know how to make it work in VB?Huh
Logged
Ian @ un4seen
Administrator
Posts: 15276


« Reply #8 on: 7 Feb '03 - 15:45 »
Reply with quoteQuote

You can use BASS_FX to do reversing... get it from the BASS page.
Logged
Richard_b
Posts: 28


« Reply #9 on: 8 Feb '03 - 07:41 »
Reply with quoteQuote

I could use Bass_fx....however....id love to be ablre to do it like the C code does in VB! Is there a VB example I could look at?
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines