SSampleCairn
Product

Product features · Signed PCM24 sample decoding

01

Review pcm24.py around the sign bit in the third byte before passing its integer samples to other audio code.

01

Connection

Base URL, credentials and a reachable server.

02

Selection

A model available through the configured endpoint.

03

Capabilities

Context limits and tool support are determined by the model and server.

Signed PCM24 sample decoding

● ● ●SampleCairn●
A concrete starting point · Signed PCM24 sample decoding ×
def pcm24_samples(data):
    if type(data) is not bytes or len(data) % 3 or len(data) > 12288:
        raise ValueError("pcm.bytes")
    result = []
    for i in range(0, len(data), 3):
        value = data[i] | data[i+1] << 8 | data[i+2] << 16
        result.append(value-(1 << 24) if value & (1 << 23) else value)
    return result
✳Signed PCM24 sample decoding
✓ ChangesReview before applying ↗
Illustrative workspace
AI coding workspace

Your next change starts here.

Get the Windows app ↗