Check out RTAudio or PortAudio.  I've had better results with RTAudio.



On Thu, Nov 7, 2013 at 10:14 AM, Joshan Mahmud <joshan.mahmud@gmail.com> wrote:
Hi Rafael

Many thanks for your feedback!  I'm glad there's actually something missing rather than the code just not working.

My other question is then, if I don't want to use Jack and just want to use something simple to tie up the dac of libpd to my default sound card - is there a simple way of doing that?  

Thanks
Josh


On Thu, Nov 7, 2013 at 1:31 PM, Rafael Vega <email.rafa@gmail.com> wrote:
And yes, the iOS Test project does the audio I/O for you.


On Thu, Nov 7, 2013 at 8:30 AM, Rafael Vega <email.rafa@gmail.com> wrote:



On Thu, Nov 7, 2013 at 8:23 AM, Joshan Mahmud <joshan.mahmud@gmail.com> wrote:
I believe so, I'm running this code: https://github.com/libpd/libpd/blob/master/samples/cppTest/src/main.cpp and I presume line 56 (pd.computeAudio(true);) switches on DSP...

Thanks
Josh


On Thu, Nov 7, 2013 at 12:54 PM, Rafael Vega <email.rafa@gmail.com> wrote:


On Thursday, November 7, 2013, Joshan Mahmud wrote:
Hi all

Apologise for the novice question, but I'm trying to work purely with C++ & libpd (OSX desktop) and have been working with samples/cppTest/cpptest.xcodeproj from https://github.com/libpd/libpd.

I can build the project fine (libpd & the cppTest app) but when it opens the test patch (or any for that matter) I do not get any sound.  The patch themselves works fine.  Print statements are ok and sending & receiving messages seem ok.  But I even built a patch which just *~ two phasors, and couldn't hear it when I used the cppTest code to open my patch.  I don't think there is anything wrong with libpd nor my sound card as I compiled & ran the iOSTest project (deployed to a simulator iPhone) and that worked (fuzzy audio, but sound came through).

Anyone have any good ideas?  I know that with the output AudioUnit on OSX has a default volume of 0 (unlike iOS which has default of 1.0 for volume) so would it be something like that?

Thanks!!!
Josh


Did you send a "dsp on" message to your patch?


--




Maybe I'm missing something when skimming through your code, but, where are you setting up audio I/O? libpd doesn't do that automatically for you. Here's my implementation https://github.com/rvega/XookyNabox/blob/master/src/main.cpp It uses jack as audio I/O and libpd as DSP processing.





--




--
Rafael Vega
email.rafa@gmail.com