Remove the get_ prefix of methods (#151)
* Remove the `get_` prefix of methods * Fix overlooks
This commit is contained in:
parent
35d9201b85
commit
cdcef96279
4 changed files with 48 additions and 10 deletions
|
|
@ -19,8 +19,8 @@ impl Executor for MyExecutor {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let endpoint = cpal::get_default_endpoint().expect("Failed to get default endpoint");
|
||||
let format = endpoint.get_supported_formats_list().unwrap().next().expect("Failed to get endpoint format");
|
||||
let endpoint = cpal::default_endpoint().expect("Failed to get default endpoint");
|
||||
let format = endpoint.supported_formats().unwrap().next().expect("Failed to get endpoint format");
|
||||
|
||||
let event_loop = cpal::EventLoop::new();
|
||||
let executor = Arc::new(MyExecutor);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
extern crate cpal;
|
||||
|
||||
fn main() {
|
||||
let endpoints = cpal::get_endpoints_list();
|
||||
let endpoints = cpal::endpoints();
|
||||
|
||||
println!("Endpoints: ");
|
||||
for (endpoint_index, endpoint) in endpoints.enumerate() {
|
||||
println!("{}. Endpoint \"{}\" Audio formats: ", endpoint_index + 1, endpoint.get_name());
|
||||
println!("{}. Endpoint \"{}\" Audio formats: ", endpoint_index + 1, endpoint.name());
|
||||
|
||||
let formats = match endpoint.get_supported_formats_list() {
|
||||
let formats = match endpoint.supported_formats() {
|
||||
Ok(f) => f,
|
||||
Err(e) => { println!("Error: {:?}", e); continue; }
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue