Skip to content

i10416/slinc-examples

Repository files navigation

SlinC examples

NOTE: this example uses libportaudio built for osx arm64. If your machine is not osx arm64, please use a proper libportaudio binary targeted for your machine os and cpu architecture.

About

This repository contains a set of small examples demonstrating how to use SlinC.

Before trying use-pkg, portaudio-wav, run cd pkg && sbt publishLocal to locally publish libportaudio binding.

NOTE: currently, I use libportaudio for darwin arm64. If your local machine is different OS and CPU architecture, please use proper libportaudio binary for your OS and architecture.

NOTE: There are 2 samples for slinc as slinc 0.3.x has different API from slinc 0.1.x and 0.2.x.

  • cstd: example of calling c function from standard library in Scala with SlinC 0.1.1-110-7863cb and in Java
  • cstd-0.3: example of calling c function from standard library in Scala with SlinC 0.3.0
  • sharedlib: example of calling function from shared library in Scala 3 with SlinC 0.1.1-110-7863cb and in Java
  • sharedlib-0.3: example of calling function from shared library in Scala 3 with SlinC 0.3.0
  • struct: example of dealing with struct
  • portaudio-sinewave: example of playing a sine wave audio using libportaudio
  • portaudio-wav: example of playing a wav file using libportaudio
  • pkg: package native library as a Scala library
  • use-pkg: use Scala library containing native library
  • scalanativeinterop: call scala native shared library from jvm!

About

a set of examples demonstrating how to use SlinC

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages