Skip to content

Commit

Permalink
minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thekr1s committed Feb 4, 2018
1 parent 63755aa commit b03430a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/audio_backend/alsa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ impl Open for AlsaSink {

impl Sink for AlsaSink {
fn start(&mut self) -> io::Result<()> {
if self.0.is_some() {
} else {
if self.0.is_none() {
match PCM::open(&*self.1,
Stream::Playback, Mode::Blocking,
Format::Signed16, Access::Interleaved,
2, 44100) {
Ok(f) => self.0 = Some(f),
Err(e) => {
self.0 = None;
error!("Alsa error PCM open {}", e);
return Err(io::Error::new(io::ErrorKind::Other, "Alsa error: PCM open failed"));
}
Expand Down

0 comments on commit b03430a

Please sign in to comment.