This reverts commit 9e93796407.
Fixes FS#13626, which is caused by non-audio ID3v1/APE tags at
the end of the audio data stream.
Change-Id: Ic69af14a5d1264b7896a54b5f2ad314022dd98ac
renames to playback_nnnn.log
you won't get the message when first enabling logging since it
happens at start-up..
Change-Id: I58ca65a48deff7c5bb1f93c3d86d9ee9e19f3f2e
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
rather than going through the whole file each time we can just walk
through the remainder speeds up duplicate removal by quite a bit
check timestamp of tracks to not remove multiple plays of the same song
at different times, unless back to back (then its probably a resume after
shutdown)
devices without RTC use current_tick but thats in centiseconds
convert to milliseconds so we can use the timestamp in the above calculations
my fix to the scrobbler_viewer makes the include menus disappear as
soon as you hide columns so explicitly mark if we are
dealing with a scrobbler log at load
Change-Id: I11bbebe9af45945a7e1326a5e419290086b05aaa
people don't like having to remember to run the TSR plugin so
lets meet them halfway
all tracks are added with timestamp, elapsed, length, trackname
added buffering for ATA devices
still needed:
-Done -- a plugin that parses for duplicates and reads the track info
to create the actual scrobbler log
(log can be truncated once dumped)
this should allow you to run the plugin at leisure
later I'd like to expand this logging to allow
track culling based on skipped songs..
remove the TSR plugin as hard disk no longer need to use it
Change-Id: Ib0b74b4c868fecb3e4941a8f4b9de7bd8728fe3e
add function get_temp_mp3entry() to return a valid mp3entry from scratch_mem
UNBUFFERED_ID3
or if playback hasn't been started used statically allocated mp3entry
NEXTTRACK_ID3
Change-Id: I3909fb585e0f5ad590f917ce827e991440f1fe75
Tested on MacOS Sequoia (Apple Silicon) with the
latest Xcode command line tools, gcc 14
(Homebrew GCC 14.2.0_1) and sdl2 (Homebrew 2.30.9)
Make sure 'gcc' (and 'gcc-ar') is in your PATH
ahead of the Xcode-provided "gcc"(clang). E.g.
by setting up symlinks in /usr/local/bin that
point to gcc-14 and gcc-ar-14.
Notes:
- The appropriate bmp from uisimulator/bitmaps
has to be manually copied to your build folder
and renamed to UI256.bmp, if you want the sim
background to be displayed
Change-Id: I559f33d2165065f913f30c016b85906af380fb81
with our large voice file being loaded in its entirety to the buffer
there isn't enough room to allocate the required pcm buffer
well prior to this patch we looked for 1k free to allow the talk buffer
to be given away
well the pcm buffer expects something like 5-600 kb on the clipzip
and there is 1k allocatable but not 300 more
so instead get the required pcm buffer size and check against that
Change-Id: I40a056e4170c37bc3429f0cb37af221ae7f812e5
Crossfade (see Playback Settings -> Crossfade) now works between songs in Single Mode (see Playback Settings -> Single Mode) unless it’s the last song to be played.
Change-Id: Icfe3d48459bb35bbc050f237a68b27e793ab9152
Not sure this is a great idea from disk and battery standpoint
but there is no reason you can't..
using the name buffer to fill title data
prevent hitting the disk for each screen scroll
add get_metadata_ex to allow flags
METADATA_EXCLUDE_ID3_PATH
prevent copying the filename to the ID3 struct
METADATA_CLOSE_FD_ON_EXIT
instead of seeking to the beginning the file is closed before
get_metadata returns
add logic to allow a invalid fd to signal that get_metadata
should open and close the file within its call
bugfix per Chris_s don't use the tagcache for the trackinfo
Change-Id: Ic7a595b39a8d7a57f975312bc9c8bb4111f22a88
pcmbuf might wait for next track for proper crossfade/gapeless playback (see pcmbuf_start_track_change). It's not going to happen with stopped buffering.
Fixup for 831faa3b (#5394)
Change-Id: I969878d13a9f976566eef5b975beb1687b519a37
Add resume adjustments flag in mp3entry struct which is required for proper AUDIO_START_RESTART resume handling
Fixup for 4fb37ecb (#5196)
Change-Id: Ie9ecfe2b637bba38e442066333d71eeff01030ad
Regression introduced in 3d5dd97c (#5426)
Without it current playlist keeps last bookmark info so next time track is played again from bookmark.
Change-Id: Ifeff43a4a2d380056ef8a389c3c72e7254db4080
Moved logic outside playback events to be executed early. Stops buffering when frequency change is detected (additional STATE_STOPPED state is introduced)
Removed no longer used AUDIO_START_REFRESH flag
Change-Id: Icfae61725a4d8ffb47380f561a011bda4841457b
Allows to use Prev button to skip length from the end of previous track.
Can be enabled with:
Settings -> Playback Settings -> Skip Length set to some time interval
and
Settings -> Playback Settings -> Rewind Across Tracks set to Yes
Change-Id: I99f234035a8a5acc9cbfe05ea83971ec5ddc59ea
Still having problems with determining the type of track change
lets try just watching the audio_next/prev functions
Change-Id: Ie4233ff4d4bf49792a6549d7bcd169ff4b1afd20
I recently added track skipping while REPEAT_ONE was set
currently by registering a track skip callback
I'm not entirely happy with the additional constant overhead
of the event callback
Instead I went looking for a way to distinguish
a pending track skip from some limited testing
it appears to work just as well to compare
playback's skip_pending == TRACK_SKIP_AUTO
but the lack of lifetime control worries me slightly
Change-Id: Ic71b4c3925e991f5a1216d16ecd3af6cc777ef1e
A frequency change didn't go into effect immediately
when a user picked "Auto" for the sample rate, while
playback was paused
Change-Id: I254853b664c5b6812264fdaf81dfb8fbfff43dbf
moves the callback to settings_list
audio_set_playback_frequency now accepts an actual frequency
44100 192000 etc rather than an index
Change-Id: Ieb3fc79a7fe3f1ff050465c8cd8061027e4572ff
Resuming a track with "Resume Playback" or a bookmark is supposed
to pass both the file offset and elapsed time to the codec. Since
commit dfff938dff the offset has been getting zeroed because the
buffer handle wasn't open at the time of the buf_filesize() call,
causing it to return a negative error code.
Having a valid offset improves resume accuracy with some codecs,
like VBR MP3.
Change-Id: I8af7f001644f1ee1bd27ca3049a4cff2d2274149
allow buflib_free to check for invalid or already freed handles
within the function -- remove all the invalid handle guards thru core_free
Change-Id: Ibdcbc82760fc93b674c42283fca420d94907df8e
These operations can only be used in limited circumstances and have
exactly one user. bufgettail especially seems of dubious value; how
often do you need to read N bytes from the end of a file without
changing the file position?
strip_tags() was the only function using them, to strip off ID3v1
and APE tags off the end of buffered tracks. This would save only
32-192 bytes per track -- if the container format uses APE/ID3v1.
It hardly seems worth the effort.
Change-Id: I8fc3c1408517eda6126e75e76d76daea904b50eb
When the 'Album Art' setting was set to
'Prefer Image File' and neither image file
nor embedded artwork were found,
playback would check for files twice.
Change-Id: Ibe392928d58ec04103e2572124841724509bd859
Large embedded album art can cause pauses during
playback or when skipping between tracks, especially
on older devices, but embedded art is currently loaded
even when separately stored smaller image files would be
available.
A workaround is to remove large album art from the
metadata of files.
This now adds a setting to either turn off loading of
album art completely, or to prefer loading the album art
from a separate image file and thus ignore the embedded
versions.
Change-Id: I22fb581abf56072e35e6c29d72e553747ec1a96a
In addition to the existing behavior of pausing
after each song, this adds options to pause
after playing current:
Album,
Album Artist,
Artist,
Composer,
Grouping / Work, or
Genre.
Allows you, for example, to only listen to the
remaining movements of a classical work
without having to purge your playlist of any
upcoming songs.
Change-Id: If18f4a5d139320026cc5fcc9adf29dd8e4e028a8
Reverts to the behavior pre-commit dfff938 with the additional change
that it will not skip the last entry.
Change-Id: Ia03da03b1bdccd8a9591548cd0ca9f58f4767947
Internally, buffering tries to load the entire album art file into the
audio buffer, which will fail if the file is larger than the buffer.
Playback.c interprets a file failing to buffer to mean that the buffer
is full, so it waits for more space and tries again. This results in a
deadlock since the file will never fit.
Change bufopen to return a new error condition when an image file will
not fit on the buffer because it is too large: ERR_BITMAP_TOO_LARGE.
Note that we arbitrarily set "too large" to be within 64KB of the
entire buffer size or larger, this could be adjusted if needed.
Change audio_load_albumart to pass through error messages from bufopen.
In playback.c, check to see why audio_load_albumart fails. If it fails
because the file is too large to buffer, simply ignore the file. If it
fails because the file would fit but the buffer is full, try again
later.
Change-Id: I66799ae26f124b495e1522fce7285332f4cf986f
* xduoo x3ii/x20: Better line out support
* less granular volume settings (too many steps before)
* Better handling of swiching sample rates
* Log actual sample rate in debug menu
Most credit goes to Roman Stolyarov
Additional integration [re]work by myself
Change-Id: I63af3740678cf2ed3170f61534e1029c81826bb6
* SAMPR_CAPS_ALL -> SAMPR_CAPS_ALL_48/96/192
* All targets claiming SAMPR_CAPS_ALL now get appropriate subset
* No need to explicitly define HAVE_PLAY_FREQ
* Rates that are a multiple of 44 or 48KHz can be used for playback
Inspired by a patch by Roman Stolyarov, but substantially rewritten by myself.
Change-Id: Iaca7363521b1cb9921e047ba1004d3cbe9c9c23e
Note: I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.
Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a