Skip to content

Compiler is confused of what the builder is. #2146

Closed Answered by philburk
John4650-hub asked this question in Q&A
Discussion options

You must be logged in to vote

I think I know what is happening.
You declared the builder as an object so this code is correct.

    builder.setDirection(oboe::Direction::Output)

But setDirection() returns a POINTER to the builder so then you have to use "->":

    builder.setDirection(oboe::Direction::Output)
           ->setFormat(oboe::AudioFormat::I16)
           ->setChannelCount(oboe::ChannelCount::Stereo)

Here is an example:

oboe::Result result = builder.setSharingMode(oboe::SharingMode::Exclusive)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@John4650-hub
Comment options

Answer selected by John4650-hub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants