Coder Social home page Coder Social logo

Comments (4)

rncbc avatar rncbc commented on August 28, 2024

On 09/22/2016 08:19 PM, swesterfeld wrote:

My fix is to copy the data into one consecutive chunk of data, and
writing that with one single ringbuffer_write. Patch attached.

Cu... Stefan
lv2workerfix.diff.txt
https://github.com/rncbc/qtractor/files/488177/lv2workerfix.diff.txt

made its way to git head master (aka. qtractor v0.7.9.2)
0bb4d55
https://gitlab.com/rncbc/qtractor/commit/0bb4d55
https://bitbucket.org/rncbc/qtractor/commits/0bb4d55
http://sourceforge.net/p/qtractor/code/ci/0bb4d5

please test && tell (and possibly close)

thanks

rncbc aka. Rui Nuno Capela

from qtractor.

swesterfeld avatar swesterfeld commented on August 28, 2024

Looks reasonable, except for one detail (which breaks all requests as you committed it):

if (::jack_ringbuffer_write_space(m_pRequests) < request_size) {

should be ... >= request_size

As to whether to inform the user somehow if the out-of-space-condition occurred (which assert() would have done), it's probably a matter of taste whether to fail silently - as you implemented it - or produce some sort of warning.

from qtractor.

rncbc avatar rncbc commented on August 28, 2024

On 09/22/2016 10:49 PM, swesterfeld wrote:

Looks reasonable, except for one detail (which breaks all requests as
you committed it):

if (::jack_ringbuffer_write_space(m_pRequests) < request_size) {

should be ... >= request_size

of course. 7d31291
https://gitlab.com/rncbc/qtractor/commit/7d31291
https://bitbucket.org/rncbc/qtractor/commits/7d31291
http://sourceforge.net/p/qtractor/code/ci/7d3129
thanks.

As to whether to inform the user somehow if the out-of-space-condition
occurred (which assert() would have done), it's probably a matter of
taste whether to fail silently - as you implemented it - or produce some
sort of warning.

when the later sort of warning comes like a dang crash/abort, then i
prefer the former ;)

cheers

rncbc aka. Rui Nuno Capela

from qtractor.

swesterfeld avatar swesterfeld commented on August 28, 2024

Right, now everything works for me, it no longer crashes with my testcase, so I'm closing the issue.

As for producing a warning without crash/abort, you could add something like

fprintf (stderr, "qtractorLv2Worker::schedule failed, ring buffer full\n");

This would at least give users/developers a clue about what happened if a plugin is misbehaving. Anyway that's up to you.

from qtractor.

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.