Coder Social home page Coder Social logo

manfreddiaz / openal-android-sample Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 261 KB

A working sample of openal4android library.

CMake 4.51% Java 49.37% C++ 0.73% Makefile 16.02% C 29.36%
3d-audio android android-application nougat marshmallow

openal-android-sample's Introduction

OpenAL for Android Sample

At this point, it is hard to find some working examples of 3D audio/spatialization on the Android platform that could be easily prototyped. Hence, I shared this sample application showing 3D audio rendering, using the bit old openAL4android library.

Hope it helps!

Ready For

  • Android SDK v26.0.0
  • Android Studio v2.3.3
  • Gradle Plugin v2.3.3
  • Tested On:
    • Android 7.0 Nougat
    • Android 6.0 Marshmallow

Remarks

  • IMPORTANT: to make a compatible .wav file, the RIFF WAVE headers should be present on the file. Common audio/video conversion libraries tried (sox, ffmpeg) does not trivially generate the proper .wav file headers. Only Audacity for Windows 10 did the trick.
  • libopenal.so and libopenalwrapper.so are compiled for 32-bits platforms (ARMEABI v7a).
  • gradle.properties includes the android.useDeprecatedNdk=true option which may not be available in future versions of Android Gradle plugin.

openal-android-sample's People

Contributors

manfreddiaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

nift4

openal-android-sample's Issues

ninja: build stopped, no such file or directory

I get the following error when building this project. If I understand correctly, some scripts refers to 'files/android-sdk', but my sdk is placed in 'C:\Program Files\android-sdk'. Where should I correct this path?

screenshot 2017-09-06 17 47 39

Determining if the C compiler works failed with the following output:
Change Dir: C:/Users/Asus/AndroidStudioProjects/openal-android-sample/openAL4Android/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/CMakeTmp

Run Build Command:"C:/Program Files/android-sdk/cmake/3.6.4111459/bin/ninja.exe" "cmTC_2926d"
[1/2] Building C object CMakeFiles/cmTC_2926d.dir/testCCompiler.c.o

FAILED: C:\PROGRA1\ANDROI1\NDK-BU1\TOOLCH1\llvm\prebuilt\WINDOW~1\bin\clang.exe --target=armv7-none-linux-androideabi --gcc-toolchain="C:/Program Files/android-sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64" --sysroot="C:/Program Files/android-sdk/ndk-bundle/sysroot" -isystem C:/Program Files/android-sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=9 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -o CMakeFiles/cmTC_2926d.dir/testCCompiler.c.o -c C:\Users\Asus\AndroidStudioProjects\openal-android-sample\openAL4Android.externalNativeBuild\cmake\release\armeabi-v7a\CMakeFiles\CMakeTmp\testCCompiler.c

clang.exe: error: no such file or directory: 'Files/android-sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi'

ninja: build stopped: subcommand failed.

Multiple Sound sources

Is there a proper way to play multiple sounds or is this implementation only intended for single audio sources?
Doing something like this
this.sound = new Source(soundEnv.addBuffer("beep1"));
this.sound2 = new Source(soundEnv.addBuffer("beep2"));
this.sound.play(true);
this.sound2.play(true);
doesn't seem to do the trick

thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.