A simple and easy-to-use audio library based on miniaudio

Related tags

Audio raudio
Overview

raudio

A simple and easy-to-use audio library based on miniaudio

raudio forks from raylib.audio module to become an standalone library. Actually, it was already possible to use this module as standalone for audio device management and sounds/music playing, it has just been moved to its own repo.

raudio API tries to be very simple and intuitive and it represents a thin layer over the powerful miniaudio library, including support for multiple audio formats: WAV, OGG, MP3, FLAC, MOD, XM.

This project is a WORK IN PROGRESS

You might also like...
A command line and keyboard based strategy-game written in c++, where audio-input determines the AI-strategy and lays the seed for the map-generation.
A command line and keyboard based strategy-game written in c++, where audio-input determines the AI-strategy and lays the seed for the map-generation.

Table of contents Dissonance Premise Installation Requirements Installation Quick-guide Detailed installation guide Usage Logfiles Tests Uninstall Kno

simple audio mixer for native and web

🔊 auph 🎧 Trivial audio mixer API for native and web targets. Online Demo ⚠️ Work in progress! API is constantly changing. The native playback at the

Ncurses based audio tracker program inspired by goattracker and milkytracker
Ncurses based audio tracker program inspired by goattracker and milkytracker

PLEBTracker PLEBTracker is a linux console based audio tracker program inspired by goattracker and milkytracker. Pattern editor, main song editor wind

SimplE Lossless Audio
SimplE Lossless Audio

SELA SimplE Lossless Audio A lossless audio codec which aims to be as simple as possible while still having good enough compression ratios. Code Quali

An audio mixer that supports various file formats for Simple Directmedia Layer.

An audio mixer that supports various file formats for Simple Directmedia Layer.

A simple CLI to extract & save artwork of a 🎵 music/audio file.
A simple CLI to extract & save artwork of a 🎵 music/audio file.

artwork-extractor A simple CLI to extract & save artwork of a 🎵 music/audio file. Usage Dependencies MediaInfoLib On Debian based distros, one may in

ASS: Audio Stupidly Simple

A single header library for audio decoding and playback

Open source digital sound effects based on JACK audio connection kit.

Noiseworks Digital Audio Effects Repository Open source digital sound effects based on JACK audio connection kit. This repository is intended to provi

Capture audio from a microphone on your Raspberry Pi Pico or any RP2040 based board. 🎤

Capture audio from a microphone on your Raspberry Pi Pico or any RP2040 based board. 🎤

Comments
  • Compiling Error

    Compiling Error

    I'm trying to compile raudio on it's own for a CLI based game, but I am getting a lot of undefined references, which tells me it's a linker problem.

    I have tried to compile raudio.c into an object file, compile my main.cpp file into main.o and from there compile them together. I also tried to it all in one swoop with g++ main.cpp include/raudio.c -I include/ -I include/external -DRAUDIO_STANDALONE -DSUPPORT_FILEFORMAT_WAV

    I also noticed that when I did -DRAUDIO_STANDALONE, I had to comment out the definition in raudio.h otherwise I would get a redefinition error, but if I didn't do DRAUDIO_STANDALONE and I left the definition in raudio.h, it would look for raylib.h.

    I'm sure this is a big case of my just know enough to case damage.

    opened by wwderw 5
  • Made ma_context_init use OpenSL|ES on Android by default to avoid bugs with the AAudio backend for miniaudio.

    Made ma_context_init use OpenSL|ES on Android by default to avoid bugs with the AAudio backend for miniaudio.

    I identified a possible bug with the AAudio backend for miniaudio in which an assertion from miniaudio fails when the user leaves and comes back to the app.

    Miniaudio issue: https://github.com/dr-soft/miniaudio/issues/103

    For now, I suggest this fix, a simple #ifdef that initializes miniaudio with the OpenSL|ES backend on Android since from my tests the OpenSL|ES backend doesn't have this issue.

    opened by SasLuca 2
  • Update raudio.h and raudio.c

    Update raudio.h and raudio.c

    Problem description

    When compiling the library example (es. raudio_standalone.c) in standalone mode, a lot of "Undefined reference" errors pop-up.

    Solution

    By changing the raudio.c precompiler #if guard from

    #if defined(SUPPORT_MODULE_RAUDIO)
    

    to

    #if defined(SUPPORT_MODULE_RAUDIO) || defined(RAUDIO_STANDALONE)
    

    the issue seems to be fixed.

    Also, to properly compile the library, some raudio.h definitions were updated, in particular:

    • The bool definition was aligned to the current definition in raylib.h;
    • The AudioCallbackdefinition was added;
    • The rAudioProcessor definition was added.

    Should Fix

    If I understood the problem correctly, this pull request should also fix issue #5.


    P.s. Apologies for the "precompiler" typo in the commit message, it should be "preprocessor"... 😵‍💫

    opened by DaSlang 1
  • Fix undeclared variables for FLAC support in `UpdateMusicStream`

    Fix undeclared variables for FLAC support in `UpdateMusicStream`

    Problem

    During compilation with flac support the following error appears:

    D:\raudio\raudio\src\raudio.c: In function 'UpdateMusicStream':
    [build] D:\raudio\raudio\src\raudio.c:1791:69: error: 'frameCountToStream' undeclared (first use in this function); did you mean 'framesToStream'?
    [build]  1791 |                 drflac_read_pcm_frames_s16((drflac *)music.ctxData, frameCountToStream*music.stream.channels, (short *)AUDIO.System.pcm);
    [build]       |                                                                     ^~~~~~~~~~~~~~~~~~
    [build]       |                                                                     framesToStream
    [build] D:\raudio\raudio\src\raudio.c:1791:69: note: each undeclared identifier is reported only once for each function it appears in
    [build] D:\raudio\raudio\src\raudio.c:1791:132: error: 'struct <anonymous>' has no member named 'pcm'
    [build]  1791 |                 drflac_read_pcm_frames_s16((drflac *)music.ctxData, frameCountToStream*music.stream.channels, (short *)AUDIO.System.pcm);
    [build]       |                                                                                                                                    ^
    

    It is caused probably by omitted variable change for SUPPORT_FILEFORMAT_FLAC case in UpdateMusicStream(). It was introduced in c3efa2cda425132f253e0da9ffeb1708dd17eaaa.

    Solution

    I renamed variables to the existing ones (I could not find frameCountToStream or AUDIO.System.pcm anywhere). My formatter also removed some trailing whitespaces ;)

    There's also warning: "RAUDIO_STANDALONE" redefined when defining the variable with compilation flag, I guess it can be wrapped in #ifndef in this case. I didn't add it in this PR, though.

    Let me know if it's alright to merge this or there are some changes to be made

    opened by vis4rd 0
