Comments (3)
You can also use Mixer::Iter
to get a list of all Elem/Selem. https://docs.rs/alsa/latest/alsa/mixer/struct.Mixer.html#method.iter
from alsa-rs.
Strange: on my hw:1 device (which is not the scarlett), its working:
let c = Card::new(3);
println!("{:#?}", c.get_name());
println!("{:#?}", c.get_index());
println!("{:#?}", c.get_longname());
let mixer: Mixer = Mixer::new("hw:1", false).unwrap();
let sid: SelemId = SelemId::new("Capture", 0);
let selem: Selem = mixer.find_selem(&sid).unwrap();
"thread 'main' panicked at 'called Option::unwrap()
on a None
value', src/main.rs:16:47"
from alsa-rs.
Now i got it on my own:
The code was okay, I recognized that my HW:3 (Scarlett device) has no element with the name "Master". Instead it has e.g. "Line 01 (Monitor L)".
I found the element names inside of alsamixer. Press F6 to change the soundcard.
Thanks anyway!
from alsa-rs.
Related Issues (20)
- Would you consider implementing FromStr or serde for `Format` HOT 1
- supported snd_pcm_set_params API HOT 2
- Update to bitflags 2.0 HOT 2
- Tag off a release? HOT 1
- Support Creating an Hctl from a Ctl via snd_hctl_open_ctl HOT 3
- Contributing HOT 2
- `nix` dependency is out of date
- Can pcm::IO<S> be Send? HOT 3
- Missing lifetime annotation on `RawSamples<S>`? HOT 3
- PCM::direct_mmap_capture errors with ENOTTY on ioctl HOT 5
- test failed in fedora copr HOT 4
- Avoid panic if card gives bad state HOT 12
- Release new version HOT 5
- Please yank 0.5.1 and release as 0.6.0 HOT 5
- Microphone recording example? HOT 4
- missing snd_ctl_elem_read, snd_ctl_elem_write HOT 2
- Alsa 0.6.1 release is not semver compliant HOT 22
- PCM capture to playback and dropouts HOT 2
- `alsa::seq::EventData::get_data` feels unsafe HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alsa-rs.