https://github.com/jprjr/spc2wav
Converts SPC to WAV using Blargg's snes_spc library
https://github.com/jprjr/spc2wav
Last synced: 3 months ago
JSON representation
Converts SPC to WAV using Blargg's snes_spc library
- Host: GitHub
- URL: https://github.com/jprjr/spc2wav
- Owner: jprjr
- License: mit
- Created: 2020-02-19T19:38:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-15T16:00:00.000Z (over 2 years ago)
- Last Synced: 2025-03-25T06:41:50.024Z (3 months ago)
- Language: C
- Size: 21.5 KB
- Stars: 11
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# spc2wav
This is just a small CLI program for decoding an SPC file
into a WAV file, using Blargg's [snes_spc library](http://www.slack.net/~ant/libs/audio.html#snes_spc).It uses a higher amplification level compared to most SPC decoders,
this can be controlled via CLI with the `--amp` flag.The default amplification level is `384`, most players/decoders based on `snes_spc`
default to `256`You can also opt to use the amplification tag found in some SPC files. This is
exceedingly rare, and I'll be honest, I'm not sure if it should be honored.You can also enable ID3 tags with the `--id3` switch.
## Building
`snes_spc` and `id666` should be available as shared or static libraries.
I have a fork of `snes_spc` available that incorporates some fixes from the
game-music-emu library, and includes a Makefile suitable for building a
library and installing headers.Alternatively, here's a small Makefile that can be used with `snes_spc` version
0.9.0. Unzip `snes_spc-0.9.0.zip` and place this into a `Makefile` in the
`snes_spc-0.9.0` folder, then run `make` and `make install`.```Makefile
.PHONY: all clean installCFLAGS = -I. -O2 -fPIC -Wall -Wextra -Wno-implicit-fallthrough -DNDEBUG -DBLARGG_BUILD_DLL
CXXFLAGS = -I. -O2 -fPIC -fno-exceptions -Wno-implicit-fallthrough -fno-rtti -Wall -Wextra -std=c++98 -DNDEBUG -DBLARGG_BUILD_DLLSTATIC_PREFIX=lib
DYNLIB_PREFIX=lib
STATIC_EXT=.a
DYNLIB_EXT=.soSPC_A = $(STATIC_PREFIX)spc$(STATIC_EXT)
SPC_SO = $(DYNLIB_PREFIX)spc$(DYNLIB_EXT)DESTDIR=
PREFIX=/usr/local
LIBDIR=$(DESTDIR)$(PREFIX)/lib
INCDIR=$(DESTDIR)$(PREFIX)/include/snes_spcall: $(SPC_A) $(SPC_SO)
SPC_CPP_SRCS = \
snes_spc/SPC_Filter.cpp \
snes_spc/SNES_SPC.cpp \
snes_spc/SNES_SPC_misc.cpp \
snes_spc/SNES_SPC_state.cpp \
snes_spc/SPC_DSP.cpp \
snes_spc/spc.cpp \
snes_spc/dsp.cppSPC_CPP_OBJS = $(SPC_CPP_SRCS:.cpp=.o)
SPC_HEADERS = snes_spc/spc.h
$(SPC_A): $(SPC_CPP_OBJS)
$(AR) rcs $@ $^$(SPC_SO): $(SPC_CPP_OBJS)
$(CXX) -shared -o $@ $^clean:
rm -f $(SPC_CPP_OBJS) $(SPC_A) $(SPC_SO)install: $(SPC_A) $(SPC_SO)
install -d $(LIBDIR)/
install -m 644 $(SPC_A) $(LIBDIR)/$(SPC_A)
install -m 755 $(SPC_SO) $(LIBDIR)/$(SPC_SO)
install -d $(INCDIR)/
install -m 644 $(SPC_HEADERS) $(INCDIR)/```
## LICENSE
MIT