Skip to content

Audio lossyness between different CPU architectures #7

@T-3B

Description

@T-3B

Recently I discovered a strange behavior with SAC.

Steps to reproduce:

  • Choose a .wav file to encode, the longer the more likely the problem will occur.
  • Encode a file on a specific CPU architecture (let's say x86-64). Any settings are fine (so for simplicity I chose the fastest - e.g. no argument given to sac).
  • Decode the encoded file on a *different CPU architecture (let's say aarch64/ARM).
  • Check the audio checksums with ffmpeg -v error -i <file.wav> -f streamhash -
  • You will see that the decoded .wav does not match the input one (while if you used the same CPU architecture for both encoding and decoding they would match). You can also listen to the decoded file, warning: loud electronic noise.

Tested with aarch64 and x86-64, both with clang 16.0.6 and clang++ -O3 -flto -march=native -s

At least SAC encoding is architecture-dependent (different architectures will give different encoded SAC files - even the size).

On Mega, you can find the original WAV file, as well as the aarch64 and x86-64 SAC encoded files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions