MCPcopy Create free account
hub / github.com/csound/csound / writebuffer

Function writebuffer

util/srconv.c:69–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67static void usage(CSOUND *);
68
69static int writebuffer(CSOUND *csound, MYFLT *out_buf, int *block,
70 SNDFILE *outfd, int length, OPARMS *oparms)
71{
72 sf_write_MYFLT(outfd, out_buf, length);
73 (*block)++;
74 if (oparms->rewrt_hdr)
75 csound->rewriteheader((struct SNDFILE *)outfd);
76 switch (oparms->heartbeat) {
77 case 1:
78 csound->MessageS(csound, CSOUNDMSG_REALTIME, "%c\010",
79 "|/-\\"[*block & 3]);
80 break;
81 case 2:
82 csound->MessageS(csound, CSOUNDMSG_REALTIME, ".");
83 break;
84 case 3:
85 {
86 int n;
87 csound->MessageS(csound, CSOUNDMSG_REALTIME, "%d%n", *block, &n);
88 while (n--) csound->MessageS(csound, CSOUNDMSG_REALTIME, "\010");
89 }
90 break;
91 case 4:
92 csound->MessageS(csound, CSOUNDMSG_REALTIME, "\007");
93 }
94 return length;
95}
96
97static char set_output_format(CSOUND *csound, char c, char outformch,
98 OPARMS *oparms)

Callers 1

srconvFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected