this is not a hot path only runs at start-up and tagnav reload
so speed is not so much of a concern
we can split the data into two separate tables to
remove the padding and allow symbols to be stored in uint8
(highest symbol <128) and do strlen at TOU
use uint16_t for get_clause()
Change-Id: I0f8663d0de9cac102f1d58b43bf200272754c466
- The "Special character" entry will show all special characters (non numerical + non letters)
- The numerical entry was bug, and could show some special characters from the ASCII table. It is now fixed.
Change-Id: I001fb322fab81918996e15e4d0ca6b7c9e5160af
Add a new entry, it is useful to go this way for large libraries rather than scrolling manually through the whole list
Change-Id: Ia54b613b4a5fa40863ebb176a549287d3a765a56
* All tagnavi.config entries pulled into language files
* Database viewer looks up LANG_IDs from the entries
* If we find a match, we can translate and voice these entries
* Add (disabled) mechanism to allow voicing database metadata
Original patch by Paul Sauro
Modifications by William Wingus
Further modifications by Solomon Peachy
Todo/Problems:
* Current Tagnavi headers are rather awkward in English
* Can't voice the "By first letter" alphabetic entries
* No mechanism for generating talk clips for DB metadata
Change-Id: Ic276ccda1bd8aae550d38be852bae4c6f697cd47
callgrind identified check_viewport and scan_int as pretty hot code paths on startup
and playback
check_viewport uses strlen to check the string has at least 4 characters
we can just check if str[3] != '\0' without walking potentially much further
and no function call..
scan_int was building a buffer for atoi to parse when we can just do it in the loop
directly
Change-Id: Ie028980333cbed4c066d8ea547a89cf4fad76808
On these older iPods, power was not being shut down completely, which led to a backfeed situation leading to decreased battery life and some stability issues.
This was particuarly apparent when using SD card adapters that do not
respect the ATA power management commands (ie all of them), as they never enter a low-power state on their own.
With this change, there are reports of battery life exceeding 20 hours of continuous playback (~30% increase with CF cards, 3x improvement with SD cards) and appears to resolve intermittent wakeup stability issues with SD adapters.
Change-Id: I46cfff7a59bb18a448989812303f30869df24d2d
in testing of three ways of doing this
current: ((_ctype_+1)[(unsigned char)(c)]&_N)
alt1(this patch): (((unsigned int) (c) - '0') < 10)
alt2: ((unsigned int)(c ^ 0x30) < 10)
alt1 and alt2 are the same in terms of speed and instructions (on arm v7) but alt2 has one more
instruction on mips
(across several archs in godbolt mips, armv7v8, x86) and on ARM7 (clipzip) device about 9% faster
less false positives for both alt1 and 2 when you start supplying more than 8bits
not sure if that matters in practice though
I tried similar with isxdigit but could only get to within 1 instruction of the ctype implementation
although it negated the array lookup I saw no discernable speed difference on device
https://godbolt.org/z/qGvh4hqnG
Change-Id: I5c9e8fd3915709853e0e33427038e20a068058b6
Responding to the bug report posted by iPodVT:
https://forums.rockbox.org/index.php/topic,55180.msg255292
- An active sleep timer that runs out will now cause the
player to shut down regardless of playback state
- When playback state is paused or stopped, once the
idle timer has run out, player will shut down, regardless
of any running sleep timer
Change-Id: I33de682a63ed1db76174eb2394ef5568f37cc677
characters less than the first diacritic in the symbol table (0x300)
return false after checking the MRU table
we gain some performance by eliding the function call all together if less than first diacritic
Change-Id: I02c14e350eb168eca808523affad443cd43888b4
Adds 'Add Current to Shortcuts' for settings alowing you to save
the current value and restore it with a shortcut
Change-Id: I0d5c5da9553248a70fd46d5553486ebf7865a20a
maxlen is set to MAX_FILENAME by all callers so lets just make that part of the deal
check the file exists before we set it
Change-Id: I3074f3164fcd4b8873b69612d5c1a51a39de4baf
the fmr file wasn't being detected on multivolume targets
the global preset list couldn't be cleared once set
empty global preset file wasn't detected properly either
Change-Id: I9c4b40ed0b6f3dbb0d38eb668fc74a512ea34062
rockpaint is the only plugin doing anything dit setting the dirfilter pointer
it appears to restore it but this is cheap insurance on weird crashes
that result..
Change-Id: I70c826d6ec4c9cb6e1539ab23f1de82ca3e67ad1
rockbox_browse() set its own *dirfilter and then may neglect to restore it
set_current_file_ex()
can take a unified path and file or separate path and file
only issue is when you send a folder and don't have the final slash
its then interpreted as a file and current file is set to it
meanwhile path is split and you end up in the parent dir
instead if filename is null check if path points to a directory
if dir_exists(path) then we will use it as is and set filename to ""
Change-Id: I6beaa91141c1a4025cdfac5d6ba426137146c212
Also adds the ability to supply a directory without the final slash
you then are take to the directory but have the ability to travel
up one level above before exiting
when you hit cancel
Change-Id: I1091fbe496e2c7c34ecb2113ab1cd31b0c678d9d
Stops “Error accessing playlist control file” message
after returning from USB mode, due to control file
fd being closed
Change-Id: Ic4ecb276ef32f8dc24fe7e540742161b50934c73
remove nvram and use the existing settings framework for it
add a crc check to the user_settings data to see if we need to save
the user setting file or if we can just save the status file (resume.cfg)
move volume to the system_status struct so we don't write the whole settings file
over volume changes
allow user to still export volume with save sound settings
allow the user to also export pitch and speed
name the file .resume.cfg
Rename all the SYSTEM_STATUS save file variables to TLAs to save space and
discourage tinkering
Cleanup DEBUG_AVAIL_SETTINGS output
when saving user_settings it calls status_save as well this cause the resume
file to be written twice. instead remove the callback for status_save
when setting_save is called
remove header text when saving .resume.cfg
convert status_save() to status_save(bool force)
add SYSTEM_STATUS_UPDATE_TICKS
for ATA device set this to 5 minutes
since we arlready wait for the disk to be up before saving
we don't want to miss our window
for all other every 15 minutes
that way if the battery is too low by the time shutdown comes around you
don't lose much progress
Change-Id: I27214ffd6e5d5494ee5ca83b14f04a41ba426ad7
Use AXP2101's egauge battery percent level if available (hw4 units).
If not available (_battery_level() will return -1 on hw1-hw3 units),
fall back to voltage battery level.
Also fix logic in axp2101_battery_status()
Change-Id: Ic300418532dae6f7772fff8bf5e2b32516f3b973
by tying initial to NVRAM_BLOCK_SIZE we get automatic invalidation when the
system_status struct changes
Change-Id: Icd8fad14bdd31dddd609833830c939d5560feeb1
Revisit this after discussion with chris_s on IRC and forum
Pitch menu now changes icon when pitch has been changed
uses NVRAM to save the pitch settings unconditionally
Manual updated
Change-Id: Idcb4c2b7fe42f7a203dc4bfc46285657f370d0fd