Csound Csound-dev Csound-tekno Search About

[Cs-dev] [ csound-Bugs-3295456 ] Csound5.13.0 noise when using JackoAudioOut

Date2011-05-01 08:37
From"SourceForge.net"
Subject[Cs-dev] [ csound-Bugs-3295456 ] Csound5.13.0 noise when using JackoAudioOut
Bugs item #3295456, was opened at 2011-04-30 19:01
Message generated for change (Settings changed) made by veplaini
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=564599&aid=3295456&group_id=81968

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Opcodes
Group: csound5
>Status: Open
>Resolution: None
Priority: 5
Private: No
Submitted By: David Bluecame (david-bluecame)
Assigned to: Michael Gogins (gogins)
Summary: Csound5.13.0 noise when using JackoAudioOut

Initial Comment:
Hello.

When using the JackoAudioOut opcode to connect to another jack program, the csound output is just a very annoying noise.

I've found the problem in the file "jacko.cpp"

[...]
struct JackoAudioOut : public OpcodeBase
{
[...]
  int audio(CSOUND *csound)
  {
    jack_default_audio_sample_t *buffer = (jack_default_audio_sample_t *)jack_port_get_buffer(csoundPort, csoundFramesPerTick);
    for (size_t frame = 0; frame < csoundFramesPerTick; ++frame) {
      buffer[frame] += asignal[frame]; // <--- THIS IS THE PROBLEM!!!
[...]

>From what I've seen, the problem is in the line:
buffer[frame] += asignal[frame];

It's adding the new frames to the old ones instead of replacing them. The correct line should be:
buffer[frame] = asignal[frame];

I have recompiled it by using that fix and it works, no more noise and the correct sound output! :-))

I hope this is useful. Best regards!!

David Bluecame.

----------------------------------------------------------------------

Comment By: Victor Lazzarini (veplaini)
Date: 2011-05-01 08:37

Message:
I will defer this to the opcode author. These opcodes are special in that
they control the whole csound performance and the question of buffer
clearing might arise from this special setup. I am assigning the bug to
him.

----------------------------------------------------------------------

Comment By: Victor Lazzarini (veplaini)
Date: 2011-04-30 19:32

Message:
fixed in sources; thanks for the report and fix.

----------------------------------------------------------------------

Comment By: David Bluecame (david-bluecame)
Date: 2011-04-30 19:14

Message:
Still not perfect, when I restart the csound score, there is a brief noise
in the beginning, maybe some buffer cleaning is needed? Please, tell me if
it's also happening to you after the first fix is applied.

Thank you and best regards. David Bluecame.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=564599&aid=3295456&group_id=81968

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net