Re: [Alsa-user] ALSA and JavaSound
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;imixerInfo.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=100url=/ ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net 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=100url=/ ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ALSA and JavaSound
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;imixerInfo.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=100url=/ ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net 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=100url=/ ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ALSA and JavaSound
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;imixerInfo.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=100url=/ ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net 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=100url=/ ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net 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=100url=/ ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ALSA and JavaSound
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;imixerInfo.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=100url=/ ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net 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=100url=/ ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net 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=100url=/ ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ALSA and JavaSound
First of all bear in mind that by some strange reason, Sun's Java doesn't use the default card with alsa but hw:0,0, that's why you must use aoss son java uses oss and interfaces with the alsa card. Os course, that isn't much of a problem if you use openJDK Also you should bear in mind that AFAIK oss doen't support mixing, so you will probably need to use the Java software mixer (or implement your own, that's your choice) to solve the problem. Anyway, as my experience with some Java apps has showed me, the Java Mixer has also a lot of latency in Linux. Having those things into account, you should make your decission on the matter. - 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=100url=/ ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ALSA and JavaSound
I thought I had read something about hardware mixing for the M-Audio Delta card. Would you have an example of how to activate mixing with dmix so that Java Sound accepts it? Lars Jaroslav Kysela wrote: On Mon, 17 Nov 2008, Lars Schnoor wrote: 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 It's not true. Envy based cards do not support hardware mixing on PCM streams from applications. They support only digital matrix mixer for all inputs / outputs. You may try to use ALSA dmix devices (software mixing in alsa-lib). Jaroslav - Jaroslav Kysela [EMAIL PROTECTED] Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc. - 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=100url=/___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ALSA and JavaSound
Java allows for multiple sound cards to be used. If I install multiple sound cards I can in Java Sound select which one I want to use for input and output. Java Sound on Linux does also allow for sound cards with multiple inputs and outputs. I have a M-Audio Delta 1010LT installed with 8 analog inputs and 8 analog outputs. The problem is that ALSA and JavaSound only allow me to open one DataLine, but this one DataLine can have up to, I think ,10 input channels and 12 output channels (besides the analog inputs and outputs there are digital inputs and outputs). What I however would like would be to have 8 separate mono devices instead of one multichannel device. On the Java Sound Resources page one of the administrators writes that a multichannel sound card can be spilt using the ALSA configuration files. I tried to ask how this could be done, but no one answered. My tests with a single stereo sound card showed that ALSA on Linux performs better than DirectSound on Windows. klondike wrote: First of all bear in mind that by some strange reason, Sun's Java doesn't use the default card with alsa but hw:0,0, that's why you must use aoss son java uses oss and interfaces with the alsa card. Os course, that isn't much of a problem if you use openJDK Also you should bear in mind that AFAIK oss doen't support mixing, so you will probably need to use the Java software mixer (or implement your own, that's your choice) to solve the problem. Anyway, as my experience with some Java apps has showed me, the Java Mixer has also a lot of latency in Linux. Having those things into account, you should make your decission on the matter. - 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=100url=/ ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] ALSA and JavaSound
http://www.razorsedge.org/~mike/docs/asoundrc.html Perhaps? On Nov 17, 2008, at 5:17 PM, Lars Schnoor wrote: I thought I had read something about hardware mixing for the M-Audio Delta card. Would you have an example of how to activate mixing with dmix so that Java Sound accepts it? Lars Jaroslav Kysela wrote: On Mon, 17 Nov 2008, Lars Schnoor wrote: 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 It's not true. Envy based cards do not support hardware mixing on PCM streams from applications. They support only digital matrix mixer for all inputs / outputs. You may try to use ALSA dmix devices (software mixing in alsa-lib). Jaroslav - Jaroslav Kysela [EMAIL PROTECTED] Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc. - 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=100url=/___ Alsa-user mailing list Alsa-user@lists.sourceforge.net 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=100url=/___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user