Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1002683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:51:53+00:00 2026-05-16T07:51:53+00:00

In PortAudio’s C++ bindings, there is a MemFunCallBackStream constructior that can be called as:

  • 0

In PortAudio’s C++ bindings, there is a MemFunCallBackStream constructior that can be called as:

portaudio::MemFunCallbackStream<MyClass> streamRecord(paramsRecord, 
                                                     *AnInstanceOfMyClass,
                                                     &MyClass::MemberFunction);

where last parameter is the callback function. However without using the & operator on that parameter compiler fails. But as far as I know & parameter is omitable when obtaining address of functions to use in function pointers. Is this somehow different from C callback function and ptr. to func. syntax?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:51:53+00:00Added an answer on May 16, 2026 at 7:51 am

    This FAQ seems to suggest that you can omit the & (for static member functions, at least), but then goes on to give various reasons why you shouldn’t confuse ordinary function-pointers with C++ member-function-pointers.

    EDIT: Found more information here, which is relevant to non-static member functions:

    Some compilers (most notably MSVC 6
    and 7) will let you omit the &, even
    though it is non-standard and
    confusing. More standard-compliant
    compilers (e.g., GNU G++ and MSVC 8
    (a.k.a. VS 2005)) require it, so you
    should definitely put it in. To invoke
    the member function pointer, you need
    to provide an instance of SomeClass,
    and you must use the special operator
    ->*. This operator has a low precedence, so you need to put it in
    parentheses. [Emphasis added]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a program that would record audio data using PortAudio (I
I was wondering, do you guys know of a cmake file for portaudio that
I know not everyone has used the PortAudio API, but maybe you can find
I have a command-line application called xooky_nabox that was programmed using c++. It reads
I'm considering RTAudio + RTMidi and PortAudio + PortMidi for a new project that
PyAudio is based on PortAudio. Is there anyway to detect a buffer under/overflow for
I'm writing an audio program in Haskell using Portaudio. I have a function that
It is usually said callbacks are implemented with function pointers. When I check PortAudio's
PortAudio is showing a deviceCount of 0 and a defaultOutputDevice of -1 for both
I'm using opencv (for object recognition) combined with portaudio to play sounds based on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.