📄 sndfnint.c
字号:
/* nyqsrc/sndfnint.c -- interface to snd/snd.h, * nyqsrc/sound.h, nyqsrc/downsample.h, nyqsrc/sndread.h, * nyqsrc/sndseq.h, nyqsrc/add.h, nyqsrc/multiseq.h, * nyqsrc/samples.h, nyqsrc/sndwrite.h, nyqsrc/sndmax.h, * nyqsrc/compose.h, nyqsrc/inverse.h, nyqsrc/resamp.h, * nyqsrc/resampv.h, nyqsrc/fft.h, nyqsrc/avg.h, * tran/amosc.h, tran/clip.h, tran/const.h, tran/fmosc.h, * tran/integrate.h, tran/log.h, tran/maxv.h, tran/osc.h, * tran/prod.h, tran/buzz.h, tran/pwl.h, tran/recip.h, * tran/upsample.h, tran/scale.h, tran/sine.h, * tran/partial.h, tran/white.h, tran/tone.h, * tran/tonev.h, tran/atonev.h, tran/atone.h, * tran/reson.h, tran/areson.h, tran/resonvc.h, * tran/resoncv.h, tran/aresonvc.h, tran/aresoncv.h, * tran/resonvv.h, tran/aresonvv.h, tran/offset.h, * tran/slope.h, tran/delay.h, tran/delaycv.h, * tran/shape.h, tran/sampler.h, tran/exp.h, * tran/siosc.h, tran/follow.h, tran/gate.h, * tran/quantize.h, tran/ifft.h, tran/congen.h, * tran/fromobject.h, tran/fromarraystream.h, * tran/coterm.h, tran/convolve.h, tran/alpass.h, * tran/oneshot.h, tran/chase.h, tran/tapv.h, * tran/biquad.h, tran/pluck.h */#ifndef mips#include "stdlib.h"#endif#include "xlisp.h"extern LVAL s_true;#define cvboolean(i) ((i) ? s_true : NIL)#define testarg2(e) (moreargs() ? (e) : (getflonum(xltoofew())))#define xlgaanynum() (floatp(*xlargv) ? getflonum(nextarg()) : \ (fixp(*xlargv) ? (double) getfixnum(nextarg()) : \ getflonum(xlbadtype(*xlargv))))#define getboolean(lval) ((lval) != NIL)extern LVAL RSLT_sym;#include "snd.h"#include "sound.h"/* xlc_soundp -- interface to C routine soundp *//**/LVAL xlc_soundp(void){ LVAL arg1 = xlgetarg(); boolean result; xllastarg(); result = soundp(arg1); return cvboolean(result);}/* xlc_hz_to_step -- interface to C routine hz_to_step *//**/LVAL xlc_hz_to_step(void){ double arg1 = testarg2(xlgaanynum()); double result; xllastarg(); result = hz_to_step(arg1); return cvflonum(result);}/* xlc_snd_set_logical_stop -- interface to C routine set_logical_stop_time *//**/LVAL xlc_snd_set_logical_stop(void){ sound_type arg1 = getsound(xlgasound()); double arg2 = testarg2(xlgaanynum()); xllastarg(); set_logical_stop_time(arg1, arg2); return NIL;}/* xlc_log -- interface to C routine xlog *//**/LVAL xlc_log(void){ double arg1 = getflonum(xlgaflonum()); double result; xllastarg(); result = xlog(arg1); return cvflonum(result);}/* xlc_snd_sref -- interface to C routine snd_sref *//**/LVAL xlc_snd_sref(void){ sound_type arg1 = getsound(xlgasound()); double arg2 = testarg2(xlgaanynum()); double result; xllastarg(); result = snd_sref(arg1, arg2); return cvflonum(result);}/* xlc_sref_inverse -- interface to C routine snd_sref_inverse *//**/LVAL xlc_sref_inverse(void){ sound_type arg1 = getsound(xlgasound()); double arg2 = testarg2(xlgaanynum()); double result; xllastarg(); result = snd_sref_inverse(arg1, arg2); return cvflonum(result);}/* xlc_snd_stop_time -- interface to C routine snd_stop_time *//**/LVAL xlc_snd_stop_time(void){ sound_type arg1 = getsound(xlgasound()); double result; xllastarg(); result = snd_stop_time(arg1); return cvflonum(result);}/* xlc_snd_time -- interface to C routine snd_time *//**/LVAL xlc_snd_time(void){ sound_type arg1 = getsound(xlgasound()); double result; xllastarg(); result = snd_time(arg1); return cvflonum(result);}/* xlc_snd_srate -- interface to C routine snd_srate *//**/LVAL xlc_snd_srate(void){ sound_type arg1 = getsound(xlgasound()); double result; xllastarg(); result = snd_srate(arg1); return cvflonum(result);}/* xlc_snd_t0 -- interface to C routine snd_t0 *//**/LVAL xlc_snd_t0(void){ sound_type arg1 = getsound(xlgasound()); double result; xllastarg(); result = snd_t0(arg1); return cvflonum(result);}/* xlc_snd_xform -- interface to C routine snd_xform *//**/LVAL xlc_snd_xform(void){ sound_type arg1 = getsound(xlgasound()); double arg2 = testarg2(xlgaanynum()); double arg3 = testarg2(xlgaanynum()); double arg4 = testarg2(xlgaanynum()); double arg5 = testarg2(xlgaanynum()); double arg6 = testarg2(xlgaanynum()); sound_type result; xllastarg(); result = snd_xform(arg1, arg2, arg3, arg4, arg5, arg6); return cvsound(result);}/* xlc_block_watch -- interface to C routine block_watch *//**/LVAL xlc_block_watch(void){ long arg1 = getfixnum(xlgafixnum()); xllastarg(); block_watch(arg1); return NIL;}/* xlc_sound_nth_block -- interface to C routine sound_nth_block *//**/LVAL xlc_sound_nth_block(void){ sound_type arg1 = getsound(xlgasound()); long arg2 = getfixnum(xlgafixnum()); long result; xllastarg(); result = sound_nth_block(arg1, arg2); return cvfixnum(result);}/* xlc_snd_copy -- interface to C routine sound_copy *//**/LVAL xlc_snd_copy(void){ sound_type arg1 = getsound(xlgasound()); sound_type result; xllastarg(); result = sound_copy(arg1); return cvsound(result);}/* xlc_snd_print -- interface to C routine sound_print *//**/LVAL xlc_snd_print(void){ LVAL arg1 = xlgetarg(); long arg2 = getfixnum(xlgafixnum()); xllastarg(); sound_print(arg1, arg2); return NIL;}/* xlc_snd_play -- interface to C routine sound_play *//**/LVAL xlc_snd_play(void){ LVAL arg1 = xlgetarg(); xllastarg(); sound_play(arg1); return NIL;}/* xlc_stats -- interface to C routine stats *//**/LVAL xlc_stats(void){ xllastarg(); stats(); return NIL;}/* xlc_snd_print_tree -- interface to C routine sound_print_tree *//**/LVAL xlc_snd_print_tree(void){ sound_type arg1 = getsound(xlgasound()); xllastarg(); sound_print_tree(arg1); return NIL;}/* xlc_snd_scale -- interface to C routine sound_scale *//**/LVAL xlc_snd_scale(void){ double arg1 = testarg2(xlgaanynum()); sound_type arg2 = getsound(xlgasound()); sound_type result; xllastarg(); result = sound_scale(arg1, arg2); return cvsound(result);}/* xlc_snd_zero -- interface to C routine sound_zero *//**/LVAL xlc_snd_zero(void){ double arg1 = testarg2(xlgaanynum()); double arg2 = testarg2(xlgaanynum()); sound_type result; xllastarg(); result = sound_zero(arg1, arg2); return cvsound(result);}/* xlc_step_to_hz -- interface to C routine step_to_hz *//**/LVAL xlc_step_to_hz(void){ double arg1 = testarg2(xlgaanynum()); double result; xllastarg(); result = step_to_hz(arg1); return cvflonum(result);}#include "downsample.h"/* xlc_snd_down -- interface to C routine snd_down *//**/LVAL xlc_snd_down(void){ double arg1 = testarg2(xlgaanynum()); sound_type arg2 = getsound(xlgasound()); sound_type result; xllastarg(); result = snd_down(arg1, arg2); return cvsound(result);}#include "sndread.h"/* xlc_snd_read -- interface to C routine snd_make_read *//**/LVAL xlc_snd_read(void){ unsigned char * arg1 = getstring(xlgastring()); double arg2 = testarg2(xlgaanynum()); double arg3 = testarg2(xlgaanynum()); long arg4 = getfixnum(xlgafixnum()); long arg5 = getfixnum(xlgafixnum()); long arg6 = getfixnum(xlgafixnum()); long arg7 = getfixnum(xlgafixnum()); long arg8 = getfixnum(xlgafixnum()); double arg9 = testarg2(xlgaanynum()); double arg10 = testarg2(xlgaanynum()); long arg11 = 0; long arg12 = 0; LVAL result; xllastarg(); xlprot1(result); result = snd_make_read(arg1, arg2, arg3, &arg4, &arg5, &arg6, &arg7, &arg8, &arg9, &arg10, &arg11, &arg12); { LVAL *next = &getvalue(RSLT_sym); *next = cons(NIL, NIL); car(*next) = cvfixnum(arg4); next = &cdr(*next); *next = cons(NIL, NIL); car(*next) = cvfixnum(arg5); next = &cdr(*next); *next = cons(NIL, NIL); car(*next) = cvfixnum(arg6); next = &cdr(*next); *next = cons(NIL, NIL); car(*next) = cvfixnum(arg7); next = &cdr(*next); *next = cons(NIL, NIL); car(*next) = cvfixnum(arg8); next = &cdr(*next); *next = cons(NIL, NIL); car(*next) = cvflonum(arg9); next = &cdr(*next); *next = cons(NIL, NIL); car(*next) = cvflonum(arg10); next = &cdr(*next); *next = cons(NIL, NIL); car(*next) = cvfixnum(arg11); next = &cdr(*next); *next = cons(NIL, NIL); car(*next) = cvfixnum(arg12); } xlpop(); return (result);}#include "sndseq.h"/* xlc_snd_seq -- interface to C routine snd_sndseq *//**/LVAL xlc_snd_seq(void){ sound_type arg1 = getsound(xlgasound()); LVAL arg2 = xlgetarg(); sound_type result; xllastarg(); result = snd_sndseq(arg1, arg2); return cvsound(result);}#include "add.h"/* xlc_snd_add -- interface to C routine snd_add *//**/LVAL xlc_snd_add(void){ sound_type arg1 = getsound(xlgasound()); sound_type arg2 = getsound(xlgasound()); sound_type result; xllastarg(); result = snd_add(arg1, arg2); return cvsound(result);}#include "multiseq.h"/* xlc_snd_multiseq -- interface to C routine snd_make_multiseq *//**/LVAL xlc_snd_multiseq(void){ LVAL arg1 = xlgetarg(); LVAL arg2 = xlgetarg(); LVAL result; xllastarg(); result = snd_make_multiseq(arg1, arg2); return (result);}#include "samples.h"/* xlc_snd_from_array -- interface to C routine snd_from_array *//**/LVAL xlc_snd_from_array(void){ double arg1 = testarg2(xlgaanynum()); double arg2 = testarg2(xlgaanynum()); LVAL arg3 = xlgetarg(); sound_type result; xllastarg(); result = snd_from_array(arg1, arg2, arg3); return cvsound(result);}/* xlc_snd_samples -- interface to C routine snd_samples *//**/LVAL xlc_snd_samples(void){ sound_type arg1 = getsound(xlgasound()); long arg2 = getfixnum(xlgafixnum()); LVAL result; xllastarg(); result = snd_samples(arg1, arg2); return (result);}/* xlc_snd_length -- interface to C routine snd_length *//**/LVAL xlc_snd_length(void){ sound_type arg1 = getsound(xlgasound()); long arg2 = getfixnum(xlgafixnum()); long result; xllastarg(); result = snd_length(arg1, arg2); return cvfixnum(result);}/* xlc_snd_maxsamp -- interface to C routine snd_maxsamp *//**/LVAL xlc_snd_maxsamp(void){ sound_type arg1 = getsound(xlgasound()); double result; xllastarg(); result = snd_maxsamp(arg1); return cvflonum(result);}/* xlc_snd_fetch -- interface to C routine snd_fetch *//**/LVAL xlc_snd_fetch(void){ sound_type arg1 = getsound(xlgasound()); LVAL result; xllastarg(); result = snd_fetch(arg1); return (result);}/* xlc_snd_fetch_array -- interface to C routine snd_fetch_array *//**/LVAL xlc_snd_fetch_array(void){ sound_type arg1 = getsound(xlgasound()); long arg2 = getfixnum(xlgafixnum()); long arg3 = getfixnum(xlgafixnum()); LVAL result; xllastarg(); result = snd_fetch_array(arg1, arg2, arg3); return (result);}#include "sndwrite.h"/* xlc_snd_save -- interface to C routine sound_save *//**/LVAL xlc_snd_save(void){ LVAL arg1 = xlgetarg(); long arg2 = getfixnum(xlgafixnum()); unsigned char * arg3 = getstring(xlgastring()); long arg4 = getfixnum(xlgafixnum()); long arg5 = getfixnum(xlgafixnum()); long arg6 = getfixnum(xlgafixnum()); long arg7 = getfixnum(xlgafixnum()); double arg8 = 0.0; long arg9 = 0;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -