ngspice/README.wavsim

33 lines
1.4 KiB
Plaintext
Raw Normal View History

2026-04-30 13:40:39 +02:00
This branch, contains functions to read, simulate and output wav audio files.
2020-08-01 22:46:21 +02:00
The origin of the code stems from
http://gareus.org/oss/spicesound/start
http://gareus.org/oss/spicesound/examples
2026-04-30 13:40:39 +02:00
and has been made by Robin Gareus, enhanced by Hannu Vuolasaho at
2024-08-04 12:23:58 +02:00
https://sourceforge.net/p/ngspice/patches/13/,
2026-04-30 13:40:39 +02:00
compatibility and integration into ngspice-46 by Holger Vogt.
2020-08-01 22:46:21 +02:00
2024-08-04 12:23:58 +02:00
It uses the external libraries libsndfile and libsamplerate.
2020-08-01 22:46:21 +02:00
2026-04-30 13:40:39 +02:00
The current setup (ngspice.exe) has been tested with MSVC 2022 and CYGWIN on Windows 11.
2024-08-04 12:23:58 +02:00
A setup for KiCad (MS Windows) is available.
2020-08-01 22:46:21 +02:00
2024-08-04 12:23:58 +02:00
64 bit libsndfile has been downloaded from https://github.com/libsndfile/libsndfile/releases/
2020-08-01 22:46:21 +02:00
2024-08-04 12:23:58 +02:00
64 bit libsamplerate has been downloaded from https://github.com/libsndfile/libsamplerate/releases
2020-08-01 22:46:21 +02:00
The usage is described in
http://gareus.org/oss/spicesound/start
2026-04-30 13:40:39 +02:00
Example files are available at \examples\wave
Compiling for macOS M2 requires installing libsndfile and libsamplerate from Homebrew.
compile_macos_clang_M2.sh has been enhanced by adding
-I/opt/homebrew/opt/libsndfile/include -I/opt/homebrew/opt/libsamplerate/include
to CFLAGS and
-L/opt/homebrew/opt/libsndfile/lib -L/opt/homebrew/opt/libsamplerate/lib
to LDFLAGS
2026-04-30 15:24:04 +02:00
Linux Ubuntu 24.04 has the libraries libsndfile0 and libsamplerate0 available automatically.
You may need to install (with apt) the development header files libsndfile0-dev and libsamplerate0-dev.