Click here to Skip to main content
Click here to Skip to main content

Open Audio Engine

, 4 Nov 2013
Rate this:
Please Sign up or sign in to vote.
Open Audio Engine - advanced audio middleware for games and multimedia apps

Introduction     

Open Audio Engine is a very high-performance and advanced audio engine, useful for 3D graphics engine integration. It works using a custom low-level OpenAL software driver, whose backend depends upon the platform you are using. Actually it works only on Windows, but soon will be available for Mac OS and Linux which are still under development.  Engine uses as decoder Vorbis format from Ogg container.  

The interface of OpenAE Tech-Demo showing you all features and the capability of the engine (OpenAE.dll)

This version has:  

  • Very tiny and easy usage C++ API designed for game engines
  • Point, Linear, Cosine and Cubic resampler
  • Multi-Channel 256 simultaneous sources
  • Totally thread safe
  • Interface to make custom datasources/filesystem (zip, rar, etc..) 
  • Multi-Channel support (mono, stereo, quad, 5.1, 6.1, 7.1) 
  • High precision seeker and smooth loop
  • Custom C/ASM Low-level OpenAL driver
  • Excellent streaming audio quality from disk/memory
  • Dynamic buffer 
  • Full 3D native support
  • Sound Occlusion  
  • Sound EAX Reverb
  • Sound Effects
  • Doppler and Pitch support 
  • AntiPop, AntiClick

The next version has planned: 

  • C, C# API
  • Linux, MAC, Nextgen console support
  • Per platform optimization
  • Advanced documentation
  • Sample code

Background

Here, you have a synthesis schema of driver and engine architecture with a custom app integration.

Using the Code

A tech-demo is provided. It's totally free and open-source. You can try it by following these instructions:

  • Download the package, open solution file and compile it with your platform configuration decided (x86, x64).
  • You'll find the executable of tech-demo on x86/x64 folder located on the root folder package.

The integration on your game/engine code is very easy. Here's a quick example:

#include "api\oae.h"
#include <iostream>
#include <windows.h>

int main()
{
    HMODULE lib;
    lib = LoadLibrary("OpenAE.dll"); //Load Engine   

    // Get entry-function pointer for render device
    oae::Renderer* (*driver)(const char*,const unsigned&) = nullptr;
    driver = (oae::Renderer*(*)(const char*,const unsigned&)) 
    	GetProcAddress(lib, "GetRenderDevice"); 

    // Get entry-function pointer for enum device
    const char* (*available)(unsigned int&) = nullptr;
    available = (const char*(*)(unsigned int&)) GetProcAddress(lib, "GetDeviceName"); 

    //enumerate and display device
    for(unsigned j=0; available(j)!=nullptr; j++)
    {
        std::cout << available(j) << std::endl;
    } 

    // choosing device
    unsigned choice; 
    std::cin >> choice;

    // declare a device, a listener and a channel.
    oae::Renderer* dev = driver(available(choice), 48000);
    oae::Listener* lis = dev->GetListener();
    oae::Screamer* scr;

    scr = dev->GetScreamer("mysound.ogg"); //Load ogg file.
    scr->SetSourceState(1); //source state 1 is for playing, source state 0 is for pause. 

    while(scr->GetSourceState()); // wait for finish

    dev->ReleaseRenderer(); // release device
    FreeLibrary(lib); // release engine
    return 0; // quit app
}  

As soon as possible, a detailed documentation will be available at http://www.openaudioengine.com/.

New updates: I've done a fix on OpenAE Tech-Demo GUI and since this version still use OpenAL soft driver (with some features and changes), I have attached source code of OpenAL.dll which is under LGPL.
Currently, OpenAE.dll and future custom OpenAL.dll remains proprietary software under Creative Commons, no commercial usage and no derivatives as indicated inside OAE_TECH_DEMO.zip on
README.txt and LICENSE_FOR_OpenAE.dll_OpenAL.dll_oae.h.txt.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Anis A. Hireche
Software Developer Milestone s.r.l.
Italy Italy
I'm a young 21y programmer.
Currently I'm specializing on graphics programming for real-time rendering applications.
 
I'm really passionate about my job and I love to create new technologies from scratch to learn new aspects of this environment.
 
Since January 2013, I working for Milestone where I've worked on the recently AAA title MotoGP13 as a Junior R&D software engineer to improve many aspect of graphics programming such as 3d math skills. Next i have changed department to learn more about UI/NETWORK and Gameplay programming.
Follow on   Twitter   Google+   LinkedIn

Comments and Discussions

 
Questionwhere can I download the latest source code of OpenAL Pinmemberjacky_zz3-Nov-13 20:31 
AnswerRe: where can I download the latest source code of OpenAL PinprofessionalAnis A. Hireche20-Nov-13 10:42 
Questiongood jobs! :) Pinmemberalannx31-Oct-13 15:17 
AnswerRe: good jobs! :) PinprofessionalAnis A. Hireche31-Oct-13 15:21 
GeneralNo source code of library OAE included Pinmemberjacky_zz28-Oct-13 23:00 
SuggestionLicense clarification (Non-commercial, No Derivatives) [modified] Pinprofessionalroscler28-Oct-13 8:02 
GeneralRe: License clarification (Non-commercial, No Derivatives) PinprofessionalAnis A. Hireche28-Oct-13 8:48 
QuestionJust wonder Pinmemberxawari28-Oct-13 7:49 
AnswerRe: Just wonder PinprofessionalAnis A. Hireche28-Oct-13 8:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140718.1 | Last Updated 4 Nov 2013
Article Copyright 2013 by Anis A. Hireche
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid