File: local.c

package info (click to toggle)
nyquist 3.24%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 58,156 kB
  • sloc: ansic: 74,757; lisp: 18,169; java: 10,942; cpp: 6,688; sh: 175; xml: 58; makefile: 40; python: 15
file content (56 lines) | stat: -rw-r--r-- 1,148 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* local.c -- call initialization code for all extensions */

/* CHANGE LOG
 * --------------------------------------------------------------------
 * 28Apr03  dm  changes for portability and fix compiler warnings
 */

#include "xlisp.h"
#include "sound.h"
#include "samples.h"
#ifdef CMTSTUFF
#include "seqext.h"
#endif
#include "falloc.h"
#include "sine.h"
#include "stkinit.h"

LVAL RSLT_sym;

void localinit(void)
{
    falloc_init();
/*    probe_init(true);*/
    sound_init();
#ifdef CMTSTUFF
    seqext_init();
#endif
    sine_init();
    stk_init();
}


void localsymbols(void)
{
    RSLT_sym = xlenter("*RSLT*");
    sound_symbols();
    samples_symbols();
#ifdef CMTSTUFF
    seqext_symbols();
#endif
}

extern int sample_block_total;
extern int sample_block_used;

void print_local_gc_info(void)
{
    char buf[100];
    /* print sample blocks */
    sprintf(buf, "; samples %zdKB, %zdKB free",
            (sample_block_total * max_sample_block_len * sizeof(sample_type)) /
            1024,
            ((sample_block_total - sample_block_used) *
             max_sample_block_len * sizeof(sample_type)) / 1024);
    stdputstr(buf);
}