Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f6d8032

Browse files
committed
Impor VCR at the top. Change the way audio is recorded subtly.
1 parent fa04170 commit f6d8032

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Demo/sgi/video/Vb.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import VGrabber
3131
import imageop
3232
sys.path.append('/ufs/jack/src/av/vcr')
33+
import VCR
3334

3435
ARROW = 0
3536
WATCH = 1
@@ -500,7 +501,6 @@ def single_capture(self, stepfunc, timecode):
500501

501502
def vcr_capture(self):
502503
if not self.vcr:
503-
import VCR
504504
try:
505505
self.vcr = VCR.VCR().init()
506506
self.vcr.wait()
@@ -787,7 +787,6 @@ def open_audio(self):
787787
self.aout.setnchannels(nch)
788788
self.aout.setsampwidth(width)
789789
self.aout.setframerate(rate)
790-
self.aout.writeframes('')
791790
c = al.newconfig()
792791
c.setqueuesize(8000)
793792
c.setchannels(nch)
@@ -809,7 +808,7 @@ def record_audio(self, *args):
809808
while not self.audio_stop:
810809
data = self.aport.readsamps(4000)
811810
if self.audio_ok:
812-
self.aout.writeframesraw(data)
811+
self.aout.writeframes(data)
813812
data = None
814813
self.audio_busy = 0
815814

0 commit comments

Comments
 (0)