Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#79032 - 09/03/2002 15:37 empeg_state_dirty ??
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
What? Why?

I grepped the code, and can't find anything that uses this variable as a conditional.

Looking at other stuff in hijack.c suggests that empeg_state_dirty would be used to signal when the flash needs saving during a powerfail, so I would have thought that I need to set this variable to 1 after changing bass or treble levels.

But my levels get saved ok without setting this variable, which makes sense given the fact that nothing appears to use it..

Is this a historical variable that is no longer required? Or if not, what is its purpose in life?

BTW, spare8 is working for me - I half the resolution of the setting by right-shifting the value before saving (ie turning 5 bits into 4), and left shift again at restore time. The lost bit is worth .5 dB, which I think is an acceptable error given the raison d'etre for the feature - dynamic adjustment. So we get back to within .5dB of the user's last setting, with non-integer .dB settings getting rounded down to the nearest integer.

It'll probably cause a bit of confusion, and bug reports from people using it though

I'm very close to leaving this for now and moving to the tuner volume stuff. I've cleaned up the extern stuff that was bugging me the other day - all that remains to be done for now is to resolve this empeg_state_dirty question, and to find somewhere to insert a call to apply the settings at boot (has to be after the eq has been set). Any suggestions?


_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#79033 - 09/03/2002 15:40 Re: empeg_state_dirty ?? [Re: genixia]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
Yes, empeg_state_dirty should get set to "1" (by you) whenever changing anything that needs to be saved in flash. In practice, you may not have needed it yet, since simply adjusting the volume (which the player does on startup) or playing a tune (changes FID) causes that flag to get set.

But set it anyway. It is used in empeg_state.c

Cheers

Top