Add #[inline] attributes
This commit is contained in:
parent
6ecc5f5078
commit
75f828b04f
9 changed files with 59 additions and 0 deletions
|
|
@ -12,11 +12,13 @@ pub struct EndpointsIterator;
|
|||
impl Iterator for EndpointsIterator {
|
||||
type Item = Endpoint;
|
||||
|
||||
#[inline]
|
||||
fn next(&mut self) -> Option<Endpoint> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_default_endpoint() -> Option<Endpoint> {
|
||||
None
|
||||
}
|
||||
|
|
@ -25,6 +27,7 @@ pub fn get_default_endpoint() -> Option<Endpoint> {
|
|||
pub struct Endpoint;
|
||||
|
||||
impl Endpoint {
|
||||
#[inline]
|
||||
pub fn get_supported_formats_list(&self)
|
||||
-> Result<SupportedFormatsIterator, FormatsEnumerationError>
|
||||
{
|
||||
|
|
@ -37,6 +40,7 @@ pub struct SupportedFormatsIterator;
|
|||
impl Iterator for SupportedFormatsIterator {
|
||||
type Item = Format;
|
||||
|
||||
#[inline]
|
||||
fn next(&mut self) -> Option<Format> {
|
||||
None
|
||||
}
|
||||
|
|
@ -45,29 +49,36 @@ impl Iterator for SupportedFormatsIterator {
|
|||
pub struct Voice;
|
||||
|
||||
impl Voice {
|
||||
#[inline]
|
||||
pub fn new(_: &Endpoint, _: &Format) -> Result<Voice, CreationError> {
|
||||
Err(CreationError::DeviceNotAvailable)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_channels(&self) -> ::ChannelsCount {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_samples_rate(&self) -> ::SamplesRate {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_samples_format(&self) -> ::SampleFormat {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn append_data<'a, T>(&'a mut self, _: usize) -> Buffer<'a, T> {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn play(&mut self) {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn pause(&mut self) {
|
||||
}
|
||||
}
|
||||
|
|
@ -77,14 +88,17 @@ pub struct Buffer<'a, T: 'a> {
|
|||
}
|
||||
|
||||
impl<'a, T> Buffer<'a, T> {
|
||||
#[inline]
|
||||
pub fn get_buffer<'b>(&'b mut self) -> &'b mut [T] {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn len(&self) -> usize {
|
||||
0
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn finish(self) {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue