No description
Find a file
Ganesh Viswanathan 0e0786bb29 README
2020-07-04 01:09:43 -05:00
nimbass Fix for OSX 2020-07-03 19:10:54 -05:00
tests Get bass_fx working on Linux 2020-04-11 23:29:08 -05:00
.gitignore Switch to nimterop 2020-04-09 09:24:39 -05:00
.travis.yml Bump deps 2020-07-04 00:52:45 -05:00
LICENSE Initial commit 2017-11-07 23:35:48 -06:00
nimbass.nimble Bump deps 2020-07-04 00:52:45 -05:00
README.md README 2020-07-04 01:09:43 -05:00

NimBASS is a Nim wrapper for the BASS audio library.

NimBASS is distributed as a Nimble package and depends on nimterop to generate the wrappers. The BASS library and header files are downloaded using curl/powershell and extracted using unzip/powershell.

Installation

NimBASS can be installed via Nimble:

> nimble install nimbass

This will download, wrap and install NimBASS in the standard Nimble package location, typically ~/.nimble. Once installed, it can be imported into any Nim program.

Usage

Module documentation can be found here.

import strutils

import nimbass/bass
import nimbass/bass_fx

discard BASS_Init(cint(-1), cast[DWORD](44100), cast[DWORD](0), cast[DWORD](0), nil)

echo "Bass: " & $BASS_GetVersion().toHex()
echo "Bass FX: " & $BASS_FX_GetVersion().toHex()

NimBASS currently wraps BASS and BASS FX and dynamically links to the binaries that get copied to the application executable directory. At runtime, they are loaded with -rpath.

Credits

NimBASS wraps BASS and all licensing terms of BASS apply to the usage of this package.

Feedback

NimBASS is a work in progress and any feedback or suggestions are welcome. It is hosted on GitHub with an MIT license so issues, forks and PRs are most appreciated.