Remove unused ChannelPosition API (update all backends and examples accordingly) (#198)
* Remove ChannelPosition API This removes the ChannelPosition API from the lib root and updates the ALSA backend and examples accordingly. The other backends have not yet been updated. Related discussion at #187. * Update windows backend to removal of ChannelPosition API The windows backend now assumes the channel position order is equal to the channel position mask order. E.g. channel 0 will always be front left, channel 1 will always be front right, etc. Compiled and ran both examples successfully. * Update coreaudio backend to removal of ChannelPosition API Compiled and ran both examples successfully. * Update emscriptem backend for removal of ChannelPosition API * Update CHANGELOG for ChannelPosition removal
This commit is contained in:
parent
6bf65f589d
commit
f2728f6bdf
8 changed files with 45 additions and 172 deletions
27
src/lib.rs
27
src/lib.rs
|
|
@ -240,29 +240,6 @@ impl Endpoint {
|
|||
/// Number of channels.
|
||||
pub type ChannelsCount = u16;
|
||||
|
||||
/// Possible position of a channel.
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub enum ChannelPosition {
|
||||
FrontLeft,
|
||||
FrontRight,
|
||||
FrontCenter,
|
||||
LowFrequency,
|
||||
BackLeft,
|
||||
BackRight,
|
||||
FrontLeftOfCenter,
|
||||
FrontRightOfCenter,
|
||||
BackCenter,
|
||||
SideLeft,
|
||||
SideRight,
|
||||
TopCenter,
|
||||
TopFrontLeft,
|
||||
TopFrontCenter,
|
||||
TopFrontRight,
|
||||
TopBackLeft,
|
||||
TopBackCenter,
|
||||
TopBackRight,
|
||||
}
|
||||
|
||||
///
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub struct SamplesRate(pub u32);
|
||||
|
|
@ -270,7 +247,7 @@ pub struct SamplesRate(pub u32);
|
|||
/// Describes a format.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Format {
|
||||
pub channels: Vec<ChannelPosition>,
|
||||
pub channels: ChannelsCount,
|
||||
pub samples_rate: SamplesRate,
|
||||
pub data_type: SampleFormat,
|
||||
}
|
||||
|
|
@ -297,7 +274,7 @@ impl Iterator for SupportedFormatsIterator {
|
|||
/// Describes a range of supported formats.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct SupportedFormat {
|
||||
pub channels: Vec<ChannelPosition>,
|
||||
pub channels: ChannelsCount,
|
||||
/// Minimum value for the samples rate of the supported formats.
|
||||
pub min_samples_rate: SamplesRate,
|
||||
/// Maximum value for the samples rate of the supported formats.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue