[ANN] dtas 0.3.0 - small improvements and tweaks

2013-09-02 Thread Eric Wong
un) - "env" (no args) returns the environment note: I'm still considering revamping the protocol completely Eric Wong (23): dtas-console: support terminal resize README: add explicit copyright for this file remove "encoding: binary" header use rg: a

[PATCH 0/8] latest changes in dtas.git (dtas-splitfx)

2013-09-07 Thread Eric Wong
8ebf63afe8c9af13868376e7618c840517618076: add dtas-splitfx - .cuesheets + make(1) (2013-09-07 12:21:07 +) Eric Wong (8): source/sox: correctly extend xs for try_to_fail_harder test/*.rb: test/unit compatibility test

[PATCH 4/8] test/*: compatibility class for both minitest 4 and 5

2013-09-07 Thread Eric Wong
--git a/test/test_player_integration.rb b/test/test_player_integration.rb index e7f7306..f71ed56 100644 --- a/test/test_player_integration.rb +++ b/test/test_player_integration.rb @@ -1,7 +1,7 @@ # Copyright (C) 2013, Eric Wong and all contributors # License: GPLv3 or later (https://www.gnu.org

[PATCH 8/8] add dtas-splitfx - .cuesheets + make(1)

2013-09-07 Thread Eric Wong
+# Copyright (C) 2013, Eric Wong and all contributors +# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) +require 'yaml' +require 'optparse' +require 'dtas/splitfx' +usage = "#$0 [-n|--dry-run][-j [JOBS]] SPLITFX_FILE.yml [TARGET]" +ov

[PATCH 1/8] source/sox: correctly extend xs for try_to_fail_harder

2013-09-07 Thread Eric Wong
Singleton methods tend to be bad like this. TODO: write tests for this. --- lib/dtas/source/sox.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dtas/source/sox.rb b/lib/dtas/source/sox.rb index 0001689..e26f54b 100644 --- a/lib/dtas/source/sox.rb +++ b/lib/dtas/source/sox.rb @@ -11,6 +1

[PATCH 5/8] test/helper: delay at_exit registration for tmpfifo

2013-09-07 Thread Eric Wong
at_exit ordering is funky because minitest/autorun also runs at_exit, so we need to delay registering the at_exit until we call tmpfifo. --- test/helper.rb | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/helper.rb b/test/helper.rb index a36332b..81bc22f 100644 --- a/

[PATCH 2/8] test/*.rb: test/unit compatibility

2013-09-07 Thread Eric Wong
assert() in test/unit does not automatically stringify the failure message, unlike minitest. I don't have a strong opinion regarding minitest and test/unit, but the deprecation notices in minitest 5 are annoying, so perhaps using Test::Unit via minitest shim is a better way to go. --- test/player

[PATCH 6/8] dtas-console: show paused track when paused

2013-09-07 Thread Eric Wong
Lightly tested, but this seems to work. --- bin/dtas-console | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/dtas-console b/bin/dtas-console index 6d5672b..eb246ee 100755 --- a/bin/dtas-console +++ b/bin/dtas-console @@ -39,6 +39,8 @@ tfmt = update_tfmt(prec_step[

[PATCH 7/8] test/helper: fix var shadowing

2013-09-07 Thread Eric Wong
Oops. --- test/helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helper.rb b/test/helper.rb index 81bc22f..7675a7c 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -58,7 +58,7 @@ def tmpfifo if FIFOS.empty? at_exit do - FIFOS.each { |(pid,path)| F

[PATCH 3/8] test/player_integration: thread-safety fix

2013-09-07 Thread Eric Wong
Process.waitall prevents test cases from using multiple threads (we're already using multiple processes). We may use parallelize_me! from minitest in the future. --- test/player_integration.rb | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/player_integration.rb b/t

[PATCH 0/4] more changes in dtas.git \o/

2013-09-07 Thread Eric Wong
: splitfx: flesh out functionality + integration test (2013-09-07 22:39:27 +) Eric Wong (4): splitfx: round instead of truncate for CDDA GNUmakefile: enable warnings by default for tests implement environment

[PATCH 1/4] splitfx: round instead of truncate for CDDA

2013-09-07 Thread Eric Wong
Rounding should be more accurate, even though my original awk snippet truncated the output. --- lib/dtas/splitfx.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dtas/splitfx.rb b/lib/dtas/splitfx.rb index 83ac190..7a5d705 100644 --- a/lib/dtas/splitfx.rb +++ b/lib/dtas/s

[PATCH 3/4] implement environment variable expansion

2013-09-07 Thread Eric Wong
no_raise: true) return if err =~ /soxi FAIL formats:/ self.class.try_to_fail_harder(infile, s, cmd) or return source_file_dup(infile, offset) diff --git a/test/test_env.rb b/test/test_env.rb new file mode 100644 index 000..92fc53c --- /dev/null +++ b/test/test_env.rb @@ -0,0 +1,55

[PATCH 4/4] splitfx: flesh out functionality + integration test

2013-09-07 Thread Eric Wong
ff --git a/examples/splitfx.sample.yml b/examples/splitfx.sample.yml index c4655ff..297e50b 100644 --- a/examples/splitfx.sample.yml +++ b/examples/splitfx.sample.yml @@ -1,10 +1,12 @@ # To the extent possible under law, Eric Wong has waived all copyright and # related or neighboring rights

[PATCH 2/4] GNUmakefile: enable warnings by default for tests

2013-09-07 Thread Eric Wong
This is a new code base and we should avoid introducing warnings. --- GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index a1b49b2..a23e29e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -13,7 +13,7 @@ test_units := $(wildcard test/test_*.r

[PATCH 2/2] player: implement basic tracklist functionality

2013-09-08 Thread Eric Wong
+# Copyright (C) 2013, Eric Wong and all contributors +# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) +require 'dtas/unix_client' +require 'yaml' +require 'shellwords' + +c = DTAS::UNIXClient.new +case cmd = ARGV[0] +when "cat" + track_id

[PATCH 1/2] tracklist: preliminary tracklist class

2013-09-08 Thread Eric Wong
/tracklist.rb create mode 100644 test/test_tracklist.rb diff --git a/lib/dtas/tracklist.rb b/lib/dtas/tracklist.rb new file mode 100644 index 000..2c4ad03 --- /dev/null +++ b/lib/dtas/tracklist.rb @@ -0,0 +1,108 @@ +# Copyright (C) 2013, Eric Wong and all contributors +# License: GPLv3 or later

[PATCH 3/3] tracklist: fix go_to functionality

2013-09-08 Thread Eric Wong
We need to preserve the go_to-specified position for next_track, doing otherwise would cause us to always be off-by-one. --- lib/dtas/tracklist.rb | 7 +-- test/test_tracklist.rb | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/dtas/tracklist.rb b/lib/dtas/tracklist.r

[PATCH 2/3] dtas-tl: add add-tail command

2013-09-08 Thread Eric Wong
This adds a bunch of tracks sequentially to the end of the tracklist --- bin/dtas-tl | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bin/dtas-tl b/bin/dtas-tl index cbe1b83..31a6825 100755 --- a/bin/dtas-tl +++ b/bin/dtas-tl @@ -16,9 +16,21 @@ when "cat" when "a

[PATCH 1/3] player/client_handler: "tl add" returns track_id of added track

2013-09-08 Thread Eric Wong
This allows easier scripting if we want to add a bunch of tracks --- lib/dtas/player/client_handler.rb | 4 ++-- lib/dtas/tracklist.rb | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb index 2966

[PATCH] player: do not repeat first track on start if using playlist

2013-09-08 Thread Eric Wong
We already flush the currently playing track into the head of the queue upon player exit (even if it was in the @tl), so we should use @tl.next_track as usual instead of @tl.cur_track in case the queue is empty. --- lib/dtas/player.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[PATCH 2/3] dtas-tl: expand paths before using them

2013-09-09 Thread Eric Wong
It's easier to handle the client and player to be in different directories (and we also do this for dtas-enq(1)) --- bin/dtas-tl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/dtas-tl b/bin/dtas-tl index 31a6825..1cd2acc 100755 --- a/bin/dtas-tl +++ b/bin/dtas-tl @@ -16,6 +16,7 @@ when

[PATCH 3/3] player/client_handler: prevent seek from excessive requeue

2013-09-09 Thread Eric Wong
Otherwise we end up constantly pushing tracks to the top of the queue and getting surprising behavior if seek is called repeatedly. --- lib/dtas/player/client_handler.rb | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/playe

[PATCH 7/7] tracklist: implement single-track repeat

2013-09-09 Thread Eric Wong
Because sometimes a song is just stuck in our head. Or MPRIS 2.0 wants us to implement it this way... --- lib/dtas/player/client_handler.rb | 1 + lib/dtas/tracklist.rb | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/dtas/player/client_handler.rb b/lib/dt

[PATCH 5/7] player: "tl goto" takes optional offset arg in HHMMSS.SUBSEC

2013-09-09 Thread Eric Wong
This should make implementing SetPosition in the MPRIS 2.0 spec possible. --- lib/dtas/player.rb| 4 ++-- lib/dtas/player/client_handler.rb | 3 ++- lib/dtas/tracklist.rb | 12 +++- test/test_tracklist.rb| 8 4 files changed, 15 insertion

[PATCH 1/7] dtas-console: avoid using current if it is nil

2013-09-09 Thread Eric Wong
We may get a pause event when we do not have a valid current hash. --- bin/dtas-console | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/dtas-console b/bin/dtas-console index eb246ee..0cb14fa 100755 --- a/bin/dtas-console +++ b/bin/dtas-console @@ -157,7 +157,9 @@ begin

[PATCH 4/7] player: implement previous/next commands

2013-09-09 Thread Eric Wong
This means we can go back and forth in the tracklist like a normal music player. This will allow an easier MPRIS 2.0 implementation. --- lib/dtas/player/client_handler.rb | 7 +++ lib/dtas/tracklist.rb | 6 ++ 2 files changed, 13 insertions(+) diff --git a/lib/dtas/player/cli

[PATCH 3/7] tracklist: next_track -> advance_track

2013-09-09 Thread Eric Wong
This is a more accurate depiction of what happens, and we'll implement "next" and "previous" commands in the future. --- lib/dtas/player.rb | 4 ++-- lib/dtas/splitfx.rb| 4 ++-- lib/dtas/tracklist.rb | 2 +- test/test_tracklist.rb | 12 ++-- 4 files changed, 11 insertions(+),

[PATCH 2/7] player: reset tracklist when idle stat is detected

2013-09-09 Thread Eric Wong
We should return to the starting position of the tracklist if we are idle. --- lib/dtas/player.rb| 9 +++-- lib/dtas/tracklist.rb | 5 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/dtas/player.rb b/lib/dtas/player.rb index a8c7fe0..8926e0b 100644 --- a/lib/dtas/

[PATCH 6/7] tracklist: previous! only wraps around when repeat is enabled

2013-09-09 Thread Eric Wong
Non-repeating tracklists should stop playing when there's nothing to go back to. --- lib/dtas/tracklist.rb | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/dtas/tracklist.rb b/lib/dtas/tracklist.rb index 094c22d..644c57f 100644 --- a/lib/dtas/tracklist.rb +++ b/lib/dtas

[PATCH 2/6] doc: add manpage for dtas-splitfx

2013-09-22 Thread Eric Wong
--raw-bits $BITS_PER_SAMPLE + $OPUSENC_BITRATE --raw-rate $RATE --raw-chan $CHANNELS + --raw-endianness $ENDIAN_OPUSENC + $OPUSENC_COMMENTS - $TRACKNUMBER.opus +format: + bits: 16 + rate: 48000 + type: s16 + channels: 2 + +# COPYRIGHT + +Copyright 2013, Eric Wong and all contributors.\ +License: GPLv3 or later <http://www.gnu.org/licenses/gpl-3.0.txt> + +# SEE ALSO + +sox(1), ecasound(1), flac(1), opusenc(1) -- 1.8.4

[PATCH 1/6] splitfx: rename "opus" target to "opusenc"

2013-09-22 Thread Eric Wong
sox(1) may gain the ability to natively encode to Opus one day without using opusenc(1), so make it more explicit we are relying on opusenc(1). --- lib/dtas/splitfx.rb | 2 +- test/test_splitfx.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dtas/splitfx.rb b/lib/dta

[PATCH 5/6] dtas 0.4.0 - dtas-splitfx, tracklist in -player

2013-09-22 Thread Eric Wong
vel client soon, so it is not recommended as a a stable interface. There are also some minor bugfixes in dtas-player. Eric Wong (51): source/sox: correctly extend xs for try_to_fail_harder test/*.rb: test/unit compatibility test/player_integration: thread-safety fix

[PATCH 3/6] splitfx: nodoc the Skip class

2013-09-22 Thread Eric Wong
This is an internal class, and we don't have a public Ruby API anyways. --- lib/dtas/splitfx.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dtas/splitfx.rb b/lib/dtas/splitfx.rb index fd7093a..08ab13f 100644 --- a/lib/dtas/splitfx.rb +++ b/lib/dtas/splitfx.rb @@ -13,7 +

[PATCH 6/6] Rakefile: add examples to website, too

2013-09-22 Thread Eric Wong
This makes it easier to reference in mailing list posts and docs. --- Rakefile | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 918153b..225e7c0 100644 --- a/Rakefile +++ b/Rakefile @@ -73,7 +73,7 @@ task :rsync_docs do # git-set-file-times is di

[PATCH 4/6] README: update for dtas-splitfx and tracklist in -player

2013-09-22 Thread Eric Wong
Readying up for a new release. --- README | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README b/README index c1e14e1..c607abc 100644 --- a/README +++ b/README @@ -11,6 +11,7 @@ Primary executables available are: * dtas-player - gapless music player (or pipeline/process

[PATCH] dtas-*edit: account for editors which rename over files

2013-09-22 Thread Eric Wong
We must not assume the temporary file remains in place while $EDITOR/$VISUAL is running, as it is common for editors to rename over a file to atomically replace existing files. --- bin/dtas-sinkedit | 3 +-- bin/dtas-sourceedit | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff -

[PATCH] player: support bypass for rate, bits, channel

2013-09-28 Thread Eric Wong
This may be used to avoid automatic: * resampling (rate) * down/upmixing (channel) * dither/truncation (bits) Using any bypass mode means we can no longer guarantee gapless playback for audio collections where rate, channel, or bits vary. This can however be useful when CPU usage is too high. Th

[PATCH] rework packaging to use GNU make + gemspec instead of Hoe

2013-09-28 Thread Eric Wong
mode 100644 dtas.gemspec diff --git a/.gitignore b/.gitignore index 6552961..7d0fab2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Copyright (C) 2013, Eric Wong and all contributors # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) +/GIT-VERSION-FILE /Manifest.txt

[PATCH] player: "tl goto" starts playback if idle (and not paused)

2013-09-29 Thread Eric Wong
Using "tl goto" implies we start playback of the player is idle. --- lib/dtas/player/client_handler.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb index a44c1b7..91dfada 100644 --- a/lib/dtas/player/client_handler.rb

[PATCH] player: support seeking based on embedded cuesheet (FLAC)

2013-09-29 Thread Eric Wong
the currently-playing track/command in YAML. The structure of this is unstable and subject to change. diff --git a/lib/dtas/cue_index.rb b/lib/dtas/cue_index.rb new file mode 100644 index 000..09c3709 --- /dev/null +++ b/lib/dtas/cue_index.rb @@ -0,0 +1,39 @@ +# Copyright (C) 2013, Eric Wo

[PATCH] player (protocol): rename "tl previous" to "tl prev"

2013-09-29 Thread Eric Wong
This gives us consistency with the "cue prev" command, is easier-to-type, and is consistent in length with "tl next". We'll just map "previous" -> "tl prev" when we implement the MPRIS bridge. --- Documentation/dtas-tl.txt | 4 ++-- lib/dtas/player/client_handler.rb | 2 +- 2 files change

[PATCH 1/4] dtas.gemspec: mark executables correctly

2013-09-30 Thread Eric Wong
+1,15 @@ # Copyright (C) 2013, Eric Wong and all contributors # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) Gem::Specification.new do |s| + manifest = File.read('.gem-manifest').split(/\n/) s.name = %q{dtas} s.version = ENV["VERSION"] s.auth

[PATCH 2/4] dtas-console: allow exit via 'q' key

2013-09-30 Thread Eric Wong
It is easier to break out of dtas-console with one key than using a 2-finger combination. --- Documentation/dtas-console.txt | 2 +- bin/dtas-console | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/dtas-console.txt b/Documentation/dtas-console.txt i

[PATCH 3/4] player/client_handler: remove unused variables

2013-09-30 Thread Eric Wong
Oops. --- lib/dtas/player/client_handler.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb index de52307..5c6653c 100644 --- a/lib/dtas/player/client_handler.rb +++ b/lib/dtas/player/client_handler.rb @@

[PATCH 4/4] dtas 0.5.0

2013-09-30 Thread Eric Wong
* dtas-*edit - account for editors which rename over files * dtas-player - support optional bypass mode for rate, bits, channel This allows users to avoid any internal resampling at the cost of losing gapless playback when files have different decoded formats - "tl goto" starts p

[PATCH 1/2] player: add factor out redundant condition check

2013-10-06 Thread Eric Wong
The addition of a "need_to_queue" method should reduce the amount of cognitive overhead required to parse these conditions --- lib/dtas/player.rb| 8 ++-- lib/dtas/player/client_handler.rb | 6 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/dtas/playe

[PATCH 2/2] buffer/read_write: fix undefined local variable

2013-10-06 Thread Eric Wong
We must define the variable for tracking buffer length. This only affected non-Linux kernel users. --- lib/dtas/buffer/read_write.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dtas/buffer/read_write.rb b/lib/dtas/buffer/read_write.rb index 1f1e4a7..0044400 100644 ---

[PATCH 3/3] pipe: use memoized IO#nonblock? in blocking case

2013-10-06 Thread Eric Wong
We never change the I/O directly, so avoid the expensive syscall and only use a slightly-expensive Ruby method call instead (the Ruby method call is fixed cost in either case). --- lib/dtas/pipe.rb | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/dtas/pipe.rb b/lib/dtas/pipe.rb index 4

[PATCH 2/3] buffer: remove ioctl syscall in common paths

2013-10-06 Thread Eric Wong
We do not need this for single sink situations (the common case) at all. We also do not need to check IO#nread for splice, either; we can just do non-blocking I/O. The only common path where we might still need it is the non-splice case with multiple sinks. --- lib/dtas/buffer.rb| 7

[PATCH 1/3] player: delay tracklist reset until asked to play

2013-10-06 Thread Eric Wong
This prevents us from resetting the tracklist when we add new tracks and want to restart playback. --- lib/dtas/player.rb| 1 - lib/dtas/player/client_handler.rb | 7 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/dtas/player.rb b/lib/dtas/player.rb inde

[PATCH] player: "tl add" may trigger player start

2013-10-07 Thread Eric Wong
The player should start playing the new track if the current tracklist is exhausted and not paused. --- lib/dtas/player/client_handler.rb | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb index ea0fc2

[PATCH 1/2] tracklist: remove_track updates tracklist position

2013-10-08 Thread Eric Wong
We should not have the position point too far past the end of the list. This allows playback to start when we do "tl add" on an idle player after removing something from the tracklist. --- lib/dtas/tracklist.rb | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/d

[PATCH 2/2] player: "tl remove" drops the track from the queue

2013-10-08 Thread Eric Wong
A paused/seeked track in the tracklist may end up in the queue. --- lib/dtas/player/client_handler.rb | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb index f313a2a..b9beee4 100644 --- a/lib/dtas/playe

[PATCH] dtas-partstats: initial implementation

2013-10-09 Thread Eric Wong
tats b/bin/dtas-partstats new file mode 100755 index 000..e29ec73 --- /dev/null +++ b/bin/dtas-partstats @@ -0,0 +1,39 @@ +#!/usr/bin/env ruby +# Copyright (C) 2013, Eric Wong and all contributors +# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) +# TODO +# - option pa

[PATCH] tracklist: update position when track is added

2013-10-10 Thread Eric Wong
We don't want to repeat tracks if a track was added to a spot before the current position on the tracklist. --- lib/dtas/tracklist.rb | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/dtas/tracklist.rb b/lib/dtas/tracklist.rb index 325db20..b6f02c3 100644 --- a/

[PATCH] format: common detection code (based on sox)

2013-10-10 Thread Eric Wong
This reduces duplication for sox-based components, which our audio editing components will rely on. We only use avconv/ffmpeg for odd formats which sox does not play natively, and editing audio in strange/lossy formats is undesirable anyways. --- lib/dtas/format.rb | 26 ++

[PATCH 3/3] dtas-tl: "reto" command does not scan track IDs

2013-10-10 Thread Eric Wong
Using a regexp to match trackIDs is probably not intended by the user. --- bin/dtas-tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/dtas-tl b/bin/dtas-tl index 7793f23..4597179 100755 --- a/bin/dtas-tl +++ b/bin/dtas-tl @@ -56,7 +56,7 @@ when "reto" re = ignorecase ?

[PATCH 1/3] tracklist: fix off-by-one when adding track

2013-10-10 Thread Eric Wong
Otherwise we end up going past the end of the list. --- lib/dtas/tracklist.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dtas/tracklist.rb b/lib/dtas/tracklist.rb index b6f02c3..ef60915 100644 --- a/lib/dtas/tracklist.rb +++ b/lib/dtas/tracklist.rb @@ -94,7 +94,7 @@ cl

[PATCH 2/3] player: "tl remove" properly stops current track

2013-10-10 Thread Eric Wong
This simplifies the check for the current track and won't attempt to compare track IDs not on the tracklist. --- lib/dtas/player/client_handler.rb | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_hand

[PATCH] IO#nread compatibility for Rubinius (Linux-only)

2013-10-12 Thread Eric Wong
--- a/lib/dtas/buffer.rb +++ b/lib/dtas/buffer.rb @@ -1,6 +1,8 @@ # Copyright (C) 2013, Eric Wong and all contributors # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) +require 'io/wait' require_relative '../dtas' +require_relative 'compat_rbx

[PATCH] use shorter socket constants for sockets

2013-10-12 Thread Eric Wong
This is to be compatible with Rubinius, but also works with MRI. --- (Will file a proper bug report for rbx once I can stomach a browser again) lib/dtas/unix_client.rb | 2 +- lib/dtas/unix_server.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dtas/unix_clien

Re: dtas-player warning

2013-10-16 Thread Eric Wong
Rene Maurer wrote: > Hello > > First of all: dtas is great! Thanks! > When playing flac file over USB, dtas-player displays the following > warning: > > play WARN alsa: can't encode 32-bit Signed Integer PCM Yes, I get this too. This is because dtas (and sox) operates at 32-bit internally an

Re: fade out current playing song

2013-10-16 Thread Eric Wong
Rene Maurer wrote: > Is it possible to send a command to the dtas-player in the way that > the current song is faded out and the next song in the queue (if any) > is played ("fade-out-now-and-skip")? Not yet (or easily). I haven't thought about it, I understand it's a somewhat popular feature in

Re: fade out current playing song

2013-10-16 Thread Eric Wong
Rene Maurer wrote: > Eric Wong wrote: > > Rene Maurer wrote: > > >> Is it possible to send a command to the dtas-player in the way that > >> the current song is faded out and the next song in the queue (if > >> any) is played ("fade-out-now-and-skip

future of dtas-xdelay ...

2013-10-16 Thread Eric Wong
I've been considering adding a control socket to dtas-xdelay. This would allow fine-tuning aspects of the crossover without restarting the audio device. Maybe it would make sense as a generic cross-file effects sink, even... If it were wired up as _both_ a client and sink of dtas-player, it coul

[PATCH 1/2] trimfx: flesh out parsing of commands

2013-10-19 Thread Eric Wong
tions(+), 26 deletions(-) create mode 100644 lib/dtas/parse_time.rb diff --git a/lib/dtas/parse_time.rb b/lib/dtas/parse_time.rb new file mode 100644 index 000..c2ca777 --- /dev/null +++ b/lib/dtas/parse_time.rb @@ -0,0 +1,29 @@ +# Copyright (C) 2013, Eric Wong and all contributors +# License: GPL

[PATCH 2/2] fadefx: initial commit

2013-10-19 Thread Eric Wong
diff --git a/lib/dtas/fadefx.rb b/lib/dtas/fadefx.rb new file mode 100644 index 000..7e0e65f --- /dev/null +++ b/lib/dtas/fadefx.rb @@ -0,0 +1,32 @@ +# Copyright (C) 2013, Eric Wong and all contributors +# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) +require_relative

[ANN] dtas 0.6.0 - player tracklist fixes/improvements

2013-10-19 Thread Eric Wong
wrapper to the sox stats effect See commit 4f1a73ed584f0f74d6b32241f02ae871f3415f4a for details. This works, but could use some documentation... There's also some stuff which is completely not wired up outside of internal unit tests, but will hopefully be ready in 0.7.0 Eric Wong (21):

Re: Display the queue

2013-10-22 Thread Eric Wong
Rene Maurer wrote: > Is it possible to list all tracks in the queue (similar to "dtas-tl > cat" for the tracklist)? I've been thinking of that, too. For now: dtas-ctl state dump cat ~/.dtas/player_state.yml

MPRIS2 client recommendations?

2013-10-27 Thread Eric Wong
Hi, can anybody recommend a command-line/console MPRIS 2 client? I haven't looked very hard, but I don't remember finding any. It must be Free Software and be usable w/o a GUI for me to use/test. Thanks!

upgrade to Ruby 2.0.0-p353 or 1.9.3-p484 (CVE-2013-4164)

2013-11-22 Thread Eric Wong
See: https://www.ruby-lang.org/en/news/2013/11/22/heap-overflow-in-floating-point-parsing-cve-2013-4164/ Users of ReplayGain functionality in dtas-player(1) are affected if they did not generate the REPLAYGAIN_* metadata tags themselves. REPLAYGAIN_* metadata tags generated by malicious music sour

[PATCH] splitfx: support --no-dither/-D option

2013-11-30 Thread Eric Wong
splitfx is incapable of knowing in 100% of cases whether dithering should be used (as it has no visibility into sox internals), so support disabling it completely via command-line. This is like the identical sox option, and passed to sox(1), too. This feature is useful for splitting already-master

player updates in dtas.git

2013-12-27 Thread Eric Wong
increases latency) or needing to use real-time/high-priority scheduling (which requires extra permissions). Also, Ruby 2.1.0 is out and I'm using it with dtas. I'll probably push out 0.0.7 this weekend. Eric Wong (9): INSTALL: update for 0.6.0 release splitfx: support --no-dither

[ANN] dtas 0.7.0 - minor feature and teeny optimizations

2013-12-29 Thread Eric Wong
* http://dtas.80x24.org/NEWS * git clone git://80x24.org/dtas * dtas-all@nongnu.org * http://dtas.80x24.org/2013/dtas-0.7.0.tar.gz SHA-1 54b46176f230459e6ec72014d025da04e2c2fafa * http://dtas.80x24.org/2013/dtas-0.7.0.gem SHA-1 4d9ffa08796e8db60502dc92665cfaa36d948c1c -- Eric Wong

infinite loop bug in Ruby affecting dtas commands

2014-02-20 Thread Eric Wong
I saw the dtas-tl command infinite looping today, just fixed in ruby-trunk http://svn.ruby-lang.org/repos/ruby/trunk - r45066 https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/45066 I've filed a backport ticket for Ruby 2.1 https://bugs.ruby-lang.org/issues/9545

[PATCH] dtas-console: add note to install "curses" gem if missing

2014-02-23 Thread Eric Wong
se install the 'curses' RubyGem to use #$0" +end se = DTAS::Sigevent.new trap(:WINCH) { se.signal } -- Eric Wong

new dtas release coming soon

2014-09-21 Thread Eric Wong
Mostly minor bugfixes to dtas-player. I'll see if I get better editing support in releasable shape, too. In related news, Ruby 2.2.0-preview1 is out with some memory reductions, and automatic vfork support on Linux, which makes it cheaper for us to run sox(1) processes and such. [1] http://blade

dtas encoding fixes pushed out to git

2014-10-01 Thread Eric Wong
+) Eric Wong (3): client_handler: minor cleanup (favor &:proc) doc: document "tl get"/"dtas-tl cat" escaping gotcha dtas-console: force encoding for current locale Documentation/dtas-player_protocol.txt | 2

Re: dtas-console doesn't work on my system

2014-10-02 Thread Eric Wong
Rene Maurer wrote: > Since now I have never used 'dtas-console'. I have tried it the first > time and it doesn't work: > > | dtas-conole > > | /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in > | `require': cannot load such file -- curses (LoadError) I think you built/installed Rub

[PATCH] unix_server: fix for infinite loop

2014-10-18 Thread Eric Wong
Occasionally, killing a sink from an external process could result in an infinite loop due to the lack of close notification from __dst_error (in DTAS::Buffer) up to the top-level event loop. Since it is not easy to notify the top-level event loop, we'll detect closed IOs after-the-fact and retry

[ANN] dtas 0.8.0 - duct tape audio suite for *nix

2014-10-20 Thread Eric Wong
Free Software command-line tools for audio playback, mastering, and whatever else related to audio. dtas follows the worse-is-better philosophy and acts as duct tape to combine existing command-line tools for flexibility and ease-of-development. dtas is currently implemented in Ruby (and some emb

[PATCH] process: update comment for bug workaround

2014-12-07 Thread Eric Wong
We're certain this is a workaround for a bug. We may remove the workaround at some point in the future; but not until the rest of the world has had a chance to upgrade, too. --- lib/dtas/process.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dtas/process.rb b/lib/dta

[PATCH 2/1] process: update comment for bug workaround #2

2014-12-07 Thread Eric Wong
Followup to commit 698e1f04580839ea29647f285b39b88fcbb46071 "process: update comment for bug workaround" --- lib/dtas/process.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dtas/process.rb b/lib/dtas/process.rb index 020737d..c0ce9a3 100644 --- a/lib/dtas/process.rb +

[PATCH] compat_onenine: simplify pipe wrapper

2014-12-07 Thread Eric Wong
Array#each already returns the array, so there's no need to use the more confusing Array#map! block --- lib/dtas/compat_onenine.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dtas/compat_onenine.rb b/lib/dtas/compat_onenine.rb index 568491b..e789114 100644 --- a/lib/dta

[PATCH] dtas-console: '>' and '<' keys for tracklist next/prev

2014-12-20 Thread Eric Wong
These key bindings are used in mplayer, too. --- bin/dtas-console | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/dtas-console b/bin/dtas-console index c28d92d..98d3f43 100755 --- a/bin/dtas-console +++ b/bin/dtas-console @@ -200,6 +200,8 @@ begin when "0" then c.req_ok("rg prea

[PATCH] dtas-tl: halve write() syscalls when emitting tracklists

2014-12-21 Thread Eric Wong
Notably, this speeds up "dtas-tl cat" output a little bit. Hrm, Ruby really should be using writev here, we'll need to investigate at a later date. --- bin/dtas-tl | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/dtas-tl b/bin/dtas-tl index 6963108..efffa83 100755 -

[PATCH] reduce syscalls in recvmsg invocations

2014-12-21 Thread Eric Wong
Favor IO.select over IO#wait since the latter makes another ioctl syscall (which we'll make anyways for IO#nread). Having BasicSocket#recvmsg and recvmsg_nonblock detect the buffer size requires extra syscalls, so pass explict maxmesglen, flags, and maxcontrollen args to elide auto-detection since

[PATCH] doc: flesh out "tl" subcommand docs

2014-12-22 Thread Eric Wong
The following subcommands are now documented: * current * current-id * next * prev --- Documentation/dtas-player_protocol.txt | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/dtas-player_protocol.txt b/Documentation/dtas-player_protocol.txt index 8cde50d..b8f8264 100644 -

[ANN] dtas 0.9.0 - duct tape audio suite for *nix

2014-12-22 Thread Eric Wong
Free Software command-line tools for audio playback, mastering, and whatever else related to audio. dtas follows the worse-is-better philosophy and acts as duct tape to combine existing command-line tools for flexibility and ease-of-development. dtas is currently implemented in Ruby (and some emb

Fwd: Bug#773720: sox: CVE-2014-8145

2014-12-22 Thread Eric Wong
Since dtas depends on sox: https://bugs.debian.org/773720 - Forwarded message from Salvatore Bonaccorso - From: Salvatore Bonaccorso To: Debian Bug Tracking System Subject: Bug#773720: sox: CVE-2014-8145 Source: sox Version: 14.3.1-1 Severity: grave Tags: security upstream Hi, the f

[PATCH] restart "source ed" after env changes

2014-12-24 Thread Eric Wong
Merely converting the `before' source information to a hash is not enough, as the `env' sub-hash is mosified in-place and shared with the `after' hash. So use `inspect' to serialize and snapshot the env and rely on a string comparison. --- lib/dtas/player/client_handler.rb | 4 ++-- 1 file change

Ruby 2.2.0 and SoX 14.4.2rc2 released \o/

2014-12-26 Thread Eric Wong
re features coming): ----8< From: Eric Wong Subject: [PATCH] test: favor Process.spawn when possible Process.spawn allows vfork() + execve() usage in Ruby 2.2.0 to improve performance over normal fork() + execve(). --- test/test_player_integration.rb | 7 +++ test

[PATCH 0/3] more functionality for editing audio

2014-12-27 Thread Eric Wong
[PATCH 1/3] dtas-console: keys for "cue next/prev" - this made it easier to test [PATCH 2/3] [PATCH 2/3] player: support playing splitfx YAML files - I'm loving this feature already, it lets me save/edit small YAML files instead of wasting space by storing edited copies for optimal listening.

[PATCH 3/3] player: support "source restart" command

2014-12-27 Thread Eric Wong
This becomes useful for systems without inotify when we're editing YAML (or whatever) files frequently and want changes to be reflected right away during playback. This is a weaker version of the plain "restart" command, which restarts the entire playback chain. --- Documentation/dtas-player_prot

[PATCH 1/3] dtas-console: keys for "cue next/prev"

2014-12-27 Thread Eric Wong
The '!' and '@' keys are used in mplayer to skip chapters, so perhaps this is a good analogy. --- bin/dtas-console | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/dtas-console b/bin/dtas-console index 98d3f43..ee0c126 100755 --- a/bin/dtas-console +++ b/bin/dtas-console @@ -202,6 +202,8

[PATCH 2/3] player: support playing splitfx YAML files

2014-12-27 Thread Eric Wong
This allows splitfx users to test CUE breakpoints and run file-specific effects without interrupting their normal flow. --- examples/splitfx.sample.yml | 8 lib/dtas/player.rb | 4 +- lib/dtas/source/splitfx.rb | 92 + lib/dtas/s

[PATCH] source/splitfx: restart source on YAML modifications

2014-12-27 Thread Eric Wong
Since splitfx YAML files are intended to be frequently edited and modified by the user, we'll support automatically restarting the source when the user saves changes via their favorite $EDITOR This change is only for Linux users. However, sleepy_penguin supports kqueue nowadays so a patch to supp

[PATCH] source/splitfx: standardize on $FX for sox effects

2014-12-27 Thread Eric Wong
This should allow users to setup effects in a more standardized fashion and avoid needing to specify a "command:" field in their splitfx YAML files in the general case. --- examples/splitfx.sample.yml | 5 +++-- lib/dtas/source/splitfx.rb | 7 +-- 2 files changed, 8 insertions(+), 4 deletions

[PATCH] source/splitfx: default tracklist for single-track files

2014-12-28 Thread Eric Wong
While the splitfx source is intended for applying effects to untracked audio files (e.g. transfers of vinyl records or live concert recordings), it should be useful for applying effects to an already-tracked recording. --- lib/dtas/source/splitfx.rb | 4 +++- 1 file changed, 3 insertions(+), 1 del

  1   2   3   4   >