• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ cvsound函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中cvsound函数的典型用法代码示例。如果您正苦于以下问题:C++ cvsound函数的具体用法?C++ cvsound怎么用?C++ cvsound使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了cvsound函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: xlc_snd_shape

LVAL xlc_snd_shape(void)
{
    sound_type arg1 = getsound(xlgasound());
    sound_type arg2 = getsound(xlgasound());
    double arg3 = testarg2(xlgaanynum());
    sound_type result;

    xllastarg();
    result = snd_shape(arg1, arg2, arg3);
    return cvsound(result);
}
开发者ID:ShanghaiTimes,项目名称:Audacity2015,代码行数:11,代码来源:sndfnint.c


示例2: xlc_snd_pwl

LVAL xlc_snd_pwl(void)
{
    double arg1 = testarg2(xlgaanynum());
    double arg2 = testarg2(xlgaanynum());
    LVAL arg3 = xlgetarg();
    sound_type result;

    xllastarg();
    result = snd_pwl(arg1, arg2, arg3);
    return cvsound(result);
}
开发者ID:ShanghaiTimes,项目名称:Audacity2015,代码行数:11,代码来源:sndfnint.c


示例3: xlc_snd_eqbandvvv

LVAL xlc_snd_eqbandvvv(void)
{
    sound_type arg1 = getsound(xlgasound());
    sound_type arg2 = getsound(xlgasound());
    sound_type arg3 = getsound(xlgasound());
    sound_type arg4 = getsound(xlgasound());
    sound_type result;

    xllastarg();
    result = snd_eqbandvvv(arg1, arg2, arg3, arg4);
    return cvsound(result);
}
开发者ID:lackofentropy,项目名称:nyquist,代码行数:12,代码来源:sndfnint.c


示例4: xlc_snd_flute_freq

LVAL xlc_snd_flute_freq(void)
{
    double arg1 = testarg2(xlgaanynum());
    sound_type arg2 = getsound(xlgasound());
    sound_type arg3 = getsound(xlgasound());
    double arg4 = testarg2(xlgaanynum());
    sound_type result;

    xllastarg();
    result = snd_flute_freq(arg1, arg2, arg3, arg4);
    return cvsound(result);
}
开发者ID:lackofentropy,项目名称:nyquist,代码行数:12,代码来源:sndfnint.c


示例5: xlc_snd_sine

LVAL xlc_snd_sine(void)
{
    double arg1 = testarg2(xlgaanynum());
    double arg2 = testarg2(xlgaanynum());
    double arg3 = testarg2(xlgaanynum());
    double arg4 = testarg2(xlgaanynum());
    sound_type result;

    xllastarg();
    result = snd_sine(arg1, arg2, arg3, arg4);
    return cvsound(result);
}
开发者ID:AaronFae,项目名称:VimProject,代码行数:12,代码来源:sndfnint.c


示例6: xlc_snd_avg

LVAL xlc_snd_avg(void)
{
    sound_type arg1 = getsound(xlgasound());
    long arg2 = getfixnum(xlgafixnum());
    long arg3 = getfixnum(xlgafixnum());
    long arg4 = getfixnum(xlgafixnum());
    sound_type result;

    xllastarg();
    result = snd_avg(arg1, arg2, arg3, arg4);
    return cvsound(result);
}
开发者ID:AaronFae,项目名称:VimProject,代码行数:12,代码来源:sndfnint.c


示例7: xlc_snd_alpassvv

LVAL xlc_snd_alpassvv(void)
{
    sound_type arg1 = getsound(xlgasound());
    sound_type arg2 = getsound(xlgasound());
    sound_type arg3 = getsound(xlgasound());
    double arg4 = testarg2(xlgaanynum());
    sound_type result;

    xllastarg();
    result = snd_alpassvv(arg1, arg2, arg3, arg4);
    return cvsound(result);
}
开发者ID:lackofentropy,项目名称:nyquist,代码行数:12,代码来源:sndfnint.c


示例8: xlc_snd_slider

LVAL xlc_snd_slider(void)
{
    long arg1 = getfixnum(xlgafixnum());
    double arg2 = testarg2(xlgaanynum());
    double arg3 = testarg2(xlgaanynum());
    double arg4 = testarg2(xlgaanynum());
    sound_type result;

    xllastarg();
    result = snd_slider(arg1, arg2, arg3, arg4);
    return cvsound(result);
}
开发者ID:lackofentropy,项目名称:nyquist,代码行数:12,代码来源:sndfnint.c


示例9: xlc_snd_aresoncv

LVAL xlc_snd_aresoncv(void)
{
    sound_type arg1 = getsound(xlgasound());
    double arg2 = testarg2(xlgaanynum());
    sound_type arg3 = getsound(xlgasound());
    long arg4 = getfixnum(xlgafixnum());
    sound_type result;

    xllastarg();
    result = snd_aresoncv(arg1, arg2, arg3, arg4);
    return cvsound(result);
}
开发者ID:AaronFae,项目名称:VimProject,代码行数:12,代码来源:sndfnint.c


