Changing audio-placed-player to handle audio errors better.
This commit is contained in:
@@ -113,7 +113,10 @@
|
||||
(set! feeding-audio #f)
|
||||
(set! feed-interrupted #f)
|
||||
(set! player-state 'stopped)
|
||||
(evt (list 'exception (exn-message e))))])
|
||||
(let ((code (if (exn:fail:audio? e) (exn:fail:audio-code e) 'no-audio-error)))
|
||||
(state (format "audio-read-worker: exception ~a" code) evt)
|
||||
(evt (list 'exception (exn-message e) code)))
|
||||
)])
|
||||
(dynamic-wind
|
||||
void
|
||||
(λ ()
|
||||
@@ -475,12 +478,10 @@
|
||||
(with-handlers ([exn:fail? (λ (e)
|
||||
(if (eq? ch-evt #f)
|
||||
(raise e)
|
||||
(begin
|
||||
(evt (list 'exception
|
||||
(exn-message e)))
|
||||
(let ((code (if (exn:fail:audio? e) (exn:fail:audio-code e) 'no-audio-error)))
|
||||
(evt (list 'exception (exn-message e) code))
|
||||
(when in-rpc
|
||||
(put (list 'error
|
||||
(exn-message e)))
|
||||
(put (list 'error (exn-message e) code))
|
||||
(set! in-rpc #f))
|
||||
(loop))
|
||||
))])
|
||||
@@ -568,7 +569,7 @@
|
||||
))
|
||||
(else
|
||||
(do-rpc
|
||||
(list 'error (format "Unknown command ~a" cmd))))
|
||||
(list 'error (format "Unknown command ~a" cmd) 'error-unknown-command)))
|
||||
)
|
||||
(loop)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user