Re: ALSA and JavaSound

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Joshua
When I run my application on Windows it uses DirectSound and DirectSound 
does software mixing as well, but is,even with its poor performance, 
considerably faster than Java software mixing. So I assumed that ALSA 
would perform better than Java software mixing.
I have to admit that I am a bit surprised about ALSA. I have a good 
sound card (M-Audio Delta 1010LT) which should do hardware mixing, but 
when used on Linux with ALSA it does not allow me to used more than one 
DataLine and so seems to not provide mixing.
On Linux there is unfortunately not much else to use than ALSA when 
using Java.
Maybe I should try Java software mixing and aoss, I only tried it on 
Windows and there performance was very poor.

Lars

Joshua Smith wrote:
> The "poor performance" is because its a software mixer, not because 
> it's Java.  It totally sucks compared with hardware mixing, but I'd be 
> very surprised if an ALSA software mixer gave any different performance.
>
> I have to profess ignorance about exactly what AOSS does.  All I know 
> is that with it, Java behaves well, and without it Java behaves badly 
> (on some hardware, at least).
>
> My understanding of things, which could be grossly inaccurate, is that 
> aoss is a compatibility layer that translates OSS calls into their 
> ALSA equivalents.
>
> -Joshua
>
> On Nov 17, 2008, at 12:44 PM, Lars Schnoor wrote:
>
>> Hi Joshua
>> Thank you for your reply, but I tried Javas software mixer and it gives
>> me extremely poor performance. I am working on an voice application and
>> the latency of Javas software mixer is just unbearable. Wouldn't
>> starting Java with aoss cause it to use OSS instead of ALSA, is that
>> really what I want?
>>
>> Lars
>>
>> Joshua Smith wrote:
>>> For the most compatibility, I would recommend that you tell Java to
>>> use its own software headspace mixer:
>>>
>>>        Mixer.Info [] mixerInfo = AudioSystem.getMixerInfo();
>>>        Mixer.Info useMixer = null;
>>>        for (int i=0;i<mixerInfo.length;++i)
>>>            if (mixerInfo[i].getName().startsWith("Java Sound"))
>>>                useMixer = mixerInfo[i];
>>>
>>> The latency sucks, but it is quite reliable cross-platform.
>>>
>>> Then, in Linux, make sure you use "aoss" to launch Java.
>>>
>>> -Joshua
>>>
>>> On Nov 17, 2008, at 3:51 AM, Lars Schnoor wrote:
>>>
>>>> Hi everyone
>>>> I am using JavaSound on Linux where it as a default uses ALSA. I tried
>>>> to figure out how to configure ALSA with respect to JavaSound, but
>>>> couldn't find anything. I read that ALSA can, if the sound card 
>>>> hardware
>>>> does not support it, do mixing in software. How can I configure 
>>>> ALSA for
>>>> this and it would also be great if someone could tell me how to 
>>>> split a
>>>> multi-channel sound card into separate mono or stereo devices in
>>>> JavaSound.
>>>> Thanks in advance!
>>>>
>>>> Lars
>>>>
>>>> ------------------------------------------------------------------------- 
>>>>
>>>>
>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>>> challenge
>>>> Build the coolest Linux based applications with Moblin SDK & win
>>>> great prizes
>>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>>> world
>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>> _______________________________________________
>>>> Alsa-user mailing list
>>>> Alsa-user@xxxxxxxxxxxxxxxxxxxxx
>>>> https://lists.sourceforge.net/lists/listinfo/alsa-user
>>>>
>>>
>>
>>
>> ------------------------------------------------------------------------- 
>>
>> This SF.Net email is sponsored by the Moblin Your Move Developer's 
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win 
>> great prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the 
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Alsa-user mailing list
>> Alsa-user@xxxxxxxxxxxxxxxxxxxxx
>> https://lists.sourceforge.net/lists/listinfo/alsa-user
>>
>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux