Csound Csound-dev Csound-tekno Search About

[Cs-dev] [ csound-Bugs-3065724 ] Real-time ending too soon?

Date2011-04-28 13:22
From"SourceForge.net"
Subject[Cs-dev] [ csound-Bugs-3065724 ] Real-time ending too soon?
Bugs item #3065724, was opened at 2010-09-14 06:02
Message generated for change (Comment added) made by veplaini
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=564599&aid=3065724&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: csound
Group: csound5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Francois Pinot (fggpinot)
>Assigned to: Victor Lazzarini (veplaini)
Summary: Real-time ending too soon?

Initial Comment:
When running the joined csd file in real-time (csound rttest.csd), I get an audible click in the end of performance. If it is performed to a file (csound -W -o rttest.wav rttest.csd), there's no click in the end of the generated audio file. Same result using the API. It seams that the real-time run of csoundPerform misses some cycles in the end of the performance.

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

>Comment By: Victor Lazzarini (veplaini)
Date: 2011-04-28 13:22

Message:
I have been looking at this and here are some conclusions:

1) On OSX, the bug only appears with portaudio
2) If we reduce the soft buffer from the default (1024 samples) to 256,
the click disappears, increasing the buffer size makes the click more
prominent.
3) if we add an extra time to the score example by adding  e 3 to it, the
click disappears
4) using the blocking interface (pa_bl) removes the bug

Item 2) above indicates that the click is due to a buffer of zeros sent to
the DAC, just before the end of synthesis. As if the final buffer is
substituted with a cleared buffer. 
The code does indeed clear the buffer as the device is about to close. If
remove that bit of code, I get a different bit of noise just before
performance ends.
Item 3) seems to indicate the device is being closed before the end of
performance, and 4) demonstrates it to be something related to the
asynchronous operation of the callback interface.

The problem is that I can't seem to find a solution: retarding the device
closure does not seem to work. Any suggestions are welcome.





 


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

Comment By: Victor Lazzarini (veplaini)
Date: 2011-04-27 13:04

Message:
This seems to be portaudio-only, I tested on OSX with the coreaudio module
and it's not there.

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

Comment By: John ffitch (jpff)
Date: 2011-01-10 20:13

Message:
I cannot hear any problem

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

Comment By: Francois Pinot (fggpinot)
Date: 2010-11-29 14:29

Message:
I've rebuilt csound from latest cvs (Nov 29 2010) on my linux box (ubuntu
10.04 LTS). The bug is still there with alsa. I cannot try with portaudio,
because now csound tells me:
 *** error: unknown rtaudio module: 'PortAudio'
Failed to initialise real time audio output
Actually I get aroung the bug by adding 'e 2.5' to the end of the score
section of the file 'rttest.csd'

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

Comment By: Francois Pinot (fggpinot)
Date: 2010-11-29 10:20

Message:
I tried with both portaudio and alsa and the bug was there. My csound was
built from cvs (July 29 2010). I tried too on a Windows box with the last
binaries from Michael and the bug was not there. So, I will rebuild csound
on linux from recent cvs  and have a try. I'll let you know what happens.

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

Comment By: John ffitch (jpff)
Date: 2010-11-29 09:17

Message:
I assume this is with Portaudio.  Can you confirm that t happens with ALSA
as well?
Just trying to narrow the search

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=564599&aid=3065724&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