[Gajim-devel] Fallback to OSS when no soundplayer found

Zhihao Yuan lichray at gmail.com
Mon Apr 11 23:30:48 CEST 2011


On Mon, Apr 11, 2011 at 3:38 PM, Zhihao Yuan <lichray at gmail.com> wrote:
> On Mon, Apr 11, 2011 at 3:30 PM, Yann Leboulanger <asterix at lagaule.org> wrote:
>> On 04/11/2011 10:22 PM, Zhihao Yuan wrote:
>>>
>>> On Mon, Apr 11, 2011 at 12:02 PM, Zhihao Yuan<lichray at gmail.com>  wrote:
>>>>
>>>> On Mon, Apr 11, 2011 at 12:00 PM, Yann Leboulanger<asterix at lagaule.org>
>>>>  wrote:
>>>>>
>>>>> On 04/11/2011 06:56 PM, Zhihao Yuan wrote:
>>>>>>
>>>>>> On Mon, Apr 11, 2011 at 11:52 AM, Yann Leboulanger<asterix at lagaule.org>
>>>>>>  wrote:
>>>>>>>
>>>>>>> On 04/11/2011 06:41 PM, Zhihao Yuan wrote:
>>>>>>>>
>>>>>>>> How about this? I used thread module instead of threading.
>>>>>>>> Tested, OK.
>>>>>>>>
>>>>>>>
>>>>>>> It must not be the correct file, no thread in this file
>>>>>>
>>>>>> ?
>>>>>>
>>>>>> I did 2 things:
>>>>>> 1. Uses gajim.thread_interface
>>>>>> 2. Make gajim.thread_interface uses thread module instead of
>>>>>> threading, since we don't need the advanced features in threading, and
>>>>>> the thread module is faster.
>>>>>>
>>>>>> Please take a look at my patch in previous email first.
>>>>>
>>>>> In the last mail with a file attached, there is no threading code. You
>>>>> must
>>>>> have attached the wrong file
>>>>
>>>> I'm so sorry!... I used a patch under another path.
>>>
>>> I have tested this patch (attached correctly in my previous email)
>>> under my Archlinux box where `aplay` is not available. Everything
>>> works fine.
>>
>> even if several sounds are played at the same time?
>
> In practical, for the short sounds, it's hard to distinguish mixed
> sound and non-mixed sound. And, the thing is, it's a fallback solution
> -- if it works perfectly on all POSIX-like boxes, we don't need
> external soundplayer then.
>
>>
>> According to http://docs.python.org/library/thread.html#module-thread
>> it seems it's better to use threading module.
>>
>
> The latter one is based on 'thread', providing more features. But
> 'thread' is enough for Gajim project, even in the future, and it's
> faster.

This is not the key problem... If you want to keep using 'threading',
try this patch.

>
> --
> Zhihao Yuan
> The best way to predict the future is to invent it.
>

-- 
Zhihao Yuan
The best way to predict the future is to invent it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-oss-fallback.py.2
Type: application/octet-stream
Size: 1892 bytes
Desc: not available
URL: <http://www.lagaule.org/pipermail/gajim-devel/attachments/20110411/03a473c4/attachment-0001.obj>


More information about the Gajim-devel mailing list