GSOC Panda3D: Project Proposal: Soloud Audio

Published

March 5, 2019

Panda3D: Integrating SoLoud as an Audio Backend

Problem Abstract

Panda3D currently provides various backends for audio functionality that include OpenAL and FMOD. Both of these backends provide excellent support for audio however, they FMOD limits the holder’s permission to distribute FMOD based on the development budget, and OpenAL has a proprietary license (Panda3D uses an LGPL version). These licensing terms don’t fit Panda3D’s licensing spirit, which being based on a Modified BSD license is very permissive.

SoLoud is a free (as in speech AND beer) audio engine for games released under the very permissive ZLib/LibPNG license. Zlib/LibPNG and Modified BSD Licenses, are very similar licenses, allowing much wider usage of this audio engine in Panda3D games. Aside from licensing, SoLoud has a native C++ API making it perfect to integrate into Panda3D, while still providing support for other interfaces such C, Python Ruby, etc. SoLoud has also been integrated into RPGMaker and GameMaker, which gives it a certain credibility for its usage in games.

SoLoud supports commonly used formats such as 8, 16, 32 bit wavs, floating point wavs, ogg, mp3. Although it’s mentioned that there might exist certain cases that SoLoud is not equipped to handle yet. SoLoud also has limited SSE Optimization, so there are still cases where using an alternative backend such as FMOD might be useful.

Project Goals

  • Integrate SoLoud as an additional audio backend for Panda3D
  • Making sure it’s equivalent in functionality to the OpenAL’s integration into Panda3D
  • Write the required tests and documentation for the newly integrated SoLoud

Stretch Goal

  • Making sure it’s equivalent in functionality to the FMOD’s integration into Panda3D (or as close as possible)

Implementation Plan

  • Study the literature and codebase on the subject and familiarize myself more with SoLoud and Panda3D, before the project officially starts.
  • Use GENie/premake4 to create the build files and the static libraries and set it up for Panda3D
  • Implement stubs for the classes required to implement SoLoud to make it return blank output.
  • Craft a test audio file for the implementation.
  • Fill out the stubs, and test the implementation works as expected
  • Test for edge cases, make sure the implementation can handle any errors, or edge cases
  • Write tests and documentation for the implementation

Project Timeline

  • Prior to June 1
    • Reading up documentation for SoLoud, and learn more about the audio engine, and its implementation in other gaming engines/frameworks.
    • Gain more familiarity with Panda3D’s codebase
    • Write more tests for the existing Panda3D codebase
    • Relieve any GSoC independent time commitments
  • June 1 - June 9
    • Look at existing implementation of audio backends, and get an idea on my own implementation
    • Build the required libraries for the project
    • Implement the method stubs for SoLoud integration
  • June 10 - June 26
    • Fill out the method stubs.
    • Implement a basic functioning implementation (such as being able to play test sounds)
  • June 27 - July 3
    • Deal with any issues that might have arisen so far.
    • Turn in the Phase 1 Evaluation
  • July 3 - July 17
    • Test for any edge cases, or errors.
    • Work on error handling
  • July 18 - July 25
    • Start working on the more advanced functionality of SoLoud (such as):
      • 3D Positional Audio
      • Adjust parameters (such as balance) as appropriate
      • Playing several streams at once
      • Queued Sounds, etc.
  • July 26 - July 31
    • Write documentation for the existing implementation.
    • Deal with any unexpected issues
    • Turn in the Phase 2 Evaluation
  • August 1 - August 15
    • Work on other functionality for SoLoud integration to achieve a full featured functionality and reach parity in functionality as to OpenAL.
  • August 15 - August 30
    • Work on the stretch goal.
    • Work on other areas of Panda3D
    • Prepare for the final submission of the project

Existing Contributions to Panda3D

  • PR #663 [MERGED]: Added unit tests for audio and video functionality of Panda3D. Added tests for Added test for audio_length, audio_rate, audio seek, audio seek fast, audio channels and many more. More information about this PR can be found in PR #612

  • PR #595 [MERGED]: Update Header File Names to fit Panda3D’s naming convention.

  • PR #592 [MERGED]: Similar to PR #595

  • PR #596 [MERGED]: Tested OpenAL’s functionality on MacOS, and whether it actually needed FMOD by testing audio using the Media Sampler Program

  • PR #623: Expanding on the work done by @hitesh4 in PR #593 . Added a new test for testing setting modes for Clock Objects

  • PR #624: To remove deprecated methods, once a depreciation policy is decided upon.

Benefits to the community

This project adds an alternative audio backend for usage for Panda3D. This implemented audio backend would be a more permissive option than the current popular options of FMOD and OpenAL, since SoLoud uses a ZLib license. Aside from licensing, SoLoud has a relatively easy to use interface, and it has proven itself worthy for gaming, since other gaming engines/frameworks (such as RPGMaker, and GameMaker use it).

Time Constraints

I plan to spend up to 40 hours a week working on this project. I might have to travel a bit in the early, or late stages of the project, but due to COVID-19 pandemic, it’d be hard to tell the exact dates on when this might occur. Aside from that I have no other commitments planned that might occupy my time.

About me

I’m a sophomore (junior by credit hours) studying Computer Science at Texas Tech University. I used to go by Dr.Euler on GitHub, but I go by FReeshabh now. I still go by Dr.Euler (or oiler) on Discord, and can be contacted there, or by email rishabhtewari1@gmail.com.

I mostly run my systems on Arch Linux these days, although I have access to MacOS, and Windows machine if the need arises. I’d either be available in the CDT Timezone, or the IST timezone, but due to the pandemic, I’m unable to say which one currently.