示例10: snd_make_yin

LVAL snd_make_yin(sound_type s, double low_step, double high_step, long stepsize)
{
    LVAL result;
    int j;
    register yin_susp_type susp;
    rate_type sr = s->sr;
    time_type t0 = s->t0;

    falloc_generic(susp, yin_susp_node, "snd_make_yin");
    susp->susp.fetch = yin_fetch;
    susp->terminate_cnt = UNKNOWN;

    /* initialize susp state */
    susp->susp.free = yin_free;
    susp->susp.sr = sr / stepsize;
    susp->susp.t0 = t0;
    susp->susp.mark = yin_mark;
    susp->susp.print_tree = yin_print_tree;
    susp->susp.name = "yin";
    susp->logically_stopped = false;
    susp->susp.log_stop_cnt = logical_stop_cnt_cvt(s);
    susp->susp.current = 0;
    susp->s = s;
    susp->s_cnt = 0;
    susp->m = (long) (sr / step_to_hz(high_step));
    if (susp->m < 2) susp->m = 2;
    /* add 1 to make sure we round up */
    susp->middle = (long) (sr / step_to_hz(low_step)) + 1;
    susp->blocksize = susp->middle * 2;
    susp->stepsize = stepsize;
    /* blocksize must be at least step size to implement stepping */
    if (susp->stepsize > susp->blocksize) susp->blocksize = susp->stepsize;
    susp->block = (sample_type *) malloc(susp->blocksize * sizeof(sample_type));
    susp->temp = (float *) malloc((susp->middle - susp->m + 1) * sizeof(float));
    susp->fillptr = susp->block;
    susp->endptr = susp->block + susp->blocksize;

    xlsave1(result);

    result = newvector(2);      /* create array for F0 and harmonicity */
    /* create sounds to return */
    for (j = 0; j < 2; j++) {
        sound_type snd = sound_create((snd_susp_type)susp,
                                      susp->susp.t0, susp->susp.sr, 1.0);
        LVAL snd_lval = cvsound(snd);
        /*      nyquist_printf("yin_create: sound %d is %x, LVAL %x\n", j, snd, snd_lval); */
        setelement(result, j, snd_lval);
        susp->chan[j] = snd->list;
        /* DEBUG: ysnd[j] = snd; */
    }
    xlpop();
    return result;
}
开发者ID:Grunji,项目名称:audacity,代码行数:53,代码来源:yin.c


示例11: xlc_snd_stkchorus

LVAL xlc_snd_stkchorus(void)
{
    sound_type arg1 = getsound(xlgasound());
    double arg2 = testarg2(xlgaanynum());
    double arg3 = testarg2(xlgaanynum());
    double arg4 = testarg2(xlgaanynum());
    double arg5 = testarg2(xlgaanynum());
    sound_type result;

    xllastarg();
    result = snd_stkchorus(arg1, arg2, arg3, arg4, arg5);
    return cvsound(result);
}
开发者ID:lackofentropy,项目名称:nyquist,代码行数:13,代码来源:sndfnint.c


示例12: xlc_snd_siosc

LVAL xlc_snd_siosc(void)
{
    LVAL arg1 = xlgetarg();
    double arg2 = testarg2(xlgaanynum());
    double arg3 = testarg2(xlgaanynum());
    double arg4 = testarg2(xlgaanynum());
    sound_type arg5 = getsound(xlgasound());
    sound_type result;

    xllastarg();
    result = snd_siosc(arg1, arg2, arg3, arg4, arg5);
    return cvsound(result);
}
开发者ID:AaronFae,项目名称:VimProject,代码行数:13,代码来源:sndfnint.c


示例13: xlc_snd_ifft

LVAL xlc_snd_ifft(void)
{
    double arg1 = testarg2(xlgaanynum());
    double arg2 = testarg2(xlgaanynum());
    LVAL arg3 = xlgetarg();
    long arg4 = getfixnum(xlgafixnum());
    LVAL arg5 = xlgetarg();
    sound_type result;

    xllastarg();
    result = snd_ifft(arg1, arg2, arg3, arg4, arg5);
    return cvsound(result);
}
开发者ID:AaronFae,项目名称:VimProject,代码行数:13,代码来源:sndfnint.c


示例14: xlc_snd_buzz

LVAL xlc_snd_buzz(void)
{
    long arg1 = getfixnum(xlgafixnum());
    double arg2 = testarg2(xlgaanynum());
    double arg3 = testarg2(xlgaanynum());
    double arg4 = testarg2(xlgaanynum());
    sound_type arg5 = getsound(xlgasound());
    sound_type result;

    xllastarg();
    result = snd_buzz(arg1, arg2, arg3, arg4, arg5);
    return cvsound(result);
}
开发者ID:AaronFae,项目名称:VimProject,代码行数:13,代码来源:sndfnint.c