Owner
Ray
I make videogames and tools to make videogames. I teach videogames dev. Always available for talks, conferences and master classes.
Ray
Sneedacity (formerly Audacity) is an easy-to-use, multi-track audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems.

Sneedacity (formerly Audacity) is an easy-to-use, multi-track audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems. Sneedacity is open source software licensed under GPL, version 2 or later.

Sneed's Feed & Seed 874 Dec 30, 2022
Tenacity is an easy-to-use, cross-platform multi-track audio editor/recorder for Windows, MacOS, GNU/Linux

Tenacity is an easy-to-use, cross-platform multi-track audio editor/recorder for Windows, MacOS, GNU/Linux and other operating systems and is developed by a group of volunteers as open source software.

null 59 Jan 1, 2023
A simple and easy-to-use fx sounds generator, based on the amazing Dr.Petter's sfxr

rFXGen A simple and easy-to-use fx sounds generator, based on the amazing Dr.Petter's sfxr. rFXGen can be used for free as a WebAssembly online tool a

Ray 333 Dec 27, 2022
PortAudio is a portable audio I/O library designed for cross-platform support of audio

PortAudio is a cross-platform, open-source C language library for real-time audio input and output.

PortAudio 786 Jan 1, 2023
Oboe is a C++ library that makes it easy to build high-performance audio apps on Android.

Oboe Oboe is a C++ library which makes it easy to build high-performance audio apps on Android. It was created primarily to allow developers to target

Google 3.2k Jan 3, 2023
Easy and efficient audio synthesis in C++

Tonic Fast and easy audio synthesis in C++. Prefer coding to patching? Love clean syntax? Care about performance? That's how we feel too, and why we m

null 482 Dec 26, 2022
A simple C++ library for reading and writing audio files.

AudioFile A simple header-only C++ library for reading and writing audio files. Current supported formats: WAV AIFF Author AudioFile is written and ma

Adam Stark 683 Jan 4, 2023
OpenDeck is a platform suited both for prototyping and developing custom MIDI controllers with easy to use web configurator

Software and hardware platform for simpler building of MIDI controllers with support for DMX.

Shantea Controls 456 Dec 25, 2022
A tiny, header only, easy to use, cross-platform, portaudio wrapper, sound and notation manager, tailored for the demo scene.

TDAW A tiny, header only, easy to use, cross-platform, portaudio wrapper, sound and notation manager, tailored for the demo scene. This header enables

kbx 13 Dec 2, 2022