Added volume controle on sample level.
libao-async will adjust the volume of the samples.
This commit is contained in:
17
libao.rkt
17
libao.rkt
@@ -18,6 +18,8 @@
|
||||
ao-bufsize-async
|
||||
ao-clear-async
|
||||
ao-pause
|
||||
ao-set-volume!
|
||||
ao-volume
|
||||
ao-valid?
|
||||
ao-valid-bits?
|
||||
ao-valid-rate?
|
||||
@@ -177,7 +179,20 @@
|
||||
(ffi:ao_bufsize_async (ao-handle-async-player handle))
|
||||
)
|
||||
|
||||
(define (ao-clear-async handle)
|
||||
(rc:define/contract (ao-set-volume! handle percentage)
|
||||
(rc:-> ao-handle? number? void?)
|
||||
(ffi:ao_set_volume_async (ao-handle-async-player handle)
|
||||
(if (integer? percentage)
|
||||
(exact->inexact percentage)
|
||||
percentage))
|
||||
)
|
||||
|
||||
(rc:define/contract (ao-volume handle)
|
||||
(rc:-> ao-handle? number?)
|
||||
(ffi:ao_volume_async (ao-handle-async-player handle))
|
||||
)
|
||||
|
||||
(rc:define/contract (ao-clear-async handle)
|
||||
(rc:-> ao-handle? void?)
|
||||
(ffi:ao_clear_async (ao-handle-async-player handle))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user