Sha256: 69c9966a2217f34f1a28164330db8176177dcaf9ec3a0473e615fd4c93f22243

Contents?: true

Size: 1.53 KB

Versions: 1

Compression:

Stored size: 1.53 KB

Contents

#
# Config sample for Alsa.Backup
#
# Usage: 
#   alsa-backup --config /path/to/this/file
#

#
# To use syslog
#
#require 'syslog_logger'
#AlsaBackup.logger = SyslogLogger.new('alsa.backup').tap do |logger|
#  logger.level = Logger::INFO
#end

#
# To debug
#
#Sndfile::logger = ALSA::logger = AlsaBackup.logger = Logger.new(STDOUT)

AlsaBackup.logger.info("load config #{__FILE__}")

AlsaBackup.config do |recorder|

  # 
  # To specify the alsa device to be used
  #
  #recorder.device = "plughw:0"

  # 
  # To specify the channel count to be used
  #
  #recorder.channels = 1
  #recorder.channels = 4

  # 
  # To specify the sample_rate to be used
  #
  #recorder.sample_rate = 48000
                  
  #
  # To use files named like this :
  # - 2009/05-May/17-Sun/19h.wav
  # - 2009/05-May/17-Sun/20h.wav
  #
  #recorder.file = Proc.new {
  #  Time.now.strftime("%Y/%m-%b/%d-%a/%Hh.wav")
  #}

  #
  # To use files named like this :
  # - 2009/05-May/17-Sun/19h00.wav
  # - 2009/05-May/17-Sun/19h15.wav
  #
  #recorder.file = Proc.new {
  #  Time.now.floor(:min, 15).strftime("%Y/%m-%b/%d-%a/%Hh%M.wav")
  #}

  #
  # Define where the files are created
  #
  #recorder.directory = "/var/lib/alsa.backup"

  # 
  # Customize error handler during record
  # 

  # To sleep 30 seconds on error
  #recorder.error_handler = Proc.new do |exception| 
  #  30
  #end

  # To fail on any error
  #recorder.error_handler = Proc.new do |exception| 
  #  false
  #end

  # To sleep the default time
  #recorder.error_handler = Proc.new do |exception| 
  #  true
  #end
end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
albanpeignier-alsa-backup-0.0.7 config.sample