use game::constants::PISTOL_AUDIO_PATH;
use rodio;
use rodio::Sink;
use std::fs::File;
use std::io::BufReader;

pub struct CharacterAudio {
  sink: Sink,
}

impl CharacterAudio {
  pub fn new() -> CharacterAudio {
    let endpoint = rodio::default_endpoint().unwrap();
    CharacterAudio {
      sink: Sink::new(&endpoint),
    }
  }

  pub fn play_pistol(&self) {
    if self.sink.empty() {
      let file = File::open(PISTOL_AUDIO_PATH).unwrap();
      let pistol_data = rodio::Decoder::new(BufReader::new(file)).unwrap();
      self.sink.append(pistol_data);
    }
  }
}

use game::constants::PISTOL_AUDIO_PATH;
use rodio;
use rodio::Sink;
use std::fs::File;
use std::io::BufReader;

pub struct CharacterAudio {
  sink: Sink,
}

impl CharacterAudio {
  pub fn new() -> CharacterAudio {
    #[allow(deprecated)]
    let endpoint = rodio::get_default_endpoint().unwrap();
    CharacterAudio {
      sink: Sink::new(&endpoint),
    }
  }

  pub fn play_pistol(&self) {
    if self.sink.empty() {
      let file = File::open(PISTOL_AUDIO_PATH).unwrap();
      let pistol_data = rodio::Decoder::new(BufReader::new(file)).unwrap();
      self.sink.append(pistol_data);
    }
  }
}

--- 
+++ 
@@ -10,8 +10,7 @@
 
 impl CharacterAudio {
   pub fn new() -> CharacterAudio {
-    #[allow(deprecated)]
-    let endpoint = rodio::get_default_endpoint().unwrap();
+    let endpoint = rodio::default_endpoint().unwrap();
     CharacterAudio {
       sink: Sink::new(&endpoint),
     }
Use "default_endpoint" instead of deprecated "get_default_endpoint"