mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
ac97: Uses audio_streams::BoxError
audio_streams export BoxError which can be passed between threads. Adopts the API change accordingly. BUG=b:149437381 TEST=emerge-{BOARD} crosvm Cq-Depend: chromium:2215772 Change-Id: I524e9d7ab3c16b7b6d3714187f166dce72d243cb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2214971 Tested-by: Judy Hsiao <judyhsiao@chromium.org> Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org> Commit-Queue: Judy Hsiao <judyhsiao@chromium.org>
This commit is contained in:
parent
c14eeae481
commit
04a2881b03
1 changed files with 4 additions and 4 deletions
|
@ -15,7 +15,7 @@ use std::time::{Duration, Instant};
|
|||
|
||||
use audio_streams::{
|
||||
shm_streams::{ShmStream, ShmStreamSource},
|
||||
DummyStreamControl, SampleFormat, StreamControl, StreamDirection, StreamEffect,
|
||||
BoxError, DummyStreamControl, SampleFormat, StreamControl, StreamDirection, StreamEffect,
|
||||
};
|
||||
use sync::{Condvar, Mutex};
|
||||
use sys_util::{
|
||||
|
@ -105,7 +105,7 @@ type GuestMemoryResult<T> = std::result::Result<T, GuestMemoryError>;
|
|||
#[derive(Debug)]
|
||||
enum AudioError {
|
||||
// Failed to create a new stream.
|
||||
CreateStream(Box<dyn Error>),
|
||||
CreateStream(BoxError),
|
||||
// Invalid buffer offset received from the audio server.
|
||||
InvalidBufferOffset,
|
||||
// Guest did not provide a buffer when needed.
|
||||
|
@ -113,9 +113,9 @@ enum AudioError {
|
|||
// Failure to read guest memory.
|
||||
ReadingGuestError(GuestMemoryError),
|
||||
// Failure to respond to the ServerRequest.
|
||||
RespondRequest(Box<dyn Error>),
|
||||
RespondRequest(BoxError),
|
||||
// Failure to wait for a request from the stream.
|
||||
WaitForAction(Box<dyn Error>),
|
||||
WaitForAction(BoxError),
|
||||
}
|
||||
|
||||
impl std::error::Error for AudioError {}
|
||||
|
|
Loading…
Reference in a new issue