everything related to duct tape audio suite (dtas)
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [ANN] dtas 0.21.0 - duct tape audio suite for *nix
@ 2022-09-06 21:47  5% Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-09-06 21:47 UTC (permalink / raw)
  To: dtas-all, ruby-talk

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 primarily implemented
in Ruby, but will gradually switch to a language with fewer backwards
incompatibilities in the future.

Changes:

    There's two minor fixes for dtas-splitfx, and one for
    dtas-player users using the rate=bypass optimization.

    3 changes since v0.20.0 (2022-02-03):

          splitfx: fix error reporting of failed tracks
          splitfx: warn on improper encodings for titles
          player: drain sinks completely before changing sink rate

* homepage: https://80x24.org/dtas/
* https://80x24.org/dtas/INSTALL
* https://80x24.org/dtas/dtas-player.txt
* https://80x24.org/dtas/NEWS.atom
* git clone https://80x24.org/dtas.git
* dtas-all@nongnu.org (plain-text only, no HTML mail, please)
* mail archives: https://80x24.org/dtas-all/
  nntps://news.public-inbox.org/inbox.comp.audio.dtas
  imaps://;AUTH=ANONYMOUS@public-inbox.org/inbox.comp.audio.dtas.0
  nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.audio.dtas
  imap://;AUTH=ANONYMOUS@7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.audio.dtas.0
  https://80x24.org/dtas-all/new.atom

note: .onion URLs require Tor: <https://www.torproject.org/>


^ permalink raw reply	[relevance 5%]

* [PATCH] player: drain sinks completely before changing sink rate
@ 2022-08-14 21:24  7% Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-08-14 21:24 UTC (permalink / raw)
  To: dtas-all

For users of the CPU-saving bypass mode (e.g. "format rate=bypass"),
this fixes a bug when enqueueing a 44.1kHz immediately after a
48kHz file (or vice-versa).

Note: gapless playback with different rates/channels between
tracks has never been supported with bypass mode enabled.
Bypass only allows opportunistic gapless when sequential tracks
have the same format.
---
 lib/dtas/player.rb | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/dtas/player.rb b/lib/dtas/player.rb
index 06ba788..6ea3aba 100644
--- a/lib/dtas/player.rb
+++ b/lib/dtas/player.rb
@@ -37,6 +37,7 @@ def initialize
     @paused = false
     @format = DTAS::Format.new
     @bypass = [] # %w(rate bits channels) (not worth Hash overhead)
+    @bypass_next = nil # source_spec
 
     @sinks = {} # { user-defined name => sink }
     @targets = [] # order matters
@@ -331,6 +332,7 @@ def create_default_sink
 
   # called when the player is leaving idle state
   def spawn_sinks(source_spec)
+    @bypass_next = nil
     return true if @targets[0]
     @sinks.each_value do |sink|
       sink.active or next
@@ -392,6 +394,8 @@ def next_source(source_spec)
       if ! @bypass.empty? && pending.respond_to?(:format)
         new_fmt = bypass_match!(@format.dup, pending.format)
         if new_fmt != @format
+          @bypass_next = source_spec
+          return if @sink_buf.inflight > 0
           stop_sinks # we may fail to start below
           format_update!(new_fmt)
         end
@@ -434,6 +438,7 @@ def drop_target(target)
   end
 
   def stop_sinks
+    @bypass_next = nil
     @targets.each { |t| drop_target(t) }.clear
   end
 
@@ -458,7 +463,9 @@ def sink_iter
     end
 
     # nothing left inflight, stop the sinks until we have a source
+    bn = @bypass_next
     stop_sinks
+    next_source(bn) if bn # are we restarting for bypass?
     :ignore
   end
 


^ permalink raw reply related	[relevance 7%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-08-14 21:24  7% [PATCH] player: drain sinks completely before changing sink rate Eric Wong
2022-09-06 21:47  5% [ANN] dtas 0.21.0 - duct tape audio suite for *nix Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/dtas.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).