Cue code when volume level is reached?

Is there a way to monitor system sound output (from all running programs), so that (say) one could run code when sound output reached a certain volume?Thanks!
[172 byte] By [kmac9704a] at [2007-11-26 13:36:55]
# 1
http://www.google.com/search?q=java+control+playback+volume
ChuckBinga at 2007-7-7 22:23:05 > top of Java-index,Security,Cryptography...
# 2
Your reply isn't as clever (or on-topic) as you think it is.Thanks for the attempt, though.
kmac9704a at 2007-7-7 22:23:05 > top of Java-index,Security,Cryptography...
# 3
So, if you want a better answer - ask a better question. Say that you have already searched and there is nothing available on the internet*. Explain your problem in detail, provide programming information, etc.* A doubtful condition.
ChuckBinga at 2007-7-7 22:23:05 > top of Java-index,Security,Cryptography...
# 4

I have searched the internet with relevant terms and haven't been able to come up with anything. I turned to this forum not because I deny the solution is somewhere on the internet, but because I thought some polite, helpful person could get me there more quickly. I really hope nobody actually believes that's an abuse of these forums.

Apparently my question was not clear enough. Here's my situation, reworded and more detailed:

I'm writing a small application that automates tasks using java.awt.Robot. I'd like to run a function whenever the sound from a separate application (as in, not written by me) reaches a certain volume. What would be ideal is some kind of Listener (which I haven't been able to find searching on Google) for system sound.

Here's a pseudocode example of what I'd like to do ("pseudo" stuff in brackets):

import java.awt.Robot;

import [SomeAudioClass];

public class MyClass

{

private Robot robot;

private [SomeAudioClass] someAudio;

public MyClass()

{

robot = new Robot();

someAudio.[addSoundListener](new [SoundListener()] {

public void [volumeChanged](int level)

{

if (level > 50)

{

robot.moveMouse(X, Y);

}

}

});

}

}

Does anyone know a way to do this?

Thanks for your help.

kmac9704a at 2007-7-7 22:23:05 > top of Java-index,Security,Cryptography...