Hardware Access using Ruby?

If I need to read the audio signal from the microphone input port or
from some PCI cards on a Windows PC using Ruby, do I have to write my
own hardware drivers? Or there is existing programs/libraries I can
use? Can I use the native Windows APIs to do it? Can anyone please
point to me any resources on these topics that I can refer to? Thanks
a lot!