Hello,
I want to use portaudio for my c++ audio project. The problem is: As you can see here and here, it wants me to pass the callback function as a function argument of openDefaultStre am(). The problem is: The audio data lies in a class. So there is a object of the class AudioManager() which collects the newest samples. The problem is now: I can't pass a member function pointer to openDefaultStre am(), right? Since that would require me to pass the object it should be called on as well. But if I make the function static, how can I access the newest samples then?
I want to use portaudio for my c++ audio project. The problem is: As you can see here and here, it wants me to pass the callback function as a function argument of openDefaultStre am(). The problem is: The audio data lies in a class. So there is a object of the class AudioManager() which collects the newest samples. The problem is now: I can't pass a member function pointer to openDefaultStre am(), right? Since that would require me to pass the object it should be called on as well. But if I make the function static, how can I access the newest samples then?
Comment