-fixed some problems with recorder not working on ubuntu 10.10

This commit is contained in:
martin 2011-03-24 21:02:08 -04:00
parent 5b3cd9ea0d
commit 10559a3ff0
2 changed files with 10 additions and 4 deletions

View file

@ -12,7 +12,8 @@ from poster.encode import multipart_encode
from poster.streaminghttp import register_openers
import urllib2
from subprocess import call
#from subprocess import call
from subprocess import Popen, PIPE
from threading import Thread
# loading config file
@ -39,8 +40,10 @@ class Recorder(Thread):
filename = self.filename.replace(" ", "-")
filepath = "%s%s.%s" % (config["base_recorded_files"], filename, self.filetype)
command = "ecasound -i alsa -o %s -t:%s" % (filepath, length)
call(command, shell=True)
command = ("ecasound -i alsa -o %s -t:%s" % (filepath, length)).split(' ')
print(command)
Popen(command, stdout=PIPE)
#call(command, shell=False)
return filepath