www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Translations of GLFW and libsoundio for Windows and Linux

reply Dennis <dkorpel gmail.com> writes:
If you are making a D application with graphics or sound, you 
might be interested in these:

https://code.dlang.org/packages/glfw-d
https://code.dlang.org/packages/libsoundio-d

They are (partial) translations of their respective C libraries.

GLFW is a cross-platform library for creating a window with 
OpenGL context, and reading input from the keyboard, mouse and 
controllers. libsoundio is a cross-platform library for recording 
(from a microphone) and playing (on speakers / headphones) audio 
in real-time.

I did not translate their macOS targets since I don't have a mac, 
but you can still use the C sources to compile for those targets.

The goal of the translations is to make the libraries easier to 
build: you only need to add the package to your `dub.json` or 
`dub.sdl`, and everything should work out of the box. No need to 
include a shared library and load it at runtime, or pre-compile 
the C library for each build setting.

If you are working on a D project using these C libraries, I'd 
appreciate it if you help test the translation! Simply add the D 
package, remove the linkage with the C library and open an issue 
if you encounter any trouble, such as:
- a compile error
- a linker error
- a run-time bug that wasn't there in the C library
Aug 20
next sibling parent aberba <karabutaworld gmail.com> writes:
On Thursday, 20 August 2020 at 12:50:26 UTC, Dennis wrote:
 If you are making a D application with graphics or sound, you 
 might be interested in these:

 [...]
Awesome! Thanks for doing this.
Aug 20
prev sibling parent Guillaume Piolat <first.name gmail.com> writes:
On Thursday, 20 August 2020 at 12:50:26 UTC, Dennis wrote:
 you only need to add the package to your `dub.json` or 
 `dub.sdl`, and everything should work out of the box. No need 
 to include a shared library and load it at runtime, or 
 pre-compile the C library for each build setting.
Way to go! Thank you.
Aug 21