File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,20 +70,20 @@ class struct_pa_sample_spec(ctypes.Structure):
7070 raise Exception ("Could not create pulse audio stream: %s" % pa .strerror (ctypes .byref (error )))
7171
7272 while True :
73- latency = pa .pa_simple_get_latency (pa_stream , error )
73+ latency = pa .pa_simple_get_latency (pa_stream , ctypes . byref ( error ) )
7474 if latency == - 1 :
7575 raise Exception ("Getting latency failed" )
7676
7777 buf = wave_file .readframes (BUFFSIZE )
7878 if not buf :
7979 break
8080
81- if pa .pa_simple_write (pa_stream , buf , len (buf ), error ):
81+ if pa .pa_simple_write (pa_stream , buf , len (buf ), ctypes . byref ( error ) ):
8282 raise Exception ("Could not play file" )
8383
8484 wave_file .close ()
8585
86- if pa .pa_simple_drain (pa_stream , error ):
86+ if pa .pa_simple_drain (pa_stream , ctypes . byref ( error ) ):
8787 raise Exception ("Could not simple drain" )
8888
8989 pa .pa_simple_free (pa_stream )
You can’t perform that action at this time.
0 commit comments