Code Monkey home page Code Monkey logo

Comments (5)

casbreuk avatar casbreuk commented on July 26, 2024

I narrowed it down to having 1 input channel and 2 output channels.

Don't have time to investigate this further right now, but my guess is:
In my output block, I call:
mRingBuffer->FetchInterleavedData(outData, numFrames, numChannels);

Since it's the output block, numChannels is 2.
However, there's only 1 input channel.

I'm guessing that the 1 channel is then split (interleaved) amongst the 2 output channels, so each output channel contains half of the input channel.

When I changed Novocaine::checkSessionProperties and manually set self.numOutputChannels to 1, then the sound records nicely.

from novocaine.

alexbw avatar alexbw commented on July 26, 2024

This is part of a problem in Novocaine with how it deals with multiple channels. I've not had time to delve back into this, as Novocaine is no longer a focus of mine (but I still come back to it whenever I can). If you (or anybody) has time to look into the root of this, it would be MUCH appreciated.

from novocaine.

psugihara avatar psugihara commented on July 26, 2024

Did anyone figure anything out about this?

from novocaine.

casbreuk avatar casbreuk commented on July 26, 2024

Yup -- see my last post, er, the one before this one. Change self.numOutputChannels to 1.
The number of output channels should probably be the same as the number of input channels, so if you're using a microphone, it should be 1. Otherwise you'll only be filling half of each output channel if you have 1 input and 2 outputs. This is my estimation of what is going on, but it has been months since I really dove into the Novocaine code.

from novocaine.

krafter avatar krafter commented on July 26, 2024

After spending some time in Novocaine code I can only say some abstract things: while in "playthru" it is reading less data than it's rendering. This is the result of different number of channels in output and input, as mentioned before. Thus you get either garbled (cut in every buffer) or low pitched sound (small buffer spread over larger space lowers the sound pitch) depending on how you feed data into output.

from novocaine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.