Skip to content
Open
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
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CXX = g++

CXXFLAGS_32 = -msse2
CXXFLAGS_64 =
CXXFLAGS = $(CXXFLAGS_$(ARCH)) -std=c++11 -Wall -O3
CXXFLAGS = $(CXXFLAGS_$(ARCH)) -fPIC -std=c++11 -Wall -O3
#CXXFLAGS += -g -ggdb3

VPATH = libdstdec:libdsd2pcm:libsacd
Expand All @@ -20,12 +20,24 @@ LIBRARY_DIRS = libdstdec libdsd2pcm libsacd
LDFLAGS = $(foreach librarydir,$(LIBRARY_DIRS),-L$(librarydir))
LDFLAGS += $(foreach library,$(LIBRARIES),-l$(library))

CONTRIBDIR=contrib
CONTRIBS=sacdinfo

PREFIX := /usr

.PHONY: all clean install

all: clean $(PNAME)

contrib: $(PNAME)
for prog in $(CONTRIBS);do $(MAKE) -C $(CONTRIBDIR)/$$prog;done

contrib_shared: shared
for prog in $(CONTRIBS);do $(MAKE) -C $(CONTRIBDIR)/$$prog shared;done

contrib_install:
for prog in $(CONTRIBS);do $(MAKE) -C $(CONTRIBDIR)/$$prog install;done

str_data: dst_defs.h str_data.h str_data.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c libdstdec/str_data.cpp -o libdstdec/str_data.o

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Super Audio CD decoder.
Converts SACD image files, Philips DSDIFF and Sony DSF files to 24-bit high resolution wave files. Handles both DST and DSD streams.

## Usage

```
sacd -i infile [-o outdir] [options]

-i, --infile : Specify the input file (*.iso, *.dsf, *.dff)
Expand All @@ -26,4 +26,4 @@ sacd -i infile [-o outdir] [options]
lists either one progress percentage per line, or one
status/error message.
-h, --help : Show this help message

```
674 changes: 674 additions & 0 deletions contrib/sacdinfo/LICENSE

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions contrib/sacdinfo/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
PNAME=sacdinfo

SACDBUILD=../..
SACDLIB=sacd

SLBUILDVER=19
SLBUILDNAME=lib${SACDLIB}.so.${SLBUILDVER}

SLSTATICOBJS=sacd_media.o scarletbook.o sacd_disc.o sacd_dsdiff.o sacd_dsf.o
SLSTATLINK=$(foreach obj,$(SLSTATICOBJS),$(SACDBUILD)/lib$(SACDLIB)/$(obj))

ARCH = $(shell getconf LONG_BIT)

CXX = g++

CXXFLAGS_32 = -msse2
CXXFLAGS_64 =
CXXFLAGS = $(CXXFLAGS_$(ARCH)) -std=c++11 -Wall -O3

CPPFLAGS += -I${SACDBUILD}

PREFIX := /usr

.PHONY: all clean install

all: clean $(PNAME)

main: main.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c main.cpp -o main.o

$(PNAME): main $(SLSTATLINK)
$(CXX) $(CXXFLAGS) -o ${PNAME} main.o $(LDFLAGS) $(SLSTATLINK)

shared: main ${SACDBUILD}/${SLBUILDNAME}
$(CXX) $(CXXFLAGS) -o ${PNAME} main.o $(LDFLAGS) ${SACDBUILD}/${SLBUILDNAME}

clean:
rm -f $(PNAME) *.o

install: ${PNAME}

install -d $(DESTDIR)$(PREFIX)/bin
install -m 0755 $(PNAME) $(DESTDIR)$(PREFIX)/bin
install -d $(DESTDIR)$(PREFIX)/share/man/man1
install -m 0644 $(PNAME).1 $(DESTDIR)$(PREFIX)/share/man/man1

23 changes: 23 additions & 0 deletions contrib/sacdinfo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## sacdinfo - a program using libsacd to dump information from SACD files

This software is a simple utility to query track information (artist, title, channels, ...) from SACD audio files. It relies upon *libsacd*, from the [SACD](https://github.com/Sound-Linux-More/sacd) utility, which is available as part of the sound-linux-more package. For simplicity's sake, it makes use of the library and is also distributed under the same GPL 3 license as the SACD utility.

You may dump information from any set of one or more files in either human-readable text form, or a JSON format similar to the one used in Andrew Radav's [ID3-JSON](https://github.com/AndrewRadev/id3-json). In either case, output can be written to the terminal, or to a file.

### Build

The Makefile should be sufficient. There are two interesting targets, one for *sacdextras*, and one for *shared*. The former links statically with the object files generated in the man *sacd* build in the parent directory. The latter uses the share library generated when you *make shared* up there.

### Usage
```
sacdinfo [-o outfile] [-j] [-s SECTION] [-t TRACK] <file> [file] [file...]
-o, --output : Write the output to a given file.
-j, --json : Format the output as JSON, instead of plain text.
-s, --section : Read one of "[S]tereo" or "[M]ultichannel" areas.
-t, --track : Look up this single track. (Requires you to
specify a section, and only a single file)
-h, --help : Show this message
Note that track and section may be left out, and the default is toread everything.
```


Loading