Microphone support

Hello,

I am looking to include microphone support into pygame (the python SDL binding).

Is there anything towards this done already?

I want to make it work with at least windows, linux OSS+alsa, and MacOSX.

Any pointers to existing code would be helpful.

Cheers.

Check these threads:

http://www.google.com/search?q="jim+henson"+%2Bsite%3Alibsdl.org&ie=UTF-8&oe=UTF-8

e.g.:

[SDL] Patch for SDL audio recording
http://www.libsdl.org/pipermail/sdl/2002-April/044183.htmlOn Tue, May 02, 2006 at 09:22:59AM +1000, Rene Dudfield wrote:

Hello,

I am looking to include microphone support into pygame (the python SDL binding).

Is there anything towards this done already?


-bill!
bill at newbreedsoftware.com
http://www.newbreedsoftware.com/

Check these threads:

http://www.google.com/search?q="jim+henson"+%2Bsite%3Alibsdl.org&ie=UTF-8&oe=UTF-8

e.g.:

[SDL] Patch for SDL audio recording
http://www.libsdl.org/pipermail/sdl/2002-April/044183.html

I’ve added this to bugzilla, BTW:
https://bugzilla.libsdl.org/show_bug.cgi?id=214

See ya!
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

I’ve added this to bugzilla, BTW:
https://bugzilla.libsdl.org/show_bug.cgi?id=214

Whoops, there was already another patch in there:
https://bugzilla.libsdl.org/show_bug.cgi?id=10

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Great. Which of the apis is prefered?

I guess everyone would like source compatibility, and for it to go
into sdl 1.2. At a glance that api is ok, so I see no reason in
losing binary/source compatibility if we don’t need to.

If someone picks a patch to go forward with, I’ll try add win32 audio
recording. Which would give us more understanding of the api to make
sure that different ones can be used. I should be able to do an alsa
version after that too.

What else would need to be done for it to get into SDL?

Cheers.On 5/4/06, Sam Lantinga wrote:

I’ve added this to bugzilla, BTW:
https://bugzilla.libsdl.org/show_bug.cgi?id=214

Whoops, there was already another patch in there:
https://bugzilla.libsdl.org/show_bug.cgi?id=10

    -Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Great. Which of the apis is prefered?

I think that if you have to associate the input device with the output
device, someone’s going to complain that they want their game to run on
their bitchin’ 5.1 setup, and have a USB microphone headset handle the
input. Or someone will want to record input but doesn’t plan to output
anything.

The API in Bug #10 seems reasonable, and doesn’t really rely on an
output device other than saying it does, so I think it’s a fair
limitation to remove.

I guess everyone would like source compatibility, and for it to go
into sdl 1.2. At a glance that api is ok, so I see no reason in
losing binary/source compatibility if we don’t need to.

I say 1.3-only, personally…but I also think Torsten is right, we
should start considering 1.2 for bugfixes only. Others might disagree.

–ryan.

Check these threads:

http://www.google.com/search?q="jim+henson"+%2Bsite%3Alibsdl.org&ie=UTF-8&oe=UTF-8

e.g.:

[SDL] Patch for SDL audio recording
http://www.libsdl.org/pipermail/sdl/2002-April/044183.html

I’ve added this to bugzilla, BTW:
https://bugzilla.libsdl.org/show_bug.cgi?id=214

See ya!
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Has anyone update the documentation to reflect this change?

I’m starting to feel like a real nag, but when code like this is added
to SDL the patch writer should go update the wiki to reflect the
change. The main purpose of the documentation isn’t actually to document
the functionality, it is to ADVERTISE it. When the documentation is
there someone who searches for the recording API has a chance to find
it. Without the documentation they have no chance to find it.

Not, nagging at you Sam, I am nagging the whole mailing list.

Your Truly, the Documentation Nag,

	Bob PendletonOn Wed, 2006-05-03 at 21:44 -0700, Sam Lantinga wrote:

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


±-------------------------------------+

I’ve added this to bugzilla, BTW:
https://bugzilla.libsdl.org/show_bug.cgi?id=214

Whoops, there was already another patch in there:
https://bugzilla.libsdl.org/show_bug.cgi?id=10

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Even Sam gets bitten by the lack of documentation. Not to mention that
two people have now written this code. One of them may have wasted a lot
of time doing something that had already been done. He could have spent
his time making the existing code better or fixing a different problem
with SDL.

Code is not complete until it is documented and ADVERTISED. People have
to be able to find out is exists and find out how to use it.

	The Documentation Nag,

		Bob PendletonOn Wed, 2006-05-03 at 21:49 -0700, Sam Lantinga wrote:

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


±-------------------------------------+

Has anyone update the documentation to reflect this change?

What change?

No audio input patch has been added to subversion yet.

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Has anyone update the documentation to reflect this change?

What change?

No audio input patch has been added to subversion yet.

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

The trouble with being a nag is that sometimes you get caught nagging
about something that hasn’t happened.

	Bob PendletonOn Thu, 2006-05-04 at 09:57 -0700, Sam Lantinga wrote:

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


±-------------------------------------+

Cool.

I’m going to start playing with the newer #10 patch.On 5/5/06, Ryan C. Gordon wrote:

