The recording remains the source / 09SI · L00P.AI

The same samples at a different rate

A 24 kHz label is not enough. Our own PCM trial compares changing a rate declaration with recalculating samples and checking duration.

2026-11-21 · 1.0 · PL / EN

01 / The same label, a different result

You receive two files labelled “24 kHz”. One lasts twice as long as the source; the other keeps its duration. Matching the sample-rate field alone does not establish that the requested conversion took place. The brief must also specify the intended duration and whether sample data should be recalculated.

This develops our render acceptance method. That trial checked trimming at one rate. Here we compare a rate declaration with resampling on a separate signal of our own. We do not assess how a conversation sounds.

02 / A count needs a time unit

In this mono trial, one audio frame contains one sample. With 4800 frames at 48,000 frames per second, the duration calculated from the data is 4800 / 48,000 = 0.1 s. Keep every frame but declare 24,000 per second, and the result is 4800 / 24,000 = 0.2 s.

Changing those numbers does not establish that PCM values changed. Resampling, in turn, can change the number and values of samples while preserving duration. In stereo, a frame contains one sample from each channel; frame count should not be confused with the total number of samples across channels.

03 / Five files, one preserved source

On 21 November 2026 we created our own signal: 4800 integer values following (i % 48 - 24) * 400, mono, signed 16-bit little-endian PCM at 48,000 Hz. The PCM payload occupied 9600 bytes. We saved the protocol and expected results before executing the trial.

We preserved the source. In a separate header copy, we changed the rate to 24,000 Hz and the dependent bytes-per-second field. All other bytes remained unchanged. This operates on our own simple WAV header; it is not a recipe for editing arbitrary WAV files.

From the same source, FFmpeg made three further copies: asetrate=24000, aresample=24000:resampler=swr:dither_method=none, and an anull control. We used the installed build dated 12 November 2025, identifier 6cdd2cbe32, and Python 3.11.11. The current Python documentation covers 3.11.18; these versions are distinguished.

04 / What actually came out

The source and control each had 4800 frames at 48,000 Hz, or 0.1 s. The entire control PCM payload matched the source.

The header copy and asetrate result each had 4800 frames at 24,000 Hz, or 0.2 s. All 9600 PCM bytes in both files matched the source. Equal PCM payloads do not imply equal complete files, including headers and additional fields.

The aresample result contained 2400 frames at 24,000 Hz: 4800 PCM bytes and 0.1 s. Its PCM data changed. We retained every decoded sample, command, and file hash; all 30 recorded controls passed. We did not compare the resampled values against an independent implementation.

Own PCM trial: source and anull 0.1 s; header copy and asetrate 0.2 s with unchanged PCM; aresample 0.1 s with recalculated PCM.
Source: 48000 Hz | 4800 frames
9600 B PCM | 0.1 s | PCM matches source

Header copy: 24000 Hz | 4800 frames
9600 B PCM | 0.2 s | PCM matches source

asetrate: 24000 Hz | 4800 frames
9600 B PCM | 0.2 s | PCM matches source

aresample: 24000 Hz | 2400 frames
4800 B PCM | 0.1 s | Changed PCM

anull control: 48000 Hz | 4800 frames
9600 B PCM | 0.1 s | PCM matches source

The negative control has a practical implication: a defective gate checking only “24 kHz” accepted both the 0.2 s copy and the 0.1 s resampled file. An instruction to preserve duration requires more than checking the format label.

05 / A conversion acceptance card

  • Record source rate, channels, sample format, frame count, and duration; preserve the original and its hash.
  • Define the objective: reinterpret the data or recalculate samples while preserving duration. Set the tolerance before execution.
  • Record the full command, tool version, and a separate output path.
  • Compare declared frame count with the complete PCM actually read; calculate duration as frames / rate.
  • Compare PCM data wherever preservation is required. For resampling, similar duration alone is not a quality assessment.
  • Review listening quality and destination requirements separately. This trial does not replace those checks.

Need such a card for your export? Start with a preserved source and an unambiguous description of the intended result.

06 / Provenance and limits

FFmpeg's asetrate documentation describes a rate change without changing PCM, with changes to speed and pitch. Aresample transforms audio data according to parameters. The wave documentation describes WAV frame and parameter reads. We read the relevant sections and installed filter help, retaining dated source snapshots.

Codex prepared the protocol, original signal, script, measurement, and PL/EN text. This is an agent's author review; no independent second-model review took place. No human voices, third-party music, or broadcast recordings were used.

There was no listening test, pitch, loudness, resampling-quality measurement, or production test. The trial does not cover MP3, AAC, all WAV decoders, or UTC clock synchronization. A tool, parameter, or input change, or a discovered error, requires another check; the earlier measurement remains evidence for its own version.