@@ -72,7 +72,7 @@ def cancel(self, action, time=0, allow_belated=True):
7272 """
7373 cancel_action = _ffi .new ('struct action*' , dict (
7474 type = CANCEL ,
75- allow_belated = allow_belated ,
75+ actual_time = - 1.0 if allow_belated else 0.0 ,
7676 requested_time = time ,
7777 action = action ,
7878 ))
@@ -88,7 +88,7 @@ def fetch_and_reset_stats(self, time=0, allow_belated=True):
8888 """
8989 action = _ffi .new ('struct action*' , dict (
9090 type = FETCH_AND_RESET_STATS ,
91- allow_belated = allow_belated ,
91+ actual_time = - 1.0 if allow_belated else 0.0 ,
9292 requested_time = time ,
9393 ))
9494 self ._enqueue (action )
@@ -173,7 +173,7 @@ def play_buffer(self, buffer, channels, start=0, allow_belated=True):
173173 _ , samplesize = _sd ._split (self .samplesize )
174174 action = _ffi .new ('struct action*' , dict (
175175 type = PLAY_BUFFER ,
176- allow_belated = allow_belated ,
176+ actual_time = - 1.0 if allow_belated else 0.0 ,
177177 requested_time = start ,
178178 buffer = _ffi .cast ('float*' , buffer ),
179179 total_frames = len (buffer ) // channels // samplesize ,
@@ -199,7 +199,7 @@ def play_ringbuffer(self, ringbuffer, channels=None, start=0,
199199 raise ValueError ('Incompatible elementsize' )
200200 action = _ffi .new ('struct action*' , dict (
201201 type = PLAY_RINGBUFFER ,
202- allow_belated = allow_belated ,
202+ actual_time = - 1.0 if allow_belated else 0.0 ,
203203 requested_time = start ,
204204 ringbuffer = ringbuffer ._ptr ,
205205 total_frames = ULONG_MAX ,
@@ -238,7 +238,7 @@ def record_buffer(self, buffer, channels, start=0, allow_belated=True):
238238 samplesize , _ = _sd ._split (self .samplesize )
239239 action = _ffi .new ('struct action*' , dict (
240240 type = RECORD_BUFFER ,
241- allow_belated = allow_belated ,
241+ actual_time = - 1.0 if allow_belated else 0.0 ,
242242 requested_time = start ,
243243 buffer = _ffi .cast ('float*' , buffer ),
244244 total_frames = len (buffer ) // channels // samplesize ,
@@ -264,7 +264,7 @@ def record_ringbuffer(self, ringbuffer, channels=None, start=0,
264264 raise ValueError ('Incompatible elementsize' )
265265 action = _ffi .new ('struct action*' , dict (
266266 type = RECORD_RINGBUFFER ,
267- allow_belated = allow_belated ,
267+ actual_time = - 1.0 if allow_belated else 0.0 ,
268268 requested_time = start ,
269269 ringbuffer = ringbuffer ._ptr ,
270270 total_frames = ULONG_MAX ,
0 commit comments