[Gambas-user] Reading the microphone? Playing audio from a socket? VOIP.

Kevin Fishburne kevinfishburne at ...1887...
Fri Jun 17 12:34:30 CEST 2011


On 06/16/2011 08:02 PM, Titan Rain wrote:
> Anyone know of any examples or cases of accessing the soundcard/microphone in gambas? I'm looking to capture output from microphone (and level if possible) and write it to a socket, and read the socket that will have audio data and play it. Push-to-talk style VOIP.
>
> For writing to the socket I've already been looking into shelling something like arecord or pacat. I find arecord uses way too much CPU, but it does seem to be returning the mic data with levels in realtime. Still the CPU is at like 80% when it runs. I can't shoot the cpu that high each time the user pushes the talk button.
>
> Pacat does not seem to return realtime data from the device. It records from a device into a file only, as far as I can tell.
>
> Neither are a preferred solution as end user would need these additional packages and their deps.
>
> Any info on any of the different parts
> 1) reading microphone data/levels
> 2) writing microphone/audio data to a socket
> 3) reading a socket with audio data and playing it
> is great, even if it's maybe just kind of semi related it may help achieve the end goal. Thanks for your time!
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

I will need to do the same thing shortly. For joystick input I've run 
cat and such. Maybe audio I/O is the same? Be aware UDP packets max out 
at 64KB if you plan to transmit the audio that way.

-- 
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sales at ...1887...
phone: (770) 853-6271





More information about the User mailing list