1- ////////////////////////////////////////////////////////////////////////////
2- // ****** SLAC ****** //
3- // Simple Lossless Audio Compressor //
4- // Copyright (c) 2019 - 2022 David Bryant //
5- // All Rights Reserved. //
6- // Distributed under the BSD Software License (see license.txt) //
7- ////////////////////////////////////////////////////////////////////////////
8-
9- Update: Since I developed and named this codec I have been made aware of a
10- proprietary audio compression algorithm from Texas Instruments for
11- its CC85xx line of chips (and perhaps others) also called SLAC
12- (Slightly Lossy Audio Codec). There is no relation between the two
13- codecs (mine is completely original and neither lossy nor
14- proprietary). I apologize for any confusion.
15-
1+ ` ORG.SLM: `
2+ ![ GitHub release (latest by date)] ( https://img.shields.io/github/v/release/Sound-Linux-More/slac )
3+ ![ GitHub Release Date] ( https://img.shields.io/github/release-date/Sound-Linux-More/slac )
4+ ![ GitHub repo size] ( https://img.shields.io/github/repo-size/Sound-Linux-More/slac )
5+ ![ GitHub all releases] ( https://img.shields.io/github/downloads/Sound-Linux-More/slac/total )
6+ ![ GitHub] ( https://img.shields.io/github/license/Sound-Linux-More/slac )
7+
8+ # SLAC
9+
10+ | ***** * SLAC ***** * |
11+ | :---:|
12+ | Simple Lossless Audio Compressor |
13+ | Copyright (c) 2019 - 2022 David Bryant. |
14+ | All Rights Reserved. |
15+ | Distributed under the BSD Software License (see license.txt) |
16+
17+ ## Update
18+ Since I developed and named this codec I have been made aware of a
19+ proprietary audio compression algorithm from Texas Instruments for
20+ its CC85xx line of chips (and perhaps others) also called SLAC
21+ (Slightly Lossy Audio Codec). There is no relation between the two
22+ codecs (mine is completely original and neither lossy nor
23+ proprietary). I apologize for any confusion.
24+
25+ ## Intro
1626A very simple lossless audio compressor. Designed to achieve about the same
1727compression as flac -0 or shorten with the absolute minimum amount of
1828complexity (in fact, the entire library for both encoding and decoding is a
@@ -34,29 +44,46 @@ no error detection, and no seeking capability. The format COULD be used
3444inside of another container format like Matroska, but I'm not sure that
3545would have any value.
3646
47+ ## Build
3748To build the demo app:
38-
39- $ gcc -O2 *.c -o slac
40-
41- The "help" display from the demo app:
42-
43- Usage: SLAC [-options] infile.wav outfile.slac
44- SLAC -d [-options] infile.slac outfile.wav
45-
46- Pipes: specify '-' for filename, but not WAV output
47-
48- Options: -d = decode operation (default = encode))
49- -bn = override block samples (default = 1024)
50- -h = display this help message
51- -j0 = encode stereo files as L/R
52- -j1 = encode stereo files as M/S (default)
53- -j2 = encode stereo files using best (slow)
54- -q = quiet mode (display errors only)
55- -r = raw output (no WAV header written)
56- -v = verbose (display lots of info)
57- -y = overwrite outfile if it exists
58-
59-
49+ ``` sh
50+ $ make
51+ ```
52+ or
53+ ``` sh
54+ $ make SHARED=Y
55+ ```
56+ or
57+ ``` sh
58+ $ gcc -Wall -O2 src/* .c -o slac
59+ ```
60+
61+ ## Use
62+
63+ ### Usage
64+ ``` sh
65+ slac [-options] infile.wav outfile.slac
66+ slac -d [-options] infile.slac outfile.wav
67+ ```
68+
69+ ### Pipes
70+ Specify ` - ` for filename, but not WAV output
71+
72+ ### Options
73+ ``` sh
74+ -d = decode operation (default = encode))
75+ -bn = override block samples (default = 1024)
76+ -h = display this help message
77+ -j0 = encode stereo files as L/R
78+ -j1 = encode stereo files as M/S (default)
79+ -j2 = encode stereo files using best (slow)
80+ -q = quiet mode (display errors only)
81+ -r = raw output (no WAV header written)
82+ -v = verbose (display lots of info)
83+ -y = overwrite outfile if it exists
84+ ` ` `
85+
86+ # # Algorithm
6087The compression algorithm uses only standard techniques:
6188
62891. The audio data samples are divided into blocks. By default these are 1024
0 commit comments