Shlomi Fish <shlo...@shlomifish.org> writes: > hi Martin, > you can try using an FFI, eg: > > https://metacpan.org/dist/Inline-C/view/lib/Inline/C.pod > > https://metacpan.org/dist/Inline-Python/view/Python.pod > > https://metacpan.org/pod/FFI::Platypus
Many thanks. I am glad I asked the question but it has taken me some time to digest your answer as I wasn't familiar with the term FFI so, after exercising duckduckgo, I now know those letters stand for Foreign Function Interface which makes perfect sense based on what needs to be done. Unfortunately, FFI's are usually used by higher-level languages to take advantage of the capabilities found in lower-level languages such as C which is closer to assembler and can efficiently access the hardware such as an audio or video device. I was hoping there might be a perl module like a fictional one I will call Device::ALSA which would understand the syntax used in capturing audio from a microphone or line input, like a microphone input, only not as sensitive, where one customarily feeds sound from the output of whatever one is recording from. There are standard alsa conventions for setting sample rate and other parameters which I mentioned in the earlier posting so if one knows what sort of digital stream they nead, they just stuff those values in to the function whose output is that stream of digital data. What you do with those data is up to you but the module takes care of getting the bits from the hardware or sending the bits to your speakers or headphones and would also support the alsa plugins which are used by the arecord and aplay utilities for added capabilities. I can understand why there is no perl module like Device::alsa because it would not be portable between Windows and Linus. The l in alsa is for Linux so basically, I was just curious to see if anything like Device::ALSA existed and it apparently does not exist. Anyway, the FFI concept will probably someday come in handy for a different project so I will continue with the C I was working on. Thanks again. Martin -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/