|
SoundSynth 1.1.1
A small compiled library with applications for C sound synthesis and playback functions. The library was compiled for Windows 64-bit and should work with 64- or 32-bit windows architectures.
|
This is a small compiled library for C synthesizing simple sounds/tones and playing them. The library was compiled for Windows 64-bit and should work with 64- or 32-bit windows architectures.
To re-compile the executable bin/wplay.exe use the following command:
To re-compile the executable bin/wplay_ui.exe use the following command:
To re-compile the dynamic link library (.dll), use the following command:
-shared option creates a shared object. -o is what the output file is. -lwinmm option links against the windows multimedia library. To re-compile the static library (.lib), use the following command:
Assume we have the following project folder structure:
To compile, you would use the following command:
Note that to use gcc on a Windows 64-bit architecture, the simplest way is to download `msys2`, which will allow you to use pacman from an msys2 terminal. You can first check to see if you already have gcc installed:
If you see anything in the terminal following this command, it means you already have gcc. Otherwise, you need to install it (and probably the rest of the toolchain, such as a linker etc.):
This will give several options for what you can install. If you are unsure what to do, just install all of them.
Finally, you may also want a toolchain for compiling 32-bit applications from your 64-bit Windows operating system. In that case, you can try:
The last step is to make sure the folder with the correct binaries are on your PATH environment variable. Probably the best strategy here, on a Windows device, is as follows:
MINGW_PATH. If you installed msys2 in the default location, then go to C:/mingw64. You will be looking for the sub-folder containing binaries. In my install, that is located at C:\msys64\mingw64\bin – so that is my MINGW_PATH environment variable. Path. Click Edit... with Path selected. New to add a new Path value. Enter MINGW_PATH%. Now, you can add or remove MINGW_PATH% from the user Path variable depending on what compiler needs you have. Click on the newly added value, and click Move Up until it is at the top of the list. This ensures we don't accidentally find gcc somewhere else and use a different unintended version. Note that if you want to switch between i.e. C:\msys64\mingw32\bin and C:\msys64\mingw64\bin it might just be easiest to change the value of MINGW_PATH environment variable.