[AG-TECH] Is possible modify AudioService to Select an audio device?

Jason Bell j.bell at cqu.edu.au
Tue Jun 1 18:41:19 CDT 2010


I think being able to select the Audio device within Rat would be useful.  (I will let the developers comment on this one)...

But, there is a work around...  If you select the device in rat that you want, and click on the "Quit" button on rat (which will close the application down), it will actually save the device you selected and will use this device for now on.  Therefore, if you change the device or any preference settings, by manually "Quiting" rat, these changes will be saved.

I hope this helps.


From: ag-tech-bounces at lists.mcs.anl.gov [mailto:ag-tech-bounces at lists.mcs.anl.gov] On Behalf Of Jesus Cea Oliva
Sent: Wednesday, 2 June 2010 02:01 AM
To: ag-tech at mcs.anl.gov
Subject: [AG-TECH] Is possible modify AudioService to Select an audio device?

Hi, list. Today, I found a interesting "need". We have installed a Access Grid client on a normal machine where the audio is a external multifunctional microphone (concretly, a Yamaha PJP-25EUR: http://www.gizmos.es/1828/audio-portatil/yamaha-pjp-25ur-microfono-multidireccional/), this has a speaker and a set of microphones and, usualy, it is used for Meetings Venues, etc.

Audio on Access Grid, works fine, but, I have to modify RAT to select the audio device (in audio tab), because, by default, the audio device selected is the sound card. On audio tab, I can select the default audio device to use on RAT... so, I think that is interesting add an aditional option to AudioService to select the audio device prefered.

I already modify the AudioService code tu add a new option, adding to the end of __init__ function the next lines:

self.audioDevice = OptionSetParameter( "Audio device:", audioDefault, self.listAudio)

Where, self.listAudio is a list where I want to store the differents audio devices that has the system. And here is my doubt, how can I obtain the audio devices installed on my system, like RAT show me? I thought to modify RAT to permit storage the configuration, or see the code to see how RAT does it, but I think that RAT is a compiled program (C or C++), right? I saw the "aplay -L" and "aplay -l" commands, but I don't know if with this commands I can do something (I don't, for example, if RAT detect the audio names that this commands show me).

I know that I can modify the .RATdefault file to permanently save the configuration.  But I think that I'm going to see this in the future and I thought that is interesting save the config with AudioService like Gains, etc. I add this lines too on AudioService.py on WriteRatDefaults function:

ratDefaults["*audioDevice"] = str(self.audioDevice.value )

To save, the selected audio in AudioService window, to the .RATdefault file.

Sorry, as usual, for my bad English.

Thanks and Regards!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/ag-tech/attachments/20100602/3d7273d2/attachment.htm>

More information about the ag-tech mailing list