DEV Community

Alex Creatune
Alex Creatune

Posted on

What Does 24-bit PCM Mean? Check Sample Width After a WAV Export

A WAV delivery request can specify 24-bit PCM. To check that requirement, read the sample width of the delivered file. The filename and the waveform display provide other information, while sample width answers how many bytes store each sample.

I'm Alex from the Creatune team. On November 8, 2026, I created a one-second 24-bit PCM fixture, converted it through our public English audio converter, and inspected the downloaded WAV. The measurements below cover file metadata. I did not perform a listening comparison.

Put bit depth, sample rate, and channels in separate fields

For ordinary integer PCM, bit depth describes the number of bits used for each channel's sample. A 24-bit sample occupies three bytes. A 16-bit sample occupies two. Their representable integer grids contain 2^24 and 2^16 values respectively.

Sample rate describes the number of frames per second. Channel count describes how many samples occur in each frame. For an uncompressed PCM payload, the basic relationship is

payload_bytes = frames * channels * bytes_per_sample
seconds = frames / sample_rate
Enter fullscreen mode Exit fullscreen mode

A WAV file also contains a header and may contain additional chunks, so its total byte size can exceed the audio payload. Treat the delivered file's encoding, sample rate, channel count, and duration as separate acceptance fields.

Create a source with known properties

This Python script writes a mono, 48 kHz, 24-bit integer PCM WAV. It uses a short synthetic tone so the example can be reproduced without recording or licensing an external track.

import math
import wave

rate = 48000
samples = bytearray()
for frame in range(rate):
    value = round(0.2 * 8388607 * math.sin(2 * math.pi * 440 * frame / rate))
    samples.extend(value.to_bytes(3, "little", signed=True))

with wave.open("mono24-48000-1s.wav", "wb") as audio:
    audio.setnchannels(1)
    audio.setsampwidth(3)
    audio.setframerate(rate)
    audio.writeframes(samples)
Enter fullscreen mode Exit fullscreen mode

The positive full-scale integer for signed 24-bit PCM is 8,388,607. The 0.2 multiplier keeps this fixture's amplitude comfortably inside its numeric range.

Convert the fixture and retain both files

Open the English Creatune audio converter and choose the fixture with Choose audio. The page displayed the filename and a rounded duration of 1.0 s. In this session, the initial output selection was MP3. Audio converter

The public audio converter displays the owned one-second fixture before choosing the export format

Open Output format, select WAV, and choose Download. Keep the source file and save a separate copy of the download as converted.wav. The browser suggested mono24-48000-1s-audio-converter.wav during this test.

WAV selected in the public converter before downloading the measured output

The visible controls in this workflow select the output format. They do not expose a separate bit-depth selector. The export therefore needs a file-level check against any 24-bit delivery requirement.

Read the downloaded metadata

Run this script in the directory containing the two files

import wave

for name in ("mono24-48000-1s.wav", "converted.wav"):
    with wave.open(name, "rb") as audio:
        width = audio.getsampwidth()
        rate = audio.getframerate()
        frames = audio.getnframes()
        print(
            name,
            "width_bytes=", width,
            "bits=", width * 8,
            "rate=", rate,
            "channels=", audio.getnchannels(),
            "frames=", frames,
            "seconds=", frames / rate,
        )
Enter fullscreen mode Exit fullscreen mode

Python's wave reader supports the uncompressed PCM files used here. A float or compressed WAV may need a reader that supports its encoding. If the reader rejects the file, inspect that encoding before treating its width as an integer-PCM bit depth.

These are the values measured in this run

Field Source Downloaded WAV
Bytes per sample 3 2
Integer PCM bit depth 24 16
Sample rate 48,000 Hz 44,100 Hz
Channels 1 2
Frames 48,000 44,099
Duration 1.0 s 0.9999773242630385 s

The downloaded file used 16-bit PCM, so it did not meet a requirement to retain 24-bit PCM. Its sample rate and channel count also changed. At 44.1 kHz, 44,100 frames would make exactly one second. This output had one fewer frame, about 22.7 microseconds shorter, while the tool's rounded display still showed 1.0 s.

Those observations apply to this fixture and this export. The measurements establish the stored format and duration. They leave listening quality, effective recording resolution, and the treatment of other inputs for separate checks.

Turn the requirement into a reproducible decision

Write an acceptance record before delivering the converted file

Required encoding: integer PCM
Required sample width: 3 bytes / 24 bits
Required sample rate: 48000 Hz
Required channels: 1
Duration tolerance: define it with the recipient
Observed output: 2 bytes / 16 bits, 44100 Hz, 2 channels
Decision for this requirement: choose an export workflow with the required controls
Enter fullscreen mode Exit fullscreen mode

Increasing the sample width of an already quantized file can provide a larger storage representation, while the earlier quantization has already limited the stored values. Keep the original recording when later processing or delivery depends on that precision.

Our earlier WAV handoff checklist helps turn these fields into an explicit agreement with the next tool or collaborator. WAV delivery requirements

For a separate amplitude check after processing, our reproducible gain test shows how to measure sample peaks and record their units. Measuring a gain change with sample peaks

Top comments (0)