sound: rename alloc_audio_backend

This commit is contained in:
Stefano Garzarella 2023-05-19 18:19:47 +02:00
parent 65f7c78dbd
commit a198f48cde
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ pub trait AudioBackend {
fn read(&self, req: &mut SoundRequest) -> Result<()>;
}
pub fn allocate_audio_backend(name: String) -> Result<Box<dyn AudioBackend + Send + Sync>> {
pub fn alloc_audio_backend(name: String) -> Result<Box<dyn AudioBackend + Send + Sync>> {
match name.as_str() {
#[cfg(feature = "null-backend")]
"null" => Ok(Box::new(NullBackend::new())),

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0 or BSD-3-Clause
use crate::audio_backends::{allocate_audio_backend, AudioBackend};
use crate::audio_backends::{alloc_audio_backend, AudioBackend};
use crate::virtio_sound::*;
use crate::{Error, Result, SoundConfig};
@ -111,7 +111,7 @@ impl VhostUserSoundBackend {
])?)]
};
let audio_backend = allocate_audio_backend(config.audio_backend_name)?;
let audio_backend = alloc_audio_backend(config.audio_backend_name)?;
Ok(Self {
threads,