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

Skip to content

Commit bdf72b0

Browse files
committed
Minor fix
1 parent 7127869 commit bdf72b0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

extra/beep/beep.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)