Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ezaudio/LAWS.bend → LAWS.bend
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# MPEG-1 Layer III frames. PROOF.bend fills them.
import Base
import ./main.bend as Au
import ./wav.bend as Wav
import ./mp3.bend as Mp3
import ./mp3_dec.bend as Dec
import ./mp3_enc.bend as Enc
import ./mp3_syn.bend as Syn
import ./src/wav.bend as Wav
import ./src/mp3.bend as Mp3
import ./src/mp3_dec.bend as Dec
import ./src/mp3_enc.bend as Enc
import ./src/mp3_syn.bend as Syn

# two s16 frames at 8000 Hz
def fix.mono() -> Au.Clip:
Expand Down
2 changes: 1 addition & 1 deletion ezaudio/PROOF.bend → PROOF.bend
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ezaudio: the proofs. `bend ezaudio/PROOF.bend` is the gate.
# ezaudio: the proofs. `bend PROOF.bend` is the gate.
import Base
import ./LAWS.bend as Laws

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def main() -> U32:

## Compliance

Closed equalities in `ezaudio/LAWS.bend`, proved in `ezaudio/PROOF.bend`
(`bend ezaudio/PROOF.bend`), target:
Closed equalities in `LAWS.bend`, proved in `PROOF.bend`
(`bend PROOF.bend`), target:

- The IBM/Microsoft RIFF WAVE form: the `RIFF`, `WAVE`, `fmt `, and `data`
identifiers. A mono signed-16 clip at 8000 Hz encodes as PCM (format tag 1),
Expand Down
2 changes: 1 addition & 1 deletion bench/compare.nix
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def correct_wav():

def correct_mp3():
log("\n== MP3 correctness (LAWS fixtures + ffmpeg where fair) ==")
# Silent frame fixtures matching ezaudio/LAWS.bend (correctness only; not speed)
# Silent frame fixtures matching LAWS.bend (correctness only; not speed)
silent_cases = [
("silence 44100 mono", [255, 251, 224, 196], 1044, 44100, 1, 1152),
("silence 44100 stereo", [255, 251, 224, 4], 1044, 44100, 2, 2304),
Expand Down
5 changes: 3 additions & 2 deletions bench/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
lib,
bend,
bend-cc,
# Flake `self` (repo root). Used only to copy ezaudio/ + bench/main.bend.
# Flake `self` (repo root). Used only to copy main.bend, src/ and bench/main.bend.
self,
}:

Expand All @@ -25,7 +25,8 @@ let
dontUnpack = true;
nativeBuildInputs = [ bend llvm.clang ];
buildPhase = ''
cp -r ${self}/ezaudio ./ezaudio
cp ${self}/main.bend ./main.bend
cp -r ${self}/src ./src
mkdir -p bench
cp ${./main.bend} bench/main.bend
cd bench
Expand Down
2 changes: 1 addition & 1 deletion bench/main.bend
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Built as a native ELF via `bend bench/main.bend -o …` (CC=bend-cc or clang -O3).
# Speed path: bench-*-enc-file / bench-*-dec time the codec only (load outside IO.now).
# Prefer non-silent EZA fixtures for MP3 so the filterbank path is measured, not silence.
import ../ezaudio/main.bend as Au
import ../main.bend as Au

# unwrap a parsed U32, or zero when parse fails
def u32.arg.go(m: Maybe<&2, U32>) -> U32:
Expand Down
2 changes: 1 addition & 1 deletion ez.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ezaudio"
entry = "ezaudio/main.bend"
entry = "main.bend"

[tools.bolt]
git = "https://github.com/Emerging-Patterns/bolt"
Expand Down
4 changes: 2 additions & 2 deletions ezaudio/main.bend → main.bend
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# interleaved PCM frames. WAV reads and writes RIFF PCM. MP3 reads and writes
# MPEG-1 Layer III.
import Base
import ./wav.bend as Wav
import ./mp3.bend as Mp3
import ./src/wav.bend as Wav
import ./src/mp3.bend as Mp3

# signed 16-bit PCM, or IEEE 754 binary32
type Format is Data:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading