Hi JS, Edward created ptolemy/actor/lib/javasound/ClipPlayer.java, which plays a sound file. This actor is in the CVS tree, it is not yet released. The DE demo RealTimeComposite uses ClipPlayer. See http://chess.eecs.berkeley.edu/ptexternal for CVS access.
However, it sounds like you want to play audio data directly, not files. Ptolemy II does includes an interface to the Java Media Framework (JMF), see ptolemy.actor.lib.jmf. There is an AudioPlayer actor in the jmf file. The C codegen interface also has an interface to SDL, so that can be used to generate sound. You could also use the EmbeddedC actor to call the C based SDL from Java. One thing to look at with AudioPlayer is how large chunks of audio data are that you are passing around. Try changing the transferSize of AudioPlayer and see how that works for you. _Christopher -------- Hi, I'm trying to build an application with PtII that can: 1- read audio files 2- extract raw information (ie. amplitude) to control something else (like, say, the intensity of a light or the saturation of a video) 3- play the file I can do (1) and (2) pretty easily with the AudioReader actor BUT if I plug it into the AudioPlayer the sound output is really poor. Even with this very simple app (AudioReader -> AudioPlayer) I can hear "clicks" indicating a poor latency (and unacceptable for a media application). Christopher pointed out a long time ago that the C codegen facility had an interface to Simple DirectMedia Layer. Could that be a solution? What about JMF? -- J. S. Senécal http://drone.ws --------------------------------------------------------------------------- - Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED] -------- ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]