packages/listener: add a config file, fix config file handling
authorNicolas Thill <nico@openwrt.org>
Wed, 26 Oct 2011 00:42:35 +0000 (00:42 +0000)
committerNicolas Thill <nico@openwrt.org>
Wed, 26 Oct 2011 00:42:35 +0000 (00:42 +0000)
Add a config file based on:

  http://projects.qi-hardware.com/index.php/p/openwrt-packages/source/tree/master/listener/files/listener.conf

Fix the location where listener is looking for its configuration file

(thanks to Xiangfu Liu for pointing these)

SVN-Revision: 28594

sound/listener/Makefile
sound/listener/files/listener.conf [new file with mode: 0644]

index 76b655402ad0b406424c590bfb3455962875122e..7bb41a8372c5558030c095df3b7db5edc2e141ad 100644 (file)
@@ -31,11 +31,18 @@ define Package/listener/description
   again.
 endef
 
+MAKE_FLAGS+= \
+       INSTALL_PREFIX= \
+
+define Package/listener/conffiles
+/etc/listener.conf
+endef
+
 define Package/listener/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/{listener,listenersoundpipe,setlistener} $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/etc
-       $(INSTALL_CONF) $(PKG_BUILD_DIR)/listener.conf $(1)/etc/
+       $(INSTALL_CONF) ./files/listener.conf $(1)/etc/
 endef
 
 $(eval $(call BuildPackage,listener))
diff --git a/sound/listener/files/listener.conf b/sound/listener/files/listener.conf
new file mode 100644 (file)
index 0000000..aeafd44
--- /dev/null
@@ -0,0 +1,20 @@
+wav_path = /tmp/
+fname_template = listener-%h-%y%m%d-%H%M%S.wav
+devname = /dev/dsp
+detect_level = 1
+min_duration = 10
+rec_silence = 5
+max_duration = 60
+min_triggers = 2
+sample_rate = 8000
+channels = 1
+format=wav
+amplify = off
+start_amplify = 1.5
+max_amplify = 10.0
+fixed_amplify = no
+safe_after_filter = no
+one_shot = no
+
+#compression = a-law
+#filter = ./my_filter2.so.0.1 0 3000.0 1.0