Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Recording
| | |-+  Recording countdown timer
« previous next »
  • Print
Pages: [1] 2 3

Author Topic: Recording countdown timer  (Read 23227 times)

Offline Mmmm

  • Developer
  • Member
  • *
  • Posts: 922
Recording countdown timer
« on: September 04, 2006, 07:55:41 AM »
How would you like a countdown timer so you can set your unit up to start recording in a few hours?

Here's a patch to do just that.. I've only just finished it so it may have a couple of bugs.

As yet, when you leave the recording screen the timer pauses and resumes when you re-enter (so you need to be constantly in the recording screen for the timer to work properly). I realise this is not ideal and it'd be great if it just kept ticking away while you were doing other things, but that would take me ages to work out how to do. But I'll be thinking about it.

So, to get it to work, you set the timer in the settings and then press record as usual in the recording screen - press record again to pause the countdown etc... I've set the max time as 25 hours - is this enough do you think?

I also still have to do the lang files..(it's hardcoded in English at the mo).

Any other ideas or any bugs, just post here....

(reply#16 has latest patch)
« Last Edit: September 06, 2006, 07:31:00 AM by Mmmm »
Logged
My H120 build with Recording Enhancements Pack
Some examples of recordings done on H140 with Rockbox

Offline mlind

  • Member
  • *
  • Posts: 179
  • Recording Pro
Re: Recording countdown timer
« Reply #1 on: September 04, 2006, 08:13:39 AM »
GREAT!

How about a button for "immediate start" if the band starts early or if you by misstake have entered the wrong countdown time.
« Last Edit: September 04, 2006, 08:15:16 AM by mlind »
Logged
iRiver H120

Offline Mmmm

  • Developer
  • Member
  • *
  • Posts: 922
Re: Recording countdown timer
« Reply #2 on: September 04, 2006, 08:20:35 AM »
Good idea, an override button would be useful....
If you entered the wrong time though you can easily go back into the menu and change it.

Maybe the play/pause button should act as start/stop timer and the newfile button should always be newfile....
Logged
My H120 build with Recording Enhancements Pack
Some examples of recordings done on H140 with Rockbox

Offline Mmmm

  • Developer
  • Member
  • *
  • Posts: 922
Re: Recording countdown timer
« Reply #3 on: September 04, 2006, 08:34:44 AM »
Ok, so now the ON button starts/pauses the timer and the REC button starts a new file as usual and resets the timer to 0.

Also I've enabled long presses of the up/down buttons and the stop in the timer settings...seems more obvious to use now.

[attachment deleted by admin, too old]
Logged
My H120 build with Recording Enhancements Pack
Some examples of recordings done on H140 with Rockbox

Offline Rincewind

  • Member
  • *
  • Posts: 266
Re: Recording countdown timer
« Reply #4 on: September 04, 2006, 10:40:19 AM »
great idea!
Logged
Iriver H120, Sansa e280

Offline mborus

  • Member
  • *
  • Posts: 127
Re: Recording countdown timer
« Reply #5 on: September 04, 2006, 01:26:11 PM »
Quote
So, to get it to work, you set the timer in the settings and then press record as usual in the recording screen - press record again to pause the countdown etc... I've set the max time as 25 hours - is this enough do you think?

For me, longer periods might be useful. Like 72 hours, so I can go away for a weekend on friday and still set the countdown to record on sunday...
Logged

Offline Mmmm

  • Developer
  • Member
  • *
  • Posts: 922
Re: Recording countdown timer
« Reply #6 on: September 04, 2006, 02:36:16 PM »
WOW..72 hours...the problem there is the battery I think...although it would be ok if it was plugged in I suppose...hmmmm what do you think might be your maximum? I have to assign a certain number of bits to hold the values you see so it has to be finite (and the more unused assigned bits the more memory wasted).
Logged
My H120 build with Recording Enhancements Pack
Some examples of recordings done on H140 with Rockbox

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Recording countdown timer
« Reply #7 on: September 04, 2006, 02:40:06 PM »
I think one solution could be an option to set a time/date to begin recording for RTC targets only, that way those with an RTC can set *any* arbitrary time. Not removing the other option, but expanding it.
Logged

Offline Mmmm

  • Developer
  • Member
  • *
  • Posts: 922
Re: Recording countdown timer
« Reply #8 on: September 04, 2006, 02:51:26 PM »
Quote from: Llorean on September 04, 2006, 02:40:06 PM
I think one solution could be an option to set a time/date to begin recording for RTC targets only, that way those with an RTC can set *any* arbitrary time. Not removing the other option, but expanding it.
Yes, this is the possible next step, although I dont have a clock on my player so the motivation isn't quite so high. That's why I went for a countdown timer first! :)
Logged
My H120 build with Recording Enhancements Pack
Some examples of recordings done on H140 with Rockbox

Offline Mmmm

  • Developer
  • Member
  • *
  • Posts: 922
Re: Recording countdown timer
« Reply #9 on: September 04, 2006, 04:22:09 PM »
Hmmm the timer doesn't seem to be very accurate, it loses about 3 seconds per minute...the peakmeter seems to be taking a lot of juice... If I disable it it is spot on... I wonder what happens if I boost the CPU... Or maybe a disabled peakmeter while it is ticking would be ok as you wont be looking at the unit while it is counting down. What do you think?
Logged
My H120 build with Recording Enhancements Pack
Some examples of recordings done on H140 with Rockbox

Offline Rincewind

  • Member
  • *
  • Posts: 266
Re: Recording countdown timer
« Reply #10 on: September 04, 2006, 04:36:52 PM »
maybe you could get your time from the runtime counter?
but this won't be possible when the player is plugged in  :(
Perhaps there is some code there how to get an exact time.

I haven't seen your code yet, but I suppose you did something like

    sleep(HZ*x);

Disabeling everything that uses cpu time (and wastes battery) when the player is waiting is a good idea anyway. Make it an option ;D
Logged
Iriver H120, Sansa e280

Offline Mmmm

  • Developer
  • Member
  • *
  • Posts: 922
Re: Recording countdown timer
« Reply #11 on: September 04, 2006, 04:45:05 PM »
Quote from: Rincewind on September 04, 2006, 04:36:52 PM
maybe you could get your time from the runtime counter?
but this won't be possible when the player is plugged in  :(
Perhaps there is some code there how to get an exact time.

I haven't seen your code yet, but I suppose you did something like

 Â   sleep(HZ*x);

Disabeling everything that uses cpu time (and wastes battery) when the player is waiting is a good idea anyway. Make it an option ;D
Boosted it only loses 2 seconds per minute...that's rubbish!

To get the timing i'm setting last_tick = current_tick as soon as it is activated and then decreasing by one when current_tick - last_tick >= HZ.
I'm running the whole of the recording loop while I do this as well.

It's fast enough to work without the peakmeter unboosted but it just wont work with it... maybe I should try decreasing within the peakmeter code instead....

If I used a sleep then nothing else would happen while it slept, so then there would definitely be no peakmeters! But it would give spot on timing.
« Last Edit: September 04, 2006, 04:48:39 PM by Mmmm »
Logged
My H120 build with Recording Enhancements Pack
Some examples of recordings done on H140 with Rockbox

Offline Mmmm

  • Developer
  • Member
  • *
  • Posts: 922
Re: Recording countdown timer
« Reply #12 on: September 05, 2006, 05:31:32 AM »
\o/
\o/

it's working...

It's ticking in time...

\o/

but not only that.....

... it keeps ticking no matter what you are doing!!!!!!!!!!!!!  :o

Too good to believe eh?
It certainly is....
I'm not going to post the patch until i've checked it over a bit more.. I still don't believe it! :D
Logged
My H120 build with Recording Enhancements Pack
Some examples of recordings done on H140 with Rockbox

Offline Mmmm

  • Developer
  • Member
  • *
  • Posts: 922
Re: Recording countdown timer
« Reply #13 on: September 05, 2006, 08:33:32 AM »
Alright then, heres the new patch..bug free... ahem...

The timer is now accurate and ticks at all times (not sure about plugins though).

I had it so that it automatically started the recording screen wherever you are too but calling the recording screen from the timer was a bad idea....it crashed quite often but it worked often too..however, that's not good enough.

So if the timer reaches 0 while you are away from the recording screen nothing will happen... when you enter the recording screen next it will automatically start recording.

I thought that a good idea would be to have an icon in the statusbar that is always on when the timer is ticking and flashes or something when it reaches 0. Unfortunately the statusbar is full on the Archos...hmmmm... That'll be for version 4 I think! :D

PS. mborus you can now have up to 128 hours timing! Is that enough? ;D

[attachment deleted by admin, too old]
« Last Edit: September 05, 2006, 10:02:40 AM by Mmmm »
Logged
My H120 build with Recording Enhancements Pack
Some examples of recordings done on H140 with Rockbox

Offline whatboutbob

  • Member
  • *
  • Posts: 178
Re: Recording countdown timer
« Reply #14 on: September 05, 2006, 09:36:11 AM »
Only 128 hours?  Oh man...but there's this gig next monday I wanna record...and I wanted to get started early...  ;)
Logged

  • Print
Pages: [1] 2 3
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Recording
| | |-+  Recording countdown timer
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.104 seconds with 14 queries.