Add endpoint::get_name() and an enumerate example
This commit is contained in:
parent
8f11173256
commit
ec48453b6f
5 changed files with 23 additions and 1 deletions
|
|
@ -8,9 +8,10 @@ fn main() {
|
|||
println!("Endpoints: ");
|
||||
for (endpoint_index, endpoint) in endpoints.enumerate() {
|
||||
println!("{}. Endpoint \"{}\" Audio formats: ", endpoint_index + 1, endpoint.get_name());
|
||||
|
||||
let formats = endpoint.get_supported_formats_list().unwrap();
|
||||
for (format_index, format) in formats.enumerate() {
|
||||
println!("{}.{}. {:?}", endpoint_index+1, format_index+1, format);
|
||||
println!("{}.{}. {:?}", endpoint_index + 1, format_index + 1, format);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue