about summary refs log tree commit homepage
path: root/lib/dtas
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dtas')
-rw-r--r--lib/dtas/buffer.rb3
-rw-r--r--lib/dtas/buffer/read_write.rb3
-rw-r--r--lib/dtas/buffer/splice.rb3
-rw-r--r--lib/dtas/command.rb3
-rw-r--r--lib/dtas/compat_onenine.rb5
-rw-r--r--lib/dtas/disclaimer.rb4
-rw-r--r--lib/dtas/format.rb3
-rw-r--r--lib/dtas/pipe.rb5
-rw-r--r--lib/dtas/player.rb3
-rw-r--r--lib/dtas/player/client_handler.rb4
-rw-r--r--lib/dtas/process.rb3
-rw-r--r--lib/dtas/replaygain.rb3
-rw-r--r--lib/dtas/rg_state.rb3
-rw-r--r--lib/dtas/serialize.rb3
-rw-r--r--lib/dtas/sigevent.rb1
-rw-r--r--lib/dtas/sigevent/efd.rb3
-rw-r--r--lib/dtas/sigevent/pipe.rb3
-rw-r--r--lib/dtas/sink.rb3
-rw-r--r--lib/dtas/source.rb3
-rw-r--r--lib/dtas/source/command.rb3
-rw-r--r--lib/dtas/source/common.rb4
-rw-r--r--lib/dtas/source/mp3.rb3
-rw-r--r--lib/dtas/state_file.rb3
-rw-r--r--lib/dtas/unix_accepted.rb3
-rw-r--r--lib/dtas/unix_client.rb3
-rw-r--r--lib/dtas/unix_server.rb3
-rw-r--r--lib/dtas/util.rb3
-rw-r--r--lib/dtas/writable_iter.rb3
28 files changed, 34 insertions, 55 deletions
diff --git a/lib/dtas/buffer.rb b/lib/dtas/buffer.rb
index d02e8a6..1198b0c 100644
--- a/lib/dtas/buffer.rb
+++ b/lib/dtas/buffer.rb
@@ -1,10 +1,9 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 require_relative '../dtas'
 
-class DTAS::Buffer
+class DTAS::Buffer # :nodoc:
   begin
     raise LoadError, "no splice with _DTAS_POSIX" if ENV["_DTAS_POSIX"]
     require 'io/splice' # splice is only in Linux for now...
diff --git a/lib/dtas/buffer/read_write.rb b/lib/dtas/buffer/read_write.rb
index 93380d1..aa8e0f6 100644
--- a/lib/dtas/buffer/read_write.rb
+++ b/lib/dtas/buffer/read_write.rb
@@ -1,5 +1,4 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 require 'io/wait'
@@ -7,7 +6,7 @@ require 'io/nonblock'
 require_relative '../../dtas'
 require_relative '../pipe'
 
-module DTAS::Buffer::ReadWrite
+module DTAS::Buffer::ReadWrite # :nodoc:
   MAX_AT_ONCE = 512 # min PIPE_BUF value in POSIX
   attr_accessor :buffer_size
 
diff --git a/lib/dtas/buffer/splice.rb b/lib/dtas/buffer/splice.rb
index c2540bd..cc52f0d 100644
--- a/lib/dtas/buffer/splice.rb
+++ b/lib/dtas/buffer/splice.rb
@@ -1,5 +1,4 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 require 'io/wait'
@@ -8,7 +7,7 @@ require 'io/splice'
 require_relative '../../dtas'
 require_relative '../pipe'
 
-module DTAS::Buffer::Splice
+module DTAS::Buffer::Splice # :nodoc:
   MAX_AT_ONCE = 4096 # page size in Linux
   MAX_SIZE = File.read("/proc/sys/fs/pipe-max-size").to_i
   DEVNULL = File.open("/dev/null", "r+")
diff --git a/lib/dtas/command.rb b/lib/dtas/command.rb
index b957567..500a6d7 100644
--- a/lib/dtas/command.rb
+++ b/lib/dtas/command.rb
@@ -1,12 +1,11 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 # common code for wrapping SoX/ecasound/... commands
 require_relative 'serialize'
 require 'shellwords'
 
-module DTAS::Command
+module DTAS::Command # :nodoc:
   include DTAS::Serialize
   attr_reader :pid
   attr_reader :to_io
