This was insanely slow for large playlists. Implement it as a
constant-time operation to avoid the O(N!) blowup, and add a
new "clear" command to the control file to avoid flooding it
with individual delete commands.
Change-Id: Ied82d1cba015591edd583f2a2ff6772108f4e176
This is all but guaranteed to be broken since pdbox doesn't use
SHAREDBSS_ATTR or SHAREDDATA_ATTR, needed to share memory safely
with COP threads.
Judging by the codec performance comparison on the wiki, if the
iRiver H100 and H300 can run PDbox on one core, PP targets should
have no problem doing it - they are 2-4x faster even on codecs
that don't have multi-core optimizations.
Change-Id: I8f556013146cb670f69cc42e80b1c768ba0f74cd
move loading file reference to a separate function
some optimization of the disk search function check tag length before
reading the actual entry & reduce number of lseek calls
this affects startup resume as well before tagcache is done loading
Change-Id: I2bd2fc53c4870416ecd1a4034b34cb6984d8ad51
Fix deadlocks in the dircache scan thread caused by incorrect
lock ordering. Mutating operations need to stop the thread to
prevent it from accessing invalid data; this must always be
done before taking the playlist lock to avoid deadlocking the
scan thread.
Change-Id: If719a8b28ed0b0b3eac068073581e606c4a5f58a
Make background control file flushing work on non-dircache targets.
It has nothing to do with dircache and doesn't belong in the dircache
scan thread.
Change-Id: I3f39261ccaebb5dce69e7db3d2e0c0c0c54f640b
This is not necessary. Volatile doesn't create a memory barrier
wrt. non-volatile accesses and there are no interrupts involved,
so there's no reason to use it here.
Change-Id: I78299e2f318e68735364601b3bc2aa036e71130e
Display volume bars using a perceptual scale instead of the
linear dB scale. This makes adjusting volume with the bar a
lot more usable on touchscreen targets.
Change-Id: I2db010486e6ba17f9d08202ee74a0b509f2cb434
The perceived loudness change of a change in volume depends
on the listening volume: at high volumes a 1 dB increment is
noticeable, but at low volumes a larger increment is needed
to get a comparable change in loudness.
Perceptual volume adjustment accounts for this fact, and
divides the hardware volume range into a number of steps.
Each step changes the dB volume by a variable amount, with
most of the steps concentrated at higher volumes. This
makes it possible to sweep over the entire hardware volume
range quickly, without losing the ability to finely adjust
the volume at normal listening levels.
Use "Volume Adjustment Mode" in the system settings menu
to select perceptual volume mode. The number of steps used
is controlled by "Number of Volume Steps". (Number of steps
has no effect in direct adjustment mode.)
It's still possible to set a specific dB volume level from
the sound settings menu when perceptual volume is enabled,
and perceptual volume does not affect the volume displayed
by themes.
Change-Id: I6f91fd3f7c5e2d323a914e47b5653033e92b4b3b
dircache_search() can yield, which would lead to memory corruption
if the playlist dcfrefs buffer is moved at that point. Prevent this
from happening by storing the buflib handle and pinning the buffer
while scanning the dircache.
Change-Id: I28b122de283953dd6d54c1d00598759f5bdcbe93
Enables the use of PictureFlow and the Properties plugin
with parent tables of ALLSUBENTRIES, such as an album
or album artist, instead of individual tracks.
Change-Id: I18c4779ed116a48c732ae32b9629e7e0d93ce7c8
- Move multiple-id3 functionality into lib
- Extract retrieve_id3 function
In preparation for using these functions
from the Properties plugin.
Change-Id: I7252581340680e32df763f1f4b41646a055fe19e
This was added in commit d553bb1 and
doesn’t seem to be used anymore.
Return PLUGIN_OK since an error message
is already produced.
Change-Id: I5eaf7e7eb7c850a6fa9c3d2717c440e335f5efd1
Apparently queue_send() silently falls back to queue_post()
if sending isn't enabled. Doesn't seem like a good idea, as
post and send are definitely *not* interchangeable!
The playlist code relies on queue_send()'s blocking behavior
to prevent the dircache thread from using potentially stale
pointers.
Change-Id: Ibf4b0def3bf9c96cb2fe80cd75043b7ce1dcf250
You could only add single files to playlists
from the database browser before. This
enables adding any database selection to
a new or existing playlist.
Change-Id: I811c7167641c589944bb2afc18dcc1d299a7b979
move seconds and sizes to arrays indiexed by enums
use a loop for the display and talk of each
stop exiting on SYS_EVENTs
Change-Id: I49d5b9827df4e711b38326e5fef3c54292000370
bad tracks now get skipped with a message at the end of scanning
rather than an error killing the count
Change-Id: I6d8c14ce00e78416b772bc5e9093a889351bc3de
Sansa Clip and Clip+ have a split monochrome screen
some versions have a dead line of pixels
having text split at this line makes it hard to read
move text picker below this split on these devices
Change-Id: I1ebcb4c4c7b1ea950f38e35fed06ed85437a657f
This reverts commit ebebef5566.
Reason for revert: I don't want to get too deep into this till I come back to the keyboard rewrite (hopefully)
Change-Id: Ia273f1a19a042be2dd0f1ee46690c03f2865cd95
Gate buflib_get_data() checking, debug printing, and buflib
integrity checks behind individual defines in buflib.h, and
turn them all off by default. If needed, they can be turned
on manually when compiling.
The buflib debug menu is only available if debug printing is
enabled, so after this commit it will no longer be included
in normal builds -- it isn't very useful to end users.
Change-Id: Iab25b7852bc7c5592ce04c9c45762046a87d5bc3
dc_thread_playlist was asking for invalid indices
since previously the name buffer would have been valid
it just got whatever junk data was left over
add dc_discard_playlist_pointers for HAVE_DIRCACHE targets
this allows the dc_playlist_thread to stop its current lookup loop
Change-Id: I6f25b97b8c4e314d27c5e1e6ff0925b5a3e93f26
dc_playlist_thread may continue loading pointers even while
underlying indices are changing instead stop the loop by marking
pointers as clean and rebuild later
Change-Id: If154f673b4af8d6e9c364499d58f1321834a76a4
This reverts commit 89c021fbfa.
Reason for revert: crash when playing on disk playlist then playing a directory as an in-ram playlist
Change-Id: Ia5cf5da9f46f8c10c5c0f3707e7978c05664b8a4
Context menu gains new option to view
metadata for individual tracks or albums.
Will display an album's length and total file size.
Other fields are displayed only if they are identical
across all tracks (except for the album year, which
is determined by the highest value encountered).
Change-Id: Ibc14cfaf2cb3d91b8d1cfbee05c6261db4975355