[Csnd-dev] Messages at the end of performance

Eduardo Moguillansky <[email protected]>
Newsgroups gmane.comp.audio.csound.devel
Message-ID <CAHFFssJ8yEyN2irOWKhj6yYshxkoV_2YcyN+tjsx=t=vGYPsQg@mail.gmail.com>
Hi,

at the moment it seems impossible to disable these messages at the end of
performance / when a Csound object is stopped:

end of score.              overall amps:      0.0
           overall samples out of range:        0
0 errors in performance

This seems to come from Engine/musmon.c:

    /* print stats only if musmon was actually run */
    /* NOT SURE HOW   ************************** */
    // if(csound->oparms->msglevel)
    {
      csound->ErrorMsg(csound, Str("end of score.\t\t   overall amps:"));
      corfile_rm(csound, &csound->expanded_sco);
      for (n = 0; n < csound->nchnls; n++) {
        if (csound->smaxamp[n] > csound->omaxamp[n])
          csound->omaxamp[n] = csound->smaxamp[n];
        if (csound->maxamp[n] > csound->omaxamp[n])
          csound->omaxamp[n] = csound->maxamp[n];
        STA(orngcnt)[n] += (STA(srngcnt)[n] + csound->rngcnt[n]);
      }
      for (maxp = csound->omaxamp, n = csound->nchnls; n--; )
        print_maxamp(csound, *maxp++);
      if (csound->oparms->outformat != AE_FLOAT) {
        csound->ErrorMsg(csound, Str("\n\t   overall samples out of
range:"));
        for (rngp = STA(orngcnt), n = csound->nchnls; n--; )
          csound->ErrorMsg(csound, "%9d", *rngp++);
      }
      csound->ErrorMsg(csound, Str("\n%d errors in performance\n"),
                      csound->perferrcnt);
      print_benchmark_info(csound, Str("end of performance"));
      if (csound->print_version) print_csound_version(csound);
    }

It would be great if this would follow the message level, as suggested in
the commented out if check. Does anyone remember / know why this is
commented out?
When using csound as a library embedded in other software it should be
possible to remove any unwanted messages, particularly if there are no
errors.

Cheers,
Eduardo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.