Name | Modified | Size | Downloads / Week |
---|---|---|---|
18feb2024 | 2024-02-17 | ||
6oct2023 | 2023-10-06 | ||
30sep2022 | 2022-09-27 | ||
16sep2022 | 2022-09-15 | ||
26nov2021 | 2021-12-07 | ||
19oct2021 | 2021-10-19 | ||
17feb2021 | 2021-10-03 | ||
5nov2020 | 2020-11-12 | ||
README.md | 2021-02-17 | 2.6 kB | |
Totals: 9 Items | 2.6 kB | 0 |
https://sourceforge.net/projects/portable-openal-sound/
Portable Sound -- using Ada tasking and OpenAL
ver 1.0.1 -- 17feb2021
-
Added important guard statement for robustness.
-
Update 6nov: added DLL to example directory.
-
Update 12nov: added W64,OSX build scripts + EXEs to C++ example.
Description
This is a cross-platform sound-playing package for Ada apps that can asynchronously start and stop music loops, as well as initiate transient sounds.
It plays WAV files, via OpenAL, on Windows, OSX, and linux platforms.
It is suitable for any Ada application that needs music, sound loops or transient sound effects; eg. games.
Usage:
See the simple interface description in file snd4ada.ads.
Generally, when you initialize a sound or soundloop, you specify its file name and retrieve an integer "key" that is used to play it sometime later.
Note: an error occurs if there is something fishy about the WAV file. I always get good results with WAV files output from, or processed through "sox".
========================================================
What is so great about this package?
This package is a non-platform-specific Ada code that compiles on Windows as well as OSX and Linux. It is now used in my two flagship games: AdaGate and AdaVenture (on GitHub & SourceForge).
========================================================
Ada Examples:
See ./adaExample/one.adb See ./adaExample/two.adb
The examples come with 3 compilation scripts: lcmp.sh, ocmp.sh, wcmp.bat
C++ Examples
See ./cppExample/two.cpp
This comes with scripts for linux and Windows. It shows how to use the Ada package from a C++ main.
SoundFiles
Kick & choir sound is from freesound.org, so is covered by the Creative Commons Noncommercial License; see http://creativecommons.org/licenses/by-nc/3.0/legalcode/
License:
This app is covered by the GNU GPL v3 as indicated in the sources:
Copyright (C) 2021 fastrgv@gmail.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You may read the full text of the GNU General Public License at http://www.gnu.org/licenses/.