added extra debug info
This commit is contained in:
@@ -50,13 +50,17 @@
|
|||||||
(set-ao-handle-channels! handle channels)
|
(set-ao-handle-channels! handle channels)
|
||||||
(set-ao-handle-rate! handle rate)
|
(set-ao-handle-rate! handle rate)
|
||||||
|
|
||||||
|
(info-sound "ao-open-live ~a ~a ~a ~a" bits rate channels byte-format)
|
||||||
|
|
||||||
(let ((player (ffi:ao_create_async bits rate channels byte-format)))
|
(let ((player (ffi:ao_create_async bits rate channels byte-format)))
|
||||||
(set-ao-handle-async-player! handle player)
|
(set-ao-handle-async-player! handle player)
|
||||||
(if (eq? player #f)
|
(if (eq? player #f)
|
||||||
(begin
|
(begin
|
||||||
|
(err-sound "ao-open-live - cannote create player")
|
||||||
(set-ao-handle-closed! handle #t)
|
(set-ao-handle-closed! handle #t)
|
||||||
handle)
|
handle)
|
||||||
(begin
|
(begin
|
||||||
|
(info-sound "ao-open-live - created player")
|
||||||
(set-ao-handle-closed! handle #f)
|
(set-ao-handle-closed! handle #f)
|
||||||
handle
|
handle
|
||||||
)
|
)
|
||||||
@@ -67,6 +71,7 @@
|
|||||||
|
|
||||||
(define (ao-close handle)
|
(define (ao-close handle)
|
||||||
(unless (eq? (ao-handle-async-player handle) #f)
|
(unless (eq? (ao-handle-async-player handle) #f)
|
||||||
|
(info-sound "ao-close - closing handle")
|
||||||
(ffi:ao_stop_async (ao-handle-async-player handle))
|
(ffi:ao_stop_async (ao-handle-async-player handle))
|
||||||
(set-ao-handle-async-player! handle #f)
|
(set-ao-handle-async-player! handle #f)
|
||||||
)
|
)
|
||||||
@@ -83,7 +88,9 @@
|
|||||||
(endianess (ao-handle-byte-format handle))
|
(endianess (ao-handle-byte-format handle))
|
||||||
(buf-info (ffi:make-BufferInfo_t buf-type bits rate channels endianess))
|
(buf-info (ffi:make-BufferInfo_t buf-type bits rate channels endianess))
|
||||||
)
|
)
|
||||||
|
(dbg-sound "ao-play ~a ~a" at-time-in-s music-duration-s)
|
||||||
(unless (ao-valid? handle)
|
(unless (ao-valid? handle)
|
||||||
|
(err-sound "Cannot play on an invalid ao-device")
|
||||||
(error "Cannot play on an invalid ao-device"))
|
(error "Cannot play on an invalid ao-device"))
|
||||||
(ffi:ao_play_async (ao-handle-async-player handle)
|
(ffi:ao_play_async (ao-handle-async-player handle)
|
||||||
(exact->inexact at-time-in-s)
|
(exact->inexact at-time-in-s)
|
||||||
@@ -95,6 +102,7 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
(define (ao-pause handle pause)
|
(define (ao-pause handle pause)
|
||||||
|
(dbg-sound "ao-pause ~a" pause)
|
||||||
(ffi:ao_pause_async (ao-handle-async-player handle) (if (eq? pause #f) 0 1))
|
(ffi:ao_pause_async (ao-handle-async-player handle) (if (eq? pause #f) 0 1))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user