feature request: ficlose
| Date | 2006-05-29 18:43 |
| From | Andres Cabrera |
| Subject | feature request: ficlose |
Hi, I'm writing to request the addition of an ficlose opcode to complement fiopen. Currently, a csd like (run in realtime): |
| Date | 2006-05-30 07:21 |
| From | Istvan Varga |
| Subject | Re: feature request: ficlose |
| Attachments | None |
| Date | 2006-05-30 13:36 |
| From | Istvan Varga |
| Subject | Re: [Cs-dev] [Csnd] feature request: ficlose |
| Attachments | None |
| Date | 2006-05-30 13:50 |
| From | Andres Cabrera |
| Subject | Re: [Cs-dev] [Csnd] feature request: ficlose |
Hi Istvan,
That's what I thought...
However, I see there is currently a check for the validity of the file
handle in all the init functions of the opcodes (fout.c):
n = (int) MYFLT2LRND(*p->fname);
if (n < 0 || n > pp->file_num ||
(p->fp = pp->file_opened[n].file) == NULL)
csound->Die(csound, Str("fink: invalid file handle"));
except for fioutr (which does this check only in the performance fuction
ioutfile_r, line 413):
if (rfil == NULL)
csound->Die(csound, Str("fouti: invalid file handle"));
Is this check prone for errors still?
Would it be problematic, or seriously affect performance to make this
check also on the performance functions? (I think maybe on the a-rate
ones...)
Maybe even if my proposal is not accepted it would be good to have these
init functions give an init error instead of dying altogether? I think
csound should die when the functions are performance rate and the file
has been closed, since that would generate an error, and are probably
due to a user error (or the user can make an additional check within
csound for these cases).
Cheers,
Andrés
PS There is a typo in line 319. It should be "fiopen: cannot open file %
s" instead of "fout: cannot open outfile %s"
On Tue, 2006-05-30 at 08:21 +0200, Istvan Varga wrote:
> It may be possible, although the existing fout opcodes would need
> code changes to be aware of the possiblity of file handles being
> removed. Closing a file while another instrument is using it is also
> tricky.
>
> On Monday 29 May 2006 19:43, Andres Cabrera wrote:
>
> > I'm writing to request the addition of an ficlose opcode to complement
> > fiopen.
> > Currently, a csd like (run in realtime):
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https:/ |
| Date | 2006-05-30 15:23 |
| From | Andres Cabrera |
| Subject | Re: [Cs-dev] [Csnd] feature request: ficlose |
Thanks very much Istvan, it's a very helpful addition for a project I'm working on which I'll release soon. Thanks! Andrés On Tue, 2006-05-30 at 14:36 +0200, Istvan Varga wrote: > I am working on implementing ficlose now, and will add it to CVS soon. > > > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel > > _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net https://lists.so |