about summary refs log tree commit homepage
path: root/test
DateCommit message (Collapse)
2024-01-27test_player_integration: fix w/ ffmpeg > avconv
I forgot to run tests :x
2024-01-27drop MSG_EOR for AF_UNIX + SOCK_SEQPACKET
Using MSG_EOR with these local sockets is not necessary, and appears to trigger a truncation bug on OpenBSD 7.3. Link: https://marc.info/?i=20230826020759.M335788@dcvr
2023-10-12favor ffmpeg over deprecated avconv
When this project started avconv was favored in Debian, but that hasn't been the case in many years. Increase the priority of ffmpeg to match the current situation in Debian.
2022-01-24player: expire sox metadata cache on file st_ctime changes
We still need the TTL to deal with fuse.sshfs and maybe other weird FSes which don't return the st_ctime properly.
2022-01-23do not check IO#closed? before calling IO#close
IO#close is idempotent since Ruby 2.3, so reduce our instruction footprint to save some memory.
2022-01-21dtas: drop unnecessary "require 'yaml'" statements
We use DTAS.yaml_load to wrap all YAML.*load calls, but we still need "require 'yaml'" for various .to_yaml calls.
2022-01-21use YAML.unsafe_load in Psych 4.x (Ruby 3.1+)
Psych 4.x defaults to "nanny mode" to handle untrusted data. This causes breakage with since YAML references (aliases) emitted by dtas-player can't be handled by Psych clients under Ruby 3.1. Since dtas is single user and is a shell designed to run arbitrary code, favor the new YAML.unsafe_load API which behaves like the old YAML.load in Ruby <= 3.0.
2022-01-21require Ruby 2.3+
This allows us to jettison a bunch of compatibility code since we've started using Etc.nprocessors and String#- (uminus) in more places. The Ruby core team doesn't support <= 2.5, even.
2022-01-11player: reduce syscalls when splicing to single target
splice(2) alone does not give enough information as to whether the source or destination is blocking. However, as far as audio playback chain goes, the sink should ALWAYS be the limiting factor as decoder sources need to be able to produce data at least as fast as the audio is being played (otherwise there'll be audible drops). Thus, we bias the select(2) into waiting on a targets on if we splice(2) less than the data we requested.
2020-02-03doc: update copyrights for 2020
Using the 'update-copyright' script from gnulib[1]: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright [1] https://git.savannah.gnu.org/git/gnulib.git
2020-01-06buffer: replace sleepy_penguin with fiddle
Fiddle exists on all Ruby 1.9.2+ installations and seems alright. Since splice is a Linux-only API, we don't need to worry about the values of constants changing (and they're architecture-independent).
2020-01-06provide fiddle-based eventfd implementation
sleepy_penguin requires a compiler and development headers to install, so it could be a PITA to install for users on distro-provided Ruby. Allow fiddle since it's part of the Ruby standard library since 1.9.2 and users won't have to install anything else.
2020-01-06pipe: avoid loading sleepy_penguin
The values of F_{GET,SET}PIPE_SZ are architecture-independent and stable in Linux (unlike Ruby :P), so we won't need to bother loading an extra .so here for two constants.
2019-01-02dtas 0.16.0 v0.16.0
A bunch of minor fixes and cleanups accumulating for the past two years since the last release. It's tough to remember to make releases when I'm always running the latest version from git :x Most notably, "io_splice" is no longer used for dtas-linux users since "sleepy_penguin" includes all the functionality we use. This is to reduce memory overhead from extra DSOs(*) There's also some deprecation warning fixes for the still-undocumented "dtas-mlib" command. 12 changes since v0.15.0 (2017-04-07): pipeline: new module for running process pipelines console: ensure time calculations are done in UTC Rakefile: update path for uploads player: support guessing encodings for comments get rid of Windows-31J regexps mlib: compatibility with Sequel 5.x mlib: remove redundant tag massaging and encoding mlib: use flock to get around SQLite busy errors mlib: ignore files with nil times dtas/watchable: check SystemCallError mlib: fix unused variable warning use sleepy_penguin 3.5+ for splice and tee support (*) https://udrepper.livejournal.com/8790.html
2019-01-02use sleepy_penguin 3.5+ for splice and tee support
Eliminate loading of the io_splice RubyGem to reduce memory overhead. Extra DSOs are wasteful and io_splice is being phased oiut for sleepy_penguin, which encapsulates more Linux-specific functionality anyways. cf. https://udrepper.livejournal.com/8790.html
2018-01-29mlib: compatibility with Sequel 5.x
Apparently some degree of thread-safety is being enforced; not sure I agree, but oh well...
2018-01-29player: support guessing encodings for comments
This can be helpful for end users and is close to what other players use. We can fallback to Encoding.default_external by default (typically UTF-8) and then again using `charlock_holmes' if installed. Note: path names remain binary, because that's how proper filesystems operate.
2017-04-28pipeline: new module for running process pipelines
This should allow us easily to manipulate process pipelines as an array of arrays. Originally posted at http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/435624
2017-01-06rg_state: fix no-op gain detection
Seeing tiny (or zero) values for the "gain" effect is an eyesore in process table output, and a waste of CPU cycles in sox. So stop using the "gain" effect for imperceptible changes in volume. While we're at it, remove the pointless knobs for setting this, too. They were never documented and I doubt anybody would want to tweak them at runtime.
2017-01-02buffer/splice: remove MAX_SIZE constant
We do not need it at runtime, only for testing on Linux-like systems
2016-12-27http -> https, and relocate homepage to https://80x24.org/dtas/
HTTPS allows some level of security(*) and we've actually supported it on 80x24.org for many months, now. So, point new readers to it. Moving away from hostname-based homepages will allow us to save on subjectAltName space (and bandwith) when negotiating an HTTPS connection. We'll also have an .onion mirror for Tor users, soon, too; in case we can't afford to pay ICANN in the future. (assuming TLS libraries don't have any more Heartblead-level bugs in them, CAs aren't compromised, MITM HTTPS stripping proxies don't get in your way, and your certificate bundle isn't compromised).
2016-12-27test/test_rb_state: quiet deprecation warning
MT6 won't support assert_equal(nil, ...), apparently
2016-12-27source/sox: integrate mcache support to reduce soxi calls
This should improve performance with slow filesystems or systems with slow spawn performance.
2016-12-26introduce mcache class for caching audio metadata
We often waste cycles rerunning commands we don't need to run frequently. Introduce a short term cache for these.
2016-01-04player: replaygain: avoid unnecessary ignoring
It is possible for a file to only have one of the ReplayGain tags we need and not the previous-required REPLAYGAIN_TRACK_GAIN tag. So do not reject the entire series of tags if a file has the one we want.
2016-01-02copyright updates for 2016
Using the 'update-copyright' script from gnulib[1]: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright [1] git://git.savannah.gnu.org/gnulib.git
2015-12-31player: frozen_string_literal fixup for "tl tracks"
Oops :x
2015-12-25enable "frozen_string_literal: true"
While we're in the area, make a wording change from "GPLv3 or later" to "GPL-3.0+", as the latter is favored by SPDX.org
2015-12-14tracklist: swap functionality
This (from the point of the client) will atomically swap two tracks. This should allow easily implementing of a tracklist editor.
2015-12-13test_unixserver: remove test for element limit
Fixes: commit d628e9bd3c5ef42e44c8e14f8eaf9a85dd541a4c ("player: reduce I/O priority of connected clients") Oops :x
2015-12-13tracklist: fixup idempotent "tl shuffle false"
Disabling shuffle should be idempotent.
2015-12-07tracklist: support limiting maximum tracklist size
This defaults to 16384? This is what mpd uses by default as well. Of course folks interacting with dtas-player directly can override this: dtas-tl max INTEGER dtas-tl max This is NOT meant to be a hard security measure for local users talking to dtas-player directly. It is only to prevent accidentally stupid things like flooding the playlist with a broken script and to prevent remote users from DoS-ing us via the to-be-written mpd proxy/emulation layer. Remember: dtas-player itself will ALWAYS remain capable of executing arbitrary code :)
2015-12-07tracklist: shuffle support
This is in the MPRIS 2.0 TrackList spec and also in mpd (as "repeat" mode), so we can probably support it directly in player to ease implementations of future wrappers.
2015-12-05tracklist: use lower number unique track IDs
This is easier for users to read and type; and _might_ help with race conditions due to fast object recycling from GC. We'll also be implementing playist versioning on top of this in the next commits for MPD protocol compatibility. Unfortunately this adds an additional 40 bytes of per-track overhead (on 64-bit systems, its only 20 bytes on 32-bit). However, we may be able to save memory in the future by supporting dtas-mlib node IDs if we integrate dtas-player with DTAS::Mlib. While we're at it, include a minor speedup for DTAS::Tracklist#remove_track by using Array#delete_at instead of relying on Array#compact! after assignment This should improve "dtas-tl cat" output readability dramatically. The state file (~/.dtas/player_state.yml) remains compatible between dtas-player before and after this change.
2015-11-22introduce dtas-mlib for music library functions
Eventually this will support searching and be the basis of an mpd-compatible proxy in front of dtas-player
2015-10-04player: cleanup command dispatch
We can generate many command calls easily and dynamically, so avoid the code and cognitive overhead for the majority of commands.
2015-07-18parse_freq: trivial new module for parsing frequencies
Seems a bit stupid, but oh well.
2015-05-18splitfx: remove support for encoding opus
Lossy file encoding has too many tunable variables and it is not a good fit for an audio production tool such as dtas-splitfx. This was becoming a maintenance burden for me and is a sign of featuritis.
2015-05-17process: implement array expansion to preserve spaces
This can make it easier to specify mcompand parameters in socks, as those require separate levels of parameter parsing and require quoting in shell.
2015-05-07replaygain uses the "gain" effect instead of "vol"
The `gain' effect seems superior as it can "see" across the effects chain to take into account extra/lost headroom. For example, this allows me to add the the "gain -h" effect at the start of my effects chain before the RGFX placeholder in my source command, so when I play a file requiring a -6dB ReplayGain adjustment, I will only need an additional -4dB of headroom to accomodate the 10dB boost at 20Hz I use (for listening through headphones): Before: RGFX='vol -6dB' sox "$INFILE" $SOXFMT - $TRIMFX $RGFX vol -10dB equalizer 20 0.7071q 10 After: RGFX='gain -6' sox "$INFILE" $SOXFMT - $TRIMFX gain -h $RGFX equalizer 20 0.7071q 10
2015-02-04fadefx: effects chain generation
We need to generate a coherent command set for wrapping portions together, this sets us up for that.
2015-01-20rename the TrimFX class to TFX
TrimFX was too ambiguous with the common environment variable we use throughout dtas. Since TFX is more limited in scope but should be more frequently-typed by users (of -splitfx) we'll use the shorter name here.
2015-01-19update copyright years and links to mailing list archives
The documentation part is managed by the new Documentation/update-copyright script. For the future, the rest may be managed by the update-copyright tool in gnulib
2015-01-19Revert "fadefx: remove module"
This reverts commit 3471463325be6c990b3abd18b4d34f723440d19a. While not strictly necessary, it makes the user syntax in splitfx files much terser. Changes from the original version should make it easier-to-read and the diagram should help a lot with understanding.
2015-01-19consolidate spawn fix for Ruby [Bug #8770]
Ensure we can apply the workaround to dtas-sourceedit and our test cases while also simplifying the existing call sites a little. This will also make for less code churn in 3-5 years down the line when we drop <= 2.1 support.
2015-01-19sinkedit: flesh out all parameters
dtas-sinkedit now shows default parameters in addition to user-changed parameters, allowing easier editing. Also, we need to be able to revert back to using the default pipe_size on Linux by setting pipe_size to nil (as an empty field in YAML).
2014-12-29trimfx: require audio format at initialization
This makes things easier for scheduling/expansion since we won't have to deal with floating point numbers when we work directly with with sample counts (like the rest of dtas).
2014-12-28splitfx: use $FX env consistently in targets, too
While we're at it, document the splitfx manpage and make the example suitable for tests.
2014-12-27player: support playing splitfx YAML files
This allows splitfx users to test CUE breakpoints and run file-specific effects without interrupting their normal flow.
2014-12-27test: favor Process.spawn when possible
Process.spawn allows vfork() + execve() usage in Ruby 2.2.0 to improve performance over normal fork() + execve().