diff --git a/lib/dtas/compat_onenine.rb b/lib/dtas/compat_onenine.rb
index 98be8c9..3c4db52 100644
--- a/lib/dtas/compat_onenine.rb
+++ b/lib/dtas/compat_onenine.rb
@@ -1,5 +1,4 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 
@@ -7,13 +6,13 @@
 # This exists for Debian wheezy users using the stock Ruby 1.9.3 install.
 # We'll drop this interface when Debian wheezy (7.0) becomes unsupported.
 class String
-  def b
+  def b # :nodoc:
     dup.force_encoding(Encoding::BINARY)
   end
 end unless String.method_defined?(:b)
 
 def IO
-  def self.pipe
+  def self.pipe # :nodoc:
     super.map! { |io| io.close_on_exec = true; io }
   end
 end if RUBY_VERSION.to_f <= 1.9
diff --git a/lib/dtas/disclaimer.rb b/lib/dtas/disclaimer.rb
index c25ba77..608956d 100644
--- a/lib/dtas/disclaimer.rb
+++ b/lib/dtas/disclaimer.rb
@@ -1,3 +1,7 @@
+# -*- encoding: binary -*-
+# :enddoc:
+# Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
+# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 DTAS_DISCLAIMER = <<EOF
 # WARNING!
 #
diff --git a/lib/dtas/format.rb b/lib/dtas/format.rb
index 1ba5487..83a541a 100644
--- a/lib/dtas/format.rb
+++ b/lib/dtas/format.rb
@@ -1,5 +1,4 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 # class represents an audio format (type/bits/channels/sample rate/...)
@@ -7,7 +6,7 @@ require_relative '../dtas'
 require_relative 'process'
 require_relative 'serialize'
 
-class DTAS::Format
+class DTAS::Format # :nodoc:
   include DTAS::Process
   include DTAS::Serialize
   NATIVE_ENDIAN = [1].pack("l") == [1].pack("l>") ? "big" : "little"
diff --git a/lib/dtas/pipe.rb b/lib/dtas/pipe.rb
index 891e9cd..d61ac7a 100644
--- a/lib/dtas/pipe.rb
+++ b/lib/dtas/pipe.rb
@@ -1,5 +1,4 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 begin
@@ -9,7 +8,7 @@ end
 require_relative '../dtas'
 require_relative 'writable_iter'
 
-class DTAS::Pipe < IO
+class DTAS::Pipe < IO # :nodoc:
   include DTAS::WritableIter
   attr_accessor :sink
 
@@ -33,7 +32,7 @@ end
 # We don't need fcntl at all for splice/tee in Linux
 # For non-Linux, we write_nonblock/read_nonblock already call fcntl()
 # behind our backs, so there's no need to repeat it.
-class DTAS::PipeNB < DTAS::Pipe
+class DTAS::PipeNB < DTAS::Pipe # :nodoc:
   def nonblock?
     true
   end
diff --git a/lib/dtas/player.rb b/lib/dtas/player.rb
index b39989b..8490e27 100644
--- a/lib/dtas/player.rb
+++ b/lib/dtas/player.rb
@@ -1,5 +1,4 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 require 'yaml'
@@ -14,7 +13,7 @@ require_relative 'sigevent'
 require_relative 'rg_state'
 require_relative 'state_file'
 
-class DTAS::Player
+class DTAS::Player # :nodoc:
   require_relative 'player/client_handler'
   include DTAS::Player::ClientHandler
   attr_accessor :state_file
diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb
index b3c208d..cddbe4c 100644
--- a/lib/dtas/player/client_handler.rb
+++ b/lib/dtas/player/client_handler.rb
@@ -1,8 +1,7 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
-module DTAS::Player::ClientHandler
+module DTAS::Player::ClientHandler # :nodoc:
 
   # returns true on success, wait_ctl arg on error
   def set_bool(io, kv, v)
@@ -461,3 +460,4 @@ module DTAS::Player::ClientHandler
     io.emit("OK")
   end
 end
+# :startdoc:
diff --git a/lib/dtas/process.rb b/lib/dtas/process.rb
index 35ca6a6..2806fbf 100644
--- a/lib/dtas/process.rb
+++ b/lib/dtas/process.rb
@@ -1,10 +1,9 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 require 'shellwords'
 require 'io/wait'
-module DTAS::Process
+module DTAS::Process # :nodoc:
   PIDS = {}
 
   def self.reaper
