mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
Revert "Add StreamEffect to new(_async)_capture_stream"
This reverts commit 79d6696394
.
Reason for revert: The change made it through to ChromeOS builds
because the audio_streams ebuild is not manually upreved yet. Re-submit after https://crrev.com/c/3192217 is landed.
Original change's description:
> Add StreamEffect to new(_async)_capture_stream
>
> It is needed to support AEC in virtio-snd (cras backend)
>
> BUG=b:201472965
> TEST=cargo test
>
> Change-Id: If79eee8a41d1da7e6d643e8187bbc75768f31ad9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3193841
> Reviewed-by: Judy Hsiao <judyhsiao@google.com>
> Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
> Commit-Queue: Dennis Kempin <denniskempin@google.com>
> Tested-by: kokoro <noreply+kokoro@google.com>
Bug: b:201472965
Change-Id: Ib68978ea148ae3598109a779e620377f7f1f9d94
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3200179
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
parent
71aca792b3
commit
be3443cd10
3 changed files with 4 additions and 7 deletions
|
@ -174,7 +174,6 @@ pub trait StreamSource: Send {
|
|||
format: SampleFormat,
|
||||
frame_rate: u32,
|
||||
buffer_size: usize,
|
||||
_effects: &[StreamEffect],
|
||||
) -> Result<
|
||||
(
|
||||
Box<dyn StreamControl>,
|
||||
|
@ -203,7 +202,6 @@ pub trait StreamSource: Send {
|
|||
format: SampleFormat,
|
||||
frame_rate: u32,
|
||||
buffer_size: usize,
|
||||
_effects: &[StreamEffect],
|
||||
_ex: &Executor,
|
||||
) -> Result<
|
||||
(
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
//! let frame_size = num_channels * sample_format.sample_bytes();
|
||||
//!
|
||||
//! let (_, mut stream) = stream_source
|
||||
//! .new_capture_stream(num_channels, sample_format, 48000, buffer_size, &[])?;
|
||||
//! .new_capture_stream(num_channels, sample_format, 48000, buffer_size)?;
|
||||
//! // Capture 10 buffers of zeros.
|
||||
//! let mut buf = Vec::new();
|
||||
//! buf.resize(buffer_size * frame_size, 0xa5u8);
|
||||
|
@ -343,7 +343,7 @@ mod tests {
|
|||
fn sixteen_bit_stereo() {
|
||||
let mut server = NoopStreamSource::new();
|
||||
let (_, mut stream) = server
|
||||
.new_capture_stream(2, SampleFormat::S16LE, 48000, 480, &[])
|
||||
.new_capture_stream(2, SampleFormat::S16LE, 48000, 480)
|
||||
.unwrap();
|
||||
let mut copy_func = |b: &mut CaptureBuffer| {
|
||||
assert_eq!(b.buffer.frame_capacity(), 480);
|
||||
|
@ -358,7 +358,7 @@ mod tests {
|
|||
fn consumption_rate() {
|
||||
let mut server = NoopStreamSource::new();
|
||||
let (_, mut stream) = server
|
||||
.new_capture_stream(2, SampleFormat::S16LE, 48000, 480, &[])
|
||||
.new_capture_stream(2, SampleFormat::S16LE, 48000, 480)
|
||||
.unwrap();
|
||||
let start = Instant::now();
|
||||
{
|
||||
|
@ -420,7 +420,7 @@ mod tests {
|
|||
async fn this_test(ex: &Executor) {
|
||||
let mut server = NoopStreamSource::new();
|
||||
let (_, mut stream) = server
|
||||
.new_async_capture_stream(2, SampleFormat::S16LE, 48000, 480, &[], ex)
|
||||
.new_async_capture_stream(2, SampleFormat::S16LE, 48000, 480, ex)
|
||||
.unwrap();
|
||||
let start = Instant::now();
|
||||
{
|
||||
|
|
|
@ -285,7 +285,6 @@ impl<'a> StreamInfo<'a> {
|
|||
self.frame_rate,
|
||||
// See (*)
|
||||
self.period_bytes / frame_size,
|
||||
&[],
|
||||
&ex,
|
||||
)
|
||||
.map_err(Error::CreateStream)?
|
||||
|
|
Loading…
Reference in a new issue