Re: Not able to play multiple audio files

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

 



Hi Jan,

Thank you for asking me to refer to the link. I went through the link. I ran the java program of playing an audio file. When I run three or four instances of the java program simultaneously, I could hear only the audio clips being played sequentially. I could not hear them playing simultaneously. Please find the output of DeviceInfo java program also below and the exception I get when I try to run more than one audio clip at the same time.

Please tell me if I need to make some configuration related changes for playing multiple audio files simultaneously. 

[sai@sai temp]#java -cp . PlayAudioFile ~/temp/adios.wav &

[sai@sai temp]# Play input audio format=PCM_UNSIGNED 11025.0 Hz, 8 bit, mono, 1 bytes/frame,

javax.sound.sampled.LineUnavailableException: Audio Device Unavailable

        at com.sun.media.sound.HeadspaceMixer.nResume(Native Method)

        at com.sun.media.sound.HeadspaceMixer.implOpen(Unknown Source)

        at com.sun.media.sound.AbstractMixer.open(Unknown Source)

        at com.sun.media.sound.AbstractMixer.open(Unknown Source)

        at com.sun.media.sound.AbstractDataLine.open(Unknown Source)

        at com.sun.media.sound.MixerSourceLine.open(Unknown Source)

        at com.sun.media.sound.AbstractDataLine.open(Unknown Source)

        at com.sun.media.sound.MixerSourceLine.open(Unknown Source)

        at PlayAudioFile.playAudioStream(PlayAudioFile.java:64)

        at PlayAudioFile.playAudioFile(PlayAudioFile.java:37)

        at PlayAudioFile.main(PlayAudioFile.java:23)

java -cp . PlayAudioFile ~/temp/adios.wav &Play.playAudioStream draining line.                                                                                                                                               sample_wav.wav &

[3] 2725


[sai@sai temp]# java -cp . DeviceInfo

Mixers:

   Intel [plughw:0,0], version 1.0.24

    Mixer: com.sun.media.sound.DirectAudioDevice@c9ba38

      Source lines

      Target lines

        interface TargetDataLine supporting 24 audio formats, and buffers of at least 32 bytes

   Intel [plughw:0,1], version 1.0.24

    Mixer: com.sun.media.sound.DirectAudioDevice@1e0be38

      Source lines

        interface SourceDataLine supporting 24 audio formats, and buffers of at least 32 bytes

        interface Clip supporting 24 audio formats, and buffers of at least 32 bytes

      Target lines

   Intel [plughw:0,2], version 1.0.24

    Mixer: com.sun.media.sound.DirectAudioDevice@1e859c0

      Source lines

      Target lines

        interface TargetDataLine supporting 24 audio formats, and buffers of at least 32 bytes

   Java Sound Audio Engine, version 1.0

    Mixer: com.sun.media.sound.HeadspaceMixer@15c7850

      Source lines

        interface SourceDataLine supporting 8 audio formats

        interface Clip supporting 8 audio formats, and buffers of 0 to 4194304 bytes

      Target lines

   Port Intel [hw:0], version 1.0.24

    Mixer: com.sun.media.sound.PortMixer@1aaa14a

      Source lines

        Front Mic Boost source port

        Capture source port

        Capture source port

        Rear Mic Boost source port

      Target lines

        Master target port

        Headphone target port

        Front target port

        Front Mic target port

        Front Mic Boost target port

        Surround target port

        Center target port

        LFE target port

        Side target port

        Line target port

        CD target port

        Beep target port

        Rear Mic target port

        Rear Mic Boost target port


Thanks and Regards,

Sai



On Sun, Dec 1, 2013 at 4:31 AM, Jan Newmarch <jan@xxxxxxxxxxxxx> wrote:


> Does this help?
>
> http://docs.oracle.com/javase/tutorial/sound/accessing.html
>

See the JavaSound chapter of my LinuxSound ebook for programs using
these classes at http://jan.newmarch.name/LinuxSound/Sampled/JavaSound/

Jan
--
Dr Jan Newmarch
Head of Higher Education (ICT)

P 61 3 9286 9971
M +61 4 0117 0509
F 61 3 9286 9100
W www.boxhill.edu.au
W jan.newmarch.name
E j.newmarch@xxxxxxxxxxxxxx
E jan@xxxxxxxxxxxxx





------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
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