Refactor Host and related traits into a new traits module

This is a draft implementation of #294. I'll leave this open for
feedback and potentially better trait naming suggestions or better
solutions in general!

cc @ishitatsuyuki
This commit is contained in:
mitchmindtree 2019-06-28 23:42:07 +02:00
parent 36dee482bd
commit 5e4f384992
12 changed files with 225 additions and 219 deletions

View file

@ -6,7 +6,7 @@ extern crate cpal;
extern crate failure;
extern crate hound;
use cpal::{Device, EventLoop, Host};
use cpal::traits::{DeviceTrait, EventLoopTrait, HostTrait};
fn main() -> Result<(), failure::Error> {
// Use the default host for working with audio devices.