Rockbox Technical Forums

Support and General Use => Recording => Topic started by: nieroster on April 01, 2011, 11:38:06 AM

Title: Behaviour on shutting down (battery empty)
Post by: nieroster on April 01, 2011, 11:38:06 AM
Hello,

I have observed the following behaviour of my iRiver H120:

when turning off due to an empty battery the recording (wav file) is not finished properly => the recording is lost (i.e. can not be opened by any audio editor I know)

Is this the intended behaviour? To my mond an empty battery usually does not come out of the blue. It should be possible to detect this situation and finish the recording properly.

Any comments?

Regards,
Franz
Title: Re: Behaviour on shutting down (battery empty)
Post by: Llorean on April 01, 2011, 02:56:55 PM
Depending on the battery capacity and age, 5% remaining can mean "I'm dead, and don't have enough charge left to spin up the disk" or "2 hours remaining." In the first situation, it's too late to salvage the recording. In the second situation, there's 2 hours left and the user could miss something important because the player stops early to shut down. So while it sounds like a good idea, due to the nature of batteries it's just not very feasible that the player could make a useful judgment consistently enough to not anger people one way or another.

Meanwhile, the .wav file you get can be recovered. I believe it's just a .wav file missing the headers, so if it's opened as raw audio and you tell the program the right values it should be usable.
Title: Re: Behaviour on shutting down (battery empty)
Post by: nieroster on April 01, 2011, 04:04:28 PM
Llorean thanks for your explanations!

In my case it is a CF modded H120, so it would at least be worth trying to savely close the recording file before shutting down. How do laptops manage this issue?

The perfect solution would be a background task monitoring the battery level and predict the end of battery life using a self adopting algorithm to decide when it is safe to stop recording and shut down.

Well just my thoughts...

Regards,
Franz