diff --git a/lib/dtas/replaygain.rb b/lib/dtas/replaygain.rb
index e049b8d..cf397a3 100644
--- a/lib/dtas/replaygain.rb
+++ b/lib/dtas/replaygain.rb
@@ -1,5 +1,4 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 #
@@ -9,7 +8,7 @@
 # *_peak values are 0..inf (1.0 being full scale, but >1 is possible
 # *_gain values are specified in dB
 
-class DTAS::ReplayGain
+class DTAS::ReplayGain # :nodoc:
   ATTRS = %w(reference_loudness track_gain album_gain track_peak album_peak)
   ATTRS.each { |a| attr_reader a }
 
diff --git a/lib/dtas/rg_state.rb b/lib/dtas/rg_state.rb
index 6463be7..7244b75 100644
--- a/lib/dtas/rg_state.rb
+++ b/lib/dtas/rg_state.rb
@@ -1,5 +1,4 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 #
@@ -7,7 +6,7 @@
 # MAYBE: account for non-standard reference loudness (89.0 dB is standard)
 require_relative '../dtas'
 require_relative 'serialize'
-class DTAS::RGState
+class DTAS::RGState # :nodoc:
   include DTAS::Serialize
 
   RG_MODE = {
diff --git a/lib/dtas/serialize.rb b/lib/dtas/serialize.rb
index 57eb626..bd9e199 100644
--- a/lib/dtas/serialize.rb
+++ b/lib/dtas/serialize.rb
@@ -1,8 +1,7 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
-module DTAS::Serialize
+module DTAS::Serialize # :nodoc:
   def ivars_to_hash(ivars, rv = {})
     ivars.each { |k| rv[k] = instance_variable_get("@#{k}") }
     rv
diff --git a/lib/dtas/sigevent.rb b/lib/dtas/sigevent.rb
index ccaec2f..402c06f 100644
--- a/lib/dtas/sigevent.rb
+++ b/lib/dtas/sigevent.rb
@@ -1,5 +1,4 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 begin
diff --git a/lib/dtas/sigevent/efd.rb b/lib/dtas/sigevent/efd.rb
index 782e383..4de4df1 100644
--- a/lib/dtas/sigevent/efd.rb
+++ b/lib/dtas/sigevent/efd.rb
@@ -1,8 +1,7 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
-class DTAS::Sigevent < SleepyPenguin::EventFD
+class DTAS::Sigevent < SleepyPenguin::EventFD # :nodoc:
   include SleepyPenguin
 
   def self.new
diff --git a/lib/dtas/sigevent/pipe.rb b/lib/dtas/sigevent/pipe.rb
index 139aa68..34be51c 100644
--- a/lib/dtas/sigevent/pipe.rb
+++ b/lib/dtas/sigevent/pipe.rb
@@ -1,8 +1,7 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
-class DTAS::Sigevent
+class DTAS::Sigevent # :nodoc:
   attr_reader :to_io
 
   def initialize
diff --git a/lib/dtas/sink.rb b/lib/dtas/sink.rb
index 7931694..e28d479 100644
--- a/lib/dtas/sink.rb
+++ b/lib/dtas/sink.rb
@@ -1,5 +1,4 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 require 'yaml'
@@ -12,7 +11,7 @@ require_relative 'serialize'
 require_relative 'writable_iter'
 
 # this is a sink (endpoint, audio enters but never leaves)
-class DTAS::Sink
+class DTAS::Sink # :nodoc:
   attr_accessor :prio    # any Integer
   attr_accessor :active  # boolean
   attr_accessor :name
diff --git a/lib/dtas/source.rb b/lib/dtas/source.rb
index f6dd443..404d2b0 100644
--- a/lib/dtas/source.rb
+++ b/lib/dtas/source.rb
@@ -1,5 +1,4 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 require_relative '../dtas'
@@ -10,7 +9,7 @@ require_relative 'process'
 require_relative 'serialize'
 
 # this is usually one input file
-class DTAS::Source
+class DTAS::Source # :nodoc:
   attr_reader :infile
   attr_reader :offset
   require_relative 'source/common'
diff --git a/lib/dtas/source/command.rb b/lib/dtas/source/command.rb
index 30441eb..930c5cf 100644
--- a/lib/dtas/source/command.rb
+++ b/lib/dtas/source/command.rb
@@ -1,5 +1,4 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 require_relative '../../dtas'
@@ -7,7 +6,7 @@ require_relative '../source'
 require_relative '../command'
 require_relative '../serialize'
 
-class DTAS::Source::Command
+class DTAS::Source::Command # :nodoc:
   require_relative '../source/common'
 
   include DTAS::Command
diff --git a/lib/dtas/source/common.rb b/lib/dtas/source/common.rb
index 333e74a..bece82c 100644
--- a/lib/dtas/source/common.rb
+++ b/lib/dtas/source/common.rb
@@ -1,7 +1,7 @@
-# :stopdoc:
+# -*- encoding: binary -*-
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
-module DTAS::Source::Common
+module DTAS::Source::Common # :nodoc:
   attr_reader :dst_zero_byte
   attr_reader :dst
   attr_accessor :requeued
diff --git a/lib/dtas/source/mp3.rb b/lib/dtas/source/mp3.rb
index b013bee..7ceaf8a 100644
--- a/lib/dtas/source/mp3.rb
+++ b/lib/dtas/source/mp3.rb
@@ -1,10 +1,9 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 require_relative '../process'
 
-module DTAS::Source::Mp3
+module DTAS::Source::Mp3 # :nodoc:
   include DTAS::Process
   # we use dBFS = 1.0 as scale (not 32768)
   def __mp3gain_peak(str)
diff --git a/lib/dtas/state_file.rb b/lib/dtas/state_file.rb
index cfd83d5..b6f3617 100644
--- a/lib/dtas/state_file.rb
+++ b/lib/dtas/state_file.rb
@@ -1,10 +1,9 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 require 'yaml'
 require 'tempfile'
-class DTAS::StateFile
+class DTAS::StateFile # :nodoc:
   def initialize(path, do_fsync = false)
     @path = path
     @do_fsync = do_fsync
diff --git a/lib/dtas/unix_accepted.rb b/lib/dtas/unix_accepted.rb
index 6883ee1..f1f08d4 100644
--- a/lib/dtas/unix_accepted.rb
+++ b/lib/dtas/unix_accepted.rb
@@ -1,11 +1,10 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 require 'socket'
 require 'io/wait'
 
-class DTAS::UNIXAccepted
+class DTAS::UNIXAccepted # :nodoc:
   attr_reader :to_io
 
   def initialize(sock)
diff --git a/lib/dtas/unix_client.rb b/lib/dtas/unix_client.rb
index f46eddf..cc6bf0f 100644
--- a/lib/dtas/unix_client.rb
+++ b/lib/dtas/unix_client.rb
@@ -1,5 +1,4 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 require 'dtas'
@@ -7,7 +6,7 @@ require 'socket'
 require 'io/wait'
 require 'shellwords'
 
-class DTAS::UNIXClient
+class DTAS::UNIXClient # :nodoc:
   attr_reader :to_io
 
   def self.default_path
diff --git a/lib/dtas/unix_server.rb b/lib/dtas/unix_server.rb
index 90f8479..ed96a1e 100644
--- a/lib/dtas/unix_server.rb
+++ b/lib/dtas/unix_server.rb
@@ -1,5 +1,4 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 require 'socket'
@@ -15,7 +14,7 @@ require_relative 'unix_accepted'
 # but IO.select can be just as fast (or faster) with few descriptors and
 # is obviously more portable.
 
-class DTAS::UNIXServer
+class DTAS::UNIXServer # :nodoc:
   attr_reader :to_io
 
   def close
diff --git a/lib/dtas/util.rb b/lib/dtas/util.rb
index 03c7ded..0b89346 100644
--- a/lib/dtas/util.rb
+++ b/lib/dtas/util.rb
@@ -1,11 +1,10 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 require_relative '../dtas'
 
 # in case we need to convert DB values to a linear scale
-module DTAS::Util
+module DTAS::Util # :nodoc:
   def db_to_linear(val)
     Math.exp(val * Math.log(10) * 0.05)
   end
diff --git a/lib/dtas/writable_iter.rb b/lib/dtas/writable_iter.rb
index aa02905..e15bd2f 100644
--- a/lib/dtas/writable_iter.rb
+++ b/lib/dtas/writable_iter.rb
@@ -1,10 +1,9 @@
 # -*- encoding: binary -*-
-# :stopdoc:
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 require_relative '../dtas'
 
-module DTAS::WritableIter
+module DTAS::WritableIter # :nodoc:
   attr_accessor :on_writable
 
   def writable_iter_init