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 create_null_stream_source_generators( snd_data: &SndData, ) -> Vec<SysAudioStreamSourceGenerator>10pub(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