Great. Which of the apis is prefered?

I think that if you have to associate the input device with the output
device, someone’s going to complain that they want their game to run on
their bitchin’ 5.1 setup, and have a USB microphone headset handle the
input. Or someone will want to record input but doesn’t plan to output
anything.

The API in Bug #10 seems reasonable, and doesn’t really rely on an
output device other than saying it does, so I think it’s a fair
limitation to remove.

I guess everyone would like source compatibility, and for it to go
into sdl 1.2. At a glance that api is ok, so I see no reason in
losing binary/source compatibility if we don’t need to.

I say 1.3-only, personally…but I also think Torsten is right, we
should start considering 1.2 for bugfixes only. Others might disagree.

–ryan.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

All,
Found the post below in SDL mailinglist, can anyone tell me what the state of play is regarding the audio in patch?
I have tested patch#10 successfully and seems to work quite well - althought can’t get it to accept mono.
Need to make it work under win32 too, is this supported?
Regards,
-Chris DobbsOn Wed, 2006-05-03 at 21:49 -0700, Sam Lantinga wrote:

I’ve added this to bugzilla, BTW:
https://bugzilla.libsdl.org/show_bug.cgi?id=214

Whoops, there was already another patch in there:
https://bugzilla.libsdl.org/show_bug.cgi?id=10

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Even Sam gets bitten by the lack of documentation. Not to mention that
two people have now written this code. One of them may have wasted a lot
of time doing something that had already been done. He could have spent
his time making the existing code better or fixing a different problem
with SDL.

Code is not complete until it is documented and ADVERTISED. People have
to be able to find out is exists and find out how to use it.

	The Documentation Nag,

		Bob Pendleton

All,
When I use the microphone patch #10 (
https://bugzilla.libsdl.org/show_bug.cgi?id=10
https://bugzilla.libsdl.org/show_bug.cgi?id=10 ) everything works fine
in 2 channel mode; however if I open the sound device in mono I get the
following error msg:

Audio read: Invalid argument

This is coming from the function:
DSP_ReadAudio()

Is it simply that the microphone cannot operate in mono and thus the
audio device must be opened in stereo ?
-Chris________________________________

From: sdl-bounces+chris.2.dobbs=bt.com@libsdl.org
[mailto:sdl-bounces+chris.2.dobbs=bt.com at libsdl.org] On Behalf Of Chris
Dobbs
Sent: 16 June 2006 17:13
To: sdl at libsdl.org
Subject: [SDL] Documentation, was Re: microphone support

All,
Found the post below in SDL mailinglist, can anyone tell me what the
state of play is regarding the audio in patch?
I have tested patch#10 successfully and seems to work quite well -
althought can’t get it to accept mono.
Need to make it work under win32 too, is this supported?
Regards,
-Chris Dobbs

On Wed, 2006-05-03 at 21:49 -0700, Sam Lantinga wrote:

I’ve added this to bugzilla, BTW:
https://bugzilla.libsdl.org/show_bug.cgi?id=214

Whoops, there was already another patch in there:
https://bugzilla.libsdl.org/show_bug.cgi?id=10

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Even Sam gets bitten by the lack of documentation. Not to mention that
two people have now written this code. One of them may have wasted a lot
of time doing something that had already been done. He could have spent
his time making the existing code better or fixing a different problem
with SDL.

Code is not complete until it is documented and ADVERTISED. People have
to be able to find out is exists and find out how to use it.

	The Documentation Nag,

		Bob Pendleton

Hi,
I am trying to get in touch with Tyler Montbriand who I believe supplied the patch (see previous email below) to allow SDL to access the microphone.
I have just finished implementing his patch using SDL12- it works great on linux but I really need to cross-compile to run under (yuk)win32 - really want ot know if he has started anything that I could use as I am considering looking at adding this myself if not - The project I am working on is a cross-platform VoIP API and I really want to use SDL as it cut’s down on huge amounts of nasty win32 directx sound #ifdef’s.
Any help is appreciated,
-Chris----- Original Message -----
From: Chris Dobbs
To: sdl at libsdl.org
Sent: Friday, June 16, 2006 5:12 PM
Subject: [SDL] Documentation, was Re: microphone support

All,
Found the post below in SDL mailinglist, can anyone tell me what the state of play is regarding the audio in patch?
I have tested patch#10 successfully and seems to work quite well - althought can’t get it to accept mono.
Need to make it work under win32 too, is this supported?
Regards,
-Chris Dobbs

On Wed, 2006-05-03 at 21:49 -0700, Sam Lantinga wrote:

I’ve added this to bugzilla, BTW:
https://bugzilla.libsdl.org/show_bug.cgi?id=214

Whoops, there was already another patch in there:
https://bugzilla.libsdl.org/show_bug.cgi?id=10

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Even Sam gets bitten by the lack of documentation. Not to mention that
two people have now written this code. One of them may have wasted a lot
of time doing something that had already been done. He could have spent
his time making the existing code better or fixing a different problem
with SDL.

Code is not complete until it is documented and ADVERTISED. People have
to be able to find out is exists and find out how to use it.

	The Documentation Nag,

		Bob Pendleton