forked from albanpeignier/alsa-backup
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.sample
84 lines (68 loc) · 1.53 KB
/
config.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#
# 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