January 2018
Beginner to intermediate
454 pages
10h 8m
English
Let's add the following to Cargo.toml:
crossbeam = "^0.3.0" pulse-simple = "^1.0.0" simplemad = "^0.8.1"
We also added the pulse-simple and crossbeam crates because we'll need them later. The former will be used to play the songs with pulseaudio and the latter will be used to implement the event loop of the music player engine.
We also need to add the following statements in main.rs:
extern crate crossbeam; extern crate pulse_simple; extern crate simplemad; mod mp3;
In addition to the extern crate statements, we have a mod statement since we'll create a new module for the MP3 decoder.