£okì has asked for the wisdom of the Perl Monks concerning the following question:

I'm tring to figure out a way to stream analog input from "line in" on a soundcard. OR, stream it from "waveout." Basically I don't have to parse it in any way as it's just getting dished back out over I/O sockets. However, I can't find any information on what socket I would open or what the heck to do to read audio on the Win32 interface with perl. Ideas? Reading material? Links?

Replies are listed 'Best First'.
Re: Win32 Audio Input
by ghenry (Vicar) on May 13, 2005 at 10:23 UTC

    Hi,

    I've found:

    • Win32::PortIO, which sounds good if I could actually find somewhere to download it.
    • Win32::SoundRec - You could record the sounds, then save them, then stream them.
    • Win32::Sound lets you use Win32::Sound::Devices() too.
    • Just food for thought, that's all.

      HTH,

      Gavin.

      Walking the road to enlightenment... I found a penguin and a camel on the way.....
      Fancy a yourname@perl.me.uk? Just ask!!!
      Win32::PortIO hmmm, I've never even heard of this before. I'll have to take a look. Win32::SoundRec. Unfortunatly that's not an option. I'm rebroadcasting emergency band radio to our chief as he's in a radio blackhole but has internet. Win32::Sound. . Yea. the best I could figure out that devices() would do is give information on them. I can't figure out how to extract actual sound.

        I was thinking that you could grab the sound, save it, then stream it.

        There is an example of streaming MP3 files here.

        Maybe too slow though.

        Walking the road to enlightenment... I found a penguin and a camel on the way.....
        Fancy a yourname@perl.me.uk? Just ask!!!
Re: Win32 Audio Input
by £okì (Scribe) on May 13, 2005 at 19:20 UTC
    Ok, looks like it might be in Win32::API under winmm.dll using WaveIn001 or whatever. . Too bad I don't know how to use Win32::API. I best get cracking on learning. Still any advice is welcome.