示例15: xlc_snd_phasevocoder

LVAL xlc_snd_phasevocoder(void)
{
    sound_type arg1 = getsound(xlgasound());
    sound_type arg2 = getsound(xlgasound());
    long arg3 = getfixnum(xlgafixnum());
    long arg4 = getfixnum(xlgafixnum());
    long arg5 = getfixnum(xlgafixnum());
    sound_type result;

    xllastarg();
    result = snd_phasevocoder(arg1, arg2, arg3, arg4, arg5);
    return cvsound(result);
}
开发者ID:lackofentropy,项目名称:nyquist,代码行数:13,代码来源:sndfnint.c


示例16: sound_max

double sound_max(LVAL snd_expr, long n)
{
    LVAL s_as_lval;
    sound_type s = NULL;
    long blocklen;
    sample_block_values_type sbufp;
    register double maximum = 0;

    s_as_lval = xleval(snd_expr);
    /* BE CAREFUL - DO NOT ALLOW GC TO RUN WHILE LVAL IS UNPROTECTED */
    if (exttypep(s_as_lval, a_sound)) {
        /* if snd_expr was simply a symbol, then s now points to
        a shared sound_node.  If we read samples from it, then
        the sound bound to the symbol will be destroyed, so
        copy it first.  If snd_expr was a real expression that
        computed a new value, then the next garbage collection
        will reclaim the sound_node.  We need to make the new
        sound reachable by the garbage collector to that any
        lisp data reachable from the sound do not get collected.
        To make the sound reachable, we need to allocate a node,
        and the GC might run, so we need to protect the OLD s
        but then make it unreachable.
        We will let the GC collect the sound in the end.
        */
        xlprot1(s_as_lval);
        s = sound_copy(getsound(s_as_lval));
        s_as_lval = cvsound(s);	/* destroys only ref. to original */
        /* printf("sound_max: copy is %x, lval %x\n", s, s_as_lval); */
        while (n > 0) {
            long togo, j;
            sample_block_type sampblock = 
              sound_get_next(s, &blocklen);
            if (sampblock == zero_block || blocklen == 0) {
                break;
            }
            togo = MIN(blocklen, n);
            sbufp = sampblock->samples;
            for (j = 0; j < togo; j++) {
                register double samp = *sbufp++;
                if (samp > maximum) maximum = samp;
                else if (-samp > maximum) maximum = -samp;
            }
            n -= togo;
        }
        xlpop();
    } else {
        xlerror("sound_max: expression did not return a sound",
                 s_as_lval);
    }
    return maximum * s->scale;
}
开发者ID:AaronFae,项目名称:VimProject,代码行数:51,代码来源:sndmax.c


示例17: xlc_snd_mandolin

LVAL xlc_snd_mandolin(void)
{
    double arg1 = testarg2(xlgaanynum());
    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_mandolin(arg1, arg2, arg3, arg4, arg5, arg6);
    return cvsound(result);
}
开发者ID:lackofentropy,项目名称:nyquist,代码行数:14,代码来源:sndfnint.c


示例18: xlc_snd_osc

LVAL xlc_snd_osc(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());
    double arg7 = testarg2(xlgaanynum());
    sound_type result;

    xllastarg();
    result = snd_osc(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
    return cvsound(result);
}
开发者ID:AaronFae,项目名称:VimProject,代码行数:15,代码来源:sndfnint.c


示例19: xlc_snd_flute_all

LVAL xlc_snd_flute_all(void)
{
    double arg1 = testarg2(xlgaanynum());
    sound_type arg2 = getsound(xlgasound());
    sound_type arg3 = getsound(xlgasound());
    double arg4 = testarg2(xlgaanynum());
    double arg5 = testarg2(xlgaanynum());
    sound_type arg6 = getsound(xlgasound());
    sound_type arg7 = getsound(xlgasound());
    double arg8 = testarg2(xlgaanynum());
    sound_type result;

    xllastarg();
    result = snd_flute_all(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    return cvsound(result);
}
开发者ID:lackofentropy,项目名称:nyquist,代码行数:16,代码来源:sndfnint.c


示例20: xlc_snd_sampler

LVAL xlc_snd_sampler(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 arg7 = getsound(xlgasound());
    long arg8 = getfixnum(xlgafixnum());
    sound_type result;

    xllastarg();
    result = snd_sampler(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    return cvsound(result);
}
开发者ID:AaronFae,项目名称:VimProject,代码行数:16,代码来源:sndfnint.c



注:本文中的cvsound函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ cvtnum函数代码示例发布时间:2022-05-30
下一篇:
C++ cvmx_sysinfo_get函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap