From: ts Date: 2008-03-28T00:54:49+09:00 Subject: Re: accessing mixer values ruud wrote: > I want to read the volume of the mixer device with a ruby script. > Can anybody tell me what the ruby equivalent is of what the MIXER_READ > macro does in C? I'm sure that you'll happy to know that, on linux, MIXER_READ(dev) do this (((2U) << (((0 +8)+8)+14)) | ((('M')) << (0 +8)) | (((dev)) << 0) | (((((sizeof(int) == sizeof(int[1]) && sizeof(int) < (1 << 14)) ? sizeof(int) : __invalid_size_argument_for_IOC))) << ((0 +8)+8))) :-) > I've been googling with keywords like 'ioctl, MIXER_READ SOUND_MIXER', > but with little result. Hopefully someone can me push me in the right > direction... perhaps best if you use Ruby::Inline to access it http://rubyforge.org/projects/rubyinline/ Guy Decoux