@@ -72,7 +72,7 @@ def cancel(self, action, time=0, allow_belated=True):
72
72
"""
73
73
cancel_action = _ffi .new ('struct action*' , dict (
74
74
type = CANCEL ,
75
- allow_belated = allow_belated ,
75
+ actual_time = - 1.0 if allow_belated else 0.0 ,
76
76
requested_time = time ,
77
77
action = action ,
78
78
))
@@ -88,7 +88,7 @@ def fetch_and_reset_stats(self, time=0, allow_belated=True):
88
88
"""
89
89
action = _ffi .new ('struct action*' , dict (
90
90
type = FETCH_AND_RESET_STATS ,
91
- allow_belated = allow_belated ,
91
+ actual_time = - 1.0 if allow_belated else 0.0 ,
92
92
requested_time = time ,
93
93
))
94
94
self ._enqueue (action )
@@ -173,7 +173,7 @@ def play_buffer(self, buffer, channels, start=0, allow_belated=True):
173
173
_ , samplesize = _sd ._split (self .samplesize )
174
174
action = _ffi .new ('struct action*' , dict (
175
175
type = PLAY_BUFFER ,
176
- allow_belated = allow_belated ,
176
+ actual_time = - 1.0 if allow_belated else 0.0 ,
177
177
requested_time = start ,
178
178
buffer = _ffi .cast ('float*' , buffer ),
179
179
total_frames = len (buffer ) // channels // samplesize ,
@@ -199,7 +199,7 @@ def play_ringbuffer(self, ringbuffer, channels=None, start=0,
199
199
raise ValueError ('Incompatible elementsize' )
200
200
action = _ffi .new ('struct action*' , dict (
201
201
type = PLAY_RINGBUFFER ,
202
- allow_belated = allow_belated ,
202
+ actual_time = - 1.0 if allow_belated else 0.0 ,
203
203
requested_time = start ,
204
204
ringbuffer = ringbuffer ._ptr ,
205
205
total_frames = ULONG_MAX ,
@@ -238,7 +238,7 @@ def record_buffer(self, buffer, channels, start=0, allow_belated=True):
238
238
samplesize , _ = _sd ._split (self .samplesize )
239
239
action = _ffi .new ('struct action*' , dict (
240
240
type = RECORD_BUFFER ,
241
- allow_belated = allow_belated ,
241
+ actual_time = - 1.0 if allow_belated else 0.0 ,
242
242
requested_time = start ,
243
243
buffer = _ffi .cast ('float*' , buffer ),
244
244
total_frames = len (buffer ) // channels // samplesize ,
@@ -264,7 +264,7 @@ def record_ringbuffer(self, ringbuffer, channels=None, start=0,
264
264
raise ValueError ('Incompatible elementsize' )
265
265
action = _ffi .new ('struct action*' , dict (
266
266
type = RECORD_RINGBUFFER ,
267
- allow_belated = allow_belated ,
267
+ actual_time = - 1.0 if allow_belated else 0.0 ,
268
268
requested_time = start ,
269
269
ringbuffer = ringbuffer ._ptr ,
270
270
total_frames = ULONG_MAX ,
0 commit comments