-
This commit is contained in:
@@ -245,6 +245,16 @@ void ao_play_async(void *ao_handle, double at_second, int buf_size, void *mem)
|
||||
MUTEX_UNLOCK(h->mutex);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ao_clear_async(void *ao_handle)
|
||||
{
|
||||
AO_Handle *h = (AO_Handle *) ao_handle;
|
||||
MUTEX_LOCK(h->mutex);
|
||||
clear(h);
|
||||
MUTEX_UNLOCK(h->mutex);
|
||||
}
|
||||
|
||||
double ao_is_at_second_async(void *ao_handle)
|
||||
{
|
||||
AO_Handle *h = (AO_Handle *) ao_handle;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
AOPLAYASYNC_EXPORT void *ao_create_async(void *ao_handle, void *ao_play_f);
|
||||
AOPLAYASYNC_EXPORT void ao_stop_async(void *handle);
|
||||
AOPLAYASYNC_EXPORT void ao_play_async(void *handle, double at_second, int buf_size, void *mem);
|
||||
AOPLAYASYNC_EXPORT void ao_clear_async(void *handle);
|
||||
AOPLAYASYNC_EXPORT double ao_is_at_second_async(void *handle);
|
||||
AOPLAYASYNC_EXPORT int ao_bufsize_async(void *handle);
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -14,6 +14,7 @@
|
||||
ao_play_async
|
||||
ao_is_at_second_async
|
||||
ao_bufsize_async
|
||||
ao_clear_async
|
||||
)
|
||||
|
||||
(define-runtime-path libao-async-lib-path "./lib")
|
||||
@@ -46,4 +47,7 @@
|
||||
(define-libao-async ao_is_at_second_async(_fun _libao-async-handle-pointer -> _double))
|
||||
|
||||
;extern int ao_bufsize_async(void *handle);
|
||||
(define-libao-async ao_bufsize_async(_fun _libao-async-handle-pointer -> _int))
|
||||
(define-libao-async ao_bufsize_async(_fun _libao-async-handle-pointer -> _int))
|
||||
|
||||
;extern void ao_clear_async(void *handle);
|
||||
(define-libao-async ao_clear_async(_fun _libao-async-handle-pointer -> _void))
|
||||
@@ -14,6 +14,7 @@
|
||||
ao-default-driver-id
|
||||
ao-at-second
|
||||
ao-bufsize-async
|
||||
ao-clear-async
|
||||
)
|
||||
|
||||
(define devices (make-hash))
|
||||
@@ -178,6 +179,9 @@
|
||||
(define (ao-bufsize-async handle)
|
||||
(ao_bufsize_async (ao-handle-async-player handle)))
|
||||
|
||||
(define (ao-clear-async handle)
|
||||
(ao_clear_async (ao-handle-async-player handle)))
|
||||
|
||||
;(let* ((handle-num (ao-handle-handle-num handle))
|
||||
; (ao-device (hash-ref devices handle-num #f)))
|
||||
; (if (eq? ao-device #f)
|
||||
|
||||
Reference in New Issue
Block a user