Play more than one Audio sample in Processing

180px-Processing_Logo_Clipped.svg

While trying to play more than one audio sample in processing you may get a error like this…

==== JavaSound Minim Error ====
==== Couldn't open the line: line with format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian not supported.

==== JavaSound Minim Error ====
==== Unable to return a SourceDataLine: unsupported format - PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian

Screenshot from 2013-05-10 12:52:19

To fix this error

sudo cp /usr/lib/jvm/java-6-openjdk/jre/lib/i386/libpulse-java.so ~/Desktop/processing-1.5.1/java/lib/i386/
sudo cp /usr/lib/jvm/java-6-openjdk/jre/lib/ext/pulse-java.jar ~/Desktop/processing-1.5.1/java/lib/ext/
sudo cp /etc/java-6-openjdk/sound.properties ~/Desktop/processing-1.5.1/java/lib/

Now try to play usually the problem may get fixed by this..but if the problem persists then its an ownership problem since pulse-java.jar and libpulse-java.so were owned by root.Then do these steps

sudo chown MYUSR:MYUSR ~/Desktop/processing-1.5.1/java/lib/ext/pulse-java.jar
sudo chown MYUSR:MYUSR ~/Desktop/processing-1.5.1/java/lib/i386/libpulse-java.so
chmod +x ~/Desktop/processing-1.5.1/java/lib/i386/libpulse-java.so

replace MYUSR with your current Linux user name.

Substitute ~/Desktop/processing-1.5.1/ with the path were you installed Processing
This will solve the issue happy hacking 🙂
Advertisements

3 thoughts on “Play more than one Audio sample in Processing

  1. Pingback: Assignment #3 – Basic Interactivity 2 | Daniel Jones' Interactive Computing

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s