19 May '13 - 19:52 *
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: Suggested best way to save BASS state?  (Read 223 times)
Raptisoft
Posts: 23


« on: 11 May '12 - 12:49 »
Reply with quoteQuote

Hi all,

Can anyone suggest to me a good way to serialize the state of a BASS channel?

I'm playing some game music, and I have certain game events timed to happen when certain parts of the music are hit, for emphasis (you know, like a big drum clash, and an enemy appears).

When I serialize the game state, I also want to serialize where the bass music is, and what its attributes are, so that when I re-load the game, I can fire up the music in the exact same state it was when the game left.

How would you recommend I do this in the least hacky way?
Logged
Ian @ un4seen
Administrator
Posts: 15244


« Reply #1 on: 11 May '12 - 16:06 »
Reply with quoteQuote

If you have an ID for each audio file (eg. perhaps an array index), I guess you could just store that ID (rather than the filename) with the playback position and the value of any attributes (eg. VOL/PAN/FREQ) that you're adjusting. You can then apply those stored values next time.
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines