Answers

Take a look at the portaudio branch in GitHub. It adds portable audio output to the Java bindings. I don't think Java is what you want, but the implementation may give you an idea how to do this outside of Java.

I didn't find the portaudio branch you mentioned, but I wrote a small wrapper class which initializes PortAudio and forwards the portaudio callback to libpd_process_float. I have just started writing C++ again, so I'm a little self-conscious to put it online ;-) but it's just a few lines of code anyway.

About a month and 1/2 ago I started working on OS X support along with some examples on how to get libpd working along a chain of other audio units. I haven't had time to pick it back up, but the wop is in the libpd cocoa branch. I hope to get back to that in the near future...

Of course, portaudio is a nice option and good if you are thinking to move your game to other platforms as well.

I should also mention that if you are to use the cocoa branch, it's probably best to start with the CocoaPdBasic sample I put up. It has the same functionality as the iOS version (mic input -> libpd -> speaker output).

thanks...i didn't know that existed, i'm not too experienced with github and branches.

but implementing it using portaudio was really easy, so i think i'm gonna stick with that...i'm planning to use the audio output from the iOS branch for iOS, and portaudio for everything else except for android. for android i'll see, i'm sure there's an easy way.

For Android, there's OpenSL. The PortAudio branch is actually a bit of an afterthought. I reworked the Java bindings to support OpenSL, and then I realized that I could just replace OpenSL with PortAudio for wider portability.

@basteln if cross-platform ease is your goal, portaudio is a very nice route as Peter suggests. However, you get more control over platform features by using the native API's. My main intentions with the cocoa branch were to show how you can use libpd in a chain of effects that include many other high-quality, Mac only audio units. It all depends on what your end requirements are.