mirror of
https://github.com/RustAudio/rodio
synced 2024-12-13 13:42:34 +00:00
Rename default_endpoint()
to, default_output_device()
, reexport default_input_device()
This commit is contained in:
parent
b912730313
commit
cde47ab970
7 changed files with 10 additions and 10 deletions
|
@ -5,7 +5,7 @@ use std::thread;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let endpoint = rodio::default_endpoint().unwrap();
|
let endpoint = rodio::default_output_device().unwrap();
|
||||||
|
|
||||||
let file = std::fs::File::open("examples/beep.wav").unwrap();
|
let file = std::fs::File::open("examples/beep.wav").unwrap();
|
||||||
let mut beep1 = rodio::play_once(&endpoint, BufReader::new(file)).unwrap();
|
let mut beep1 = rodio::play_once(&endpoint, BufReader::new(file)).unwrap();
|
||||||
|
|
|
@ -3,7 +3,7 @@ extern crate rodio;
|
||||||
use std::io::BufReader;
|
use std::io::BufReader;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let endpoint = rodio::default_endpoint().unwrap();
|
let endpoint = rodio::default_output_device().unwrap();
|
||||||
let sink = rodio::Sink::new(&endpoint);
|
let sink = rodio::Sink::new(&endpoint);
|
||||||
|
|
||||||
let file = std::fs::File::open("examples/music.flac").unwrap();
|
let file = std::fs::File::open("examples/music.flac").unwrap();
|
||||||
|
|
|
@ -3,7 +3,7 @@ extern crate rodio;
|
||||||
use std::io::BufReader;
|
use std::io::BufReader;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let endpoint = rodio::default_endpoint().unwrap();
|
let endpoint = rodio::default_output_device().unwrap();
|
||||||
let sink = rodio::Sink::new(&endpoint);
|
let sink = rodio::Sink::new(&endpoint);
|
||||||
|
|
||||||
let file = std::fs::File::open("examples/music.ogg").unwrap();
|
let file = std::fs::File::open("examples/music.ogg").unwrap();
|
||||||
|
|
|
@ -3,7 +3,7 @@ extern crate rodio;
|
||||||
use std::io::BufReader;
|
use std::io::BufReader;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let endpoint = rodio::default_endpoint().unwrap();
|
let endpoint = rodio::default_output_device().unwrap();
|
||||||
let sink = rodio::Sink::new(&endpoint);
|
let sink = rodio::Sink::new(&endpoint);
|
||||||
|
|
||||||
let file = std::fs::File::open("examples/music.wav").unwrap();
|
let file = std::fs::File::open("examples/music.wav").unwrap();
|
||||||
|
|
|
@ -5,7 +5,7 @@ use std::io::BufReader;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let endpoint = rodio::default_endpoint().unwrap();
|
let endpoint = rodio::default_output_device().unwrap();
|
||||||
let sink = rodio::Sink::new(&endpoint);
|
let sink = rodio::Sink::new(&endpoint);
|
||||||
|
|
||||||
let file = std::fs::File::open("examples/music.ogg").unwrap();
|
let file = std::fs::File::open("examples/music.ogg").unwrap();
|
||||||
|
|
|
@ -5,7 +5,7 @@ use std::thread;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let endpoint = rodio::default_endpoint().unwrap();
|
let endpoint = rodio::default_output_device().unwrap();
|
||||||
let mut sink = rodio::SpatialSink::new(&endpoint,
|
let mut sink = rodio::SpatialSink::new(&endpoint,
|
||||||
[-10.0, 0.0, 0.0],
|
[-10.0, 0.0, 0.0],
|
||||||
[1.0, 0.0, 0.0],
|
[1.0, 0.0, 0.0],
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
//! [decoder](decoder/index.html), etc. or even your own type that implements
|
//! [decoder](decoder/index.html), etc. or even your own type that implements
|
||||||
//! [the `Source` trait](source/trait.Source.html).
|
//! [the `Source` trait](source/trait.Source.html).
|
||||||
//! - Choose an output with the [`endpoints`](fn.endpoints.html) or
|
//! - Choose an output with the [`endpoints`](fn.endpoints.html) or
|
||||||
//! [`default_endpoint`](fn.default_endpoint.html) functions.
|
//! [`default_output_device`](fn.default_output_device.html) functions.
|
||||||
//! - Call [`play_raw(output, source)`](fn.play_raw.html).
|
//! - Call [`play_raw(output, source)`](fn.play_raw.html).
|
||||||
//!
|
//!
|
||||||
//! The `play_raw` function expects the source to produce `f32`s, which may not be the case. If you
|
//! The `play_raw` function expects the source to produce `f32`s, which may not be the case. If you
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
//! use std::io::BufReader;
|
//! use std::io::BufReader;
|
||||||
//! use rodio::Source;
|
//! use rodio::Source;
|
||||||
//!
|
//!
|
||||||
//! let endpoint = rodio::default_endpoint().unwrap();
|
//! let endpoint = rodio::default_output_device().unwrap();
|
||||||
//!
|
//!
|
||||||
//! let file = File::open("sound.ogg").unwrap();
|
//! let file = File::open("sound.ogg").unwrap();
|
||||||
//! let source = rodio::Decoder::new(BufReader::new(file)).unwrap();
|
//! let source = rodio::Decoder::new(BufReader::new(file)).unwrap();
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
//! ```no_run
|
//! ```no_run
|
||||||
//! use rodio::Sink;
|
//! use rodio::Sink;
|
||||||
//!
|
//!
|
||||||
//! let endpoint = rodio::default_endpoint().unwrap();
|
//! let endpoint = rodio::default_output_device().unwrap();
|
||||||
//! let sink = Sink::new(&endpoint);
|
//! let sink = Sink::new(&endpoint);
|
||||||
//!
|
//!
|
||||||
//! // Add a dummy source of the sake of the example.
|
//! // Add a dummy source of the sake of the example.
|
||||||
|
@ -94,7 +94,7 @@ extern crate lazy_static;
|
||||||
extern crate lewton;
|
extern crate lewton;
|
||||||
extern crate cgmath;
|
extern crate cgmath;
|
||||||
|
|
||||||
pub use cpal::{Device, default_endpoint, endpoints, get_default_endpoint, get_endpoints_list};
|
pub use cpal::{Device, default_output_device, default_input_device, endpoints, get_default_endpoint, get_endpoints_list};
|
||||||
|
|
||||||
pub use conversions::Sample;
|
pub use conversions::Sample;
|
||||||
pub use decoder::Decoder;
|
pub use decoder::Decoder;
|
||||||
|
|
Loading…
Reference in a new issue