Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
google
GitHub Repository: google/crosvm
Path: blob/main/devices/src/virtio/snd/null_backend.rs
5394 views
1
// Copyright 2022 The ChromiumOS Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
use audio_streams::NoopStreamSourceGenerator;
6
7
use crate::virtio::snd::common_backend::SndData;
8
use crate::virtio::snd::sys::SysAudioStreamSourceGenerator;
9
10
pub(crate) fn create_null_stream_source_generators(
11
snd_data: &SndData,
12
) -> Vec<SysAudioStreamSourceGenerator> {
13
let mut generators: Vec<SysAudioStreamSourceGenerator> = Vec::new();
14
generators.resize_with(snd_data.pcm_info_len(), || {
15
Box::new(NoopStreamSourceGenerator::new())
16
});
17
generators
18
}
19
20