Re: [Cs-dev] Csound OSX Examples Knackser-Problem
Date | 2014-10-27 19:15 |
From | Steven Yi |
Subject | Re: [Cs-dev] Csound OSX Examples Knackser-Problem |
Attachments | None None |
Hi Oliver, The large buffer size would certainly be a problem. Could you file a bug at http://github.com/csound/csound/issues for this? I can investigate further to see what's going on. Thanks, steven On Mon Oct 27 2014 at 12:37:24 PM Oliver Brodwolf <oliver@helix64.com> wrote:
if I add |
Date | 2014-10-27 20:49 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Csound OSX Examples Knackser-Problem |
The coreaudio/auhal module works like this: 1) it uses a circular buffer to send data asynchronously to the audio card 2) it places -b N sample frames on the circular buffer at a time 3) the coreaudio callback reads -b N sample frames from the buffer at a time 4) the circular buffer is -B N sample frames in size. So -b (software buffer size) should be about 1/4 or 1/8 of the -B (hardware buffer size) value. For instance -B 1024 and -b 256 would work well, or -B 1024, -b 128, or -B 512 -b 64 etc. Regards ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 27 Oct 2014, at 19:15, Steven Yi |
Date | 2014-10-27 22:06 |
From | Oliver Brodwolf |
Subject | Re: [Cs-dev] Csound OSX Examples Knackser-Problem |
Thanks for the explanation about -b and -B. I have tried the following Values: char *argv[6] = { "csound", "-+ignore_csopts=0", "-+rtaudio=coreaudio", "-B1024", "-b64", (char*)[csdFilePath cStringUsingEncoding:NSASCIIStringEncoding]}; -b = -B / 4 (sound is not ok) -b = -B / 8 (sound is not ok) -b = -B /16 (sound is ok) Regards, Oliver -- View this message in context: http://csound.1045644.n5.nabble.com/Csound-OSX-Examples-Knackser-Problem-tp5738142p5738146.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2014-10-27 22:12 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Csound OSX Examples Knackser-Problem |
I guess it might depend on the system. Here I can (with CsoundQT) run 1/4, 1/8, 1/16. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 27 Oct 2014, at 22:06, Oliver Brodwolf |
Date | 2014-10-27 22:20 |
From | Oliver Brodwolf |
Subject | Re: [Cs-dev] Csound OSX Examples Knackser-Problem |
The 1/4 and 1/8 problem only exists on the Csound OSX Examples. With CsoundQT I have no problems -- View this message in context: http://csound.1045644.n5.nabble.com/Csound-OSX-Examples-Knackser-Problem-tp5738142p5738148.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2014-10-27 22:22 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Csound OSX Examples Knackser-Problem |
That’s interesting, I wonder what the difference is. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 27 Oct 2014, at 22:20, Oliver Brodwolf |
Date | 2014-10-27 23:43 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Csound OSX Examples Knackser-Problem |
Attachments | None None |
CsoundQt has, I suspect, its own audio layer that depends on JUCE and reads spin and writes to spout directly. Regards, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Mon, Oct 27, 2014 at 6:22 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: That’s interesting, I wonder what the difference is. |
Date | 2014-10-28 00:23 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Csound OSX Examples Knackser-Problem |
No, it doesn’t have any such layer. It uses the Csound-supplied io modules. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 27 Oct 2014, at 23:43, Michael Gogins |
Date | 2014-10-28 00:51 |
From | Oliver Brodwolf |
Subject | Re: [Cs-dev] Csound OSX Examples Knackser-Problem |
if I use the code like it is CsoundObj.m : [self performSelectorInBackground:@selector(runCsound:) withObject:csdFilePath]; then it cracks with -B1024 -b256 and I have to change to -B1024 -b64 If I use [self performSelector:@selector(runCsound:) withObject:csdFilePath]; then all is OK with -B1024 -b256 But I have to use the first form with performSelectorInBackground so other parts of the application can work parallel with the csound engine. -- View this message in context: http://csound.1045644.n5.nabble.com/Csound-OSX-Examples-Knackser-Problem-tp5738142p5738152.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2014-10-28 08:54 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Csound OSX Examples Knackser-Problem |
The reason it cracks, I reckon, is that the circular buffer overflows, and then we loose time between calls to the IO routine. With a smaller buffer size, the calls are happening more often and there is chance of overflow. Regards ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 28 Oct 2014, at 00:51, Oliver Brodwolf |