How to use the pdm.pdm1.Player function in pdm

To help you get started, we’ve selected a few pdm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mkj / pru-mic / pdm / pdm1.py View on Github external
def run_cic1(args, inf, decim, wavdiv, scaleboost, doplot, wavfn = None):

    rate = F/decim
    newrate = rate / wavdiv
    w = openwav(wavfn, newrate) if wavfn else None

    play = Player(newrate, INCHUNK)

    decoder = cic.cic_n4m2(decim)

    if args.bitex:
        ins = bitexstream(inf, INCHUNK)
    else:
        ins = demuxone(inf, INCHUNK, TESTMIC)

    for chunk, insamps in enumerate(ins):
        first = (chunk == 0)

        if first:
            print("insamps mean %f rms %f" % (np.mean(insamps), np.mean(insamps**2)**0.5))
            print("insamps min %f max %f" % (np.min(insamps), np.max(insamps)))
            maxamp = decoder.getmaxamp()
            maxbits = np.log2(maxamp)

pdm

A modern Python package and dependency manager supporting the latest PEP standards

MIT
Latest version published 9 days ago

Package Health Score

94 / 100
Full package analysis