Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FLOAT32 formats #9852

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -438,3 +438,4 @@ a license to everyone to use it as detailed in LICENSE.)
* Christian Boos <cboos@bct-technology.com>
* Erik Scholz <greenNO@SPAMg-s.xyz>
* Gergely Nagy <ngg@tresorit.com>
* Tim Daubenschütz <tim.daubenschuetz@gmail.com>
4 changes: 4 additions & 0 deletions system/include/AL/al.h
Original file line number Diff line number Diff line change
@@ -26,6 +26,10 @@ extern "C" {
#define AL_FORMAT_MONO8 0x1100
#define AL_FORMAT_STEREO16 0x1103
#define AL_FORMAT_STEREO8 0x1102
#ifdef __EMSCRIPTEN__
#define AL_FORMAT_MONO_FLOAT32 0x10010
#define AL_FORMAT_STEREO_FLOAT32 0x10011
#endif
#define AL_FREQUENCY 0x2001
#define AL_GAIN 0x100A
#define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION
4 changes: 0 additions & 4 deletions tests/openal_capture.c
Original file line number Diff line number Diff line change
@@ -24,10 +24,6 @@
#endif
#include <AL/al.h>
#include <AL/alc.h>
#ifdef ASSUME_AL_FLOAT32
#define AL_FORMAT_MONO_FLOAT32 0x10010
#define AL_FORMAT_STEREO_FLOAT32 0x10011
#endif

static const char* alformat_string(ALenum format) {
switch(format) {
7 changes: 0 additions & 7 deletions tests/openal_capture_sanity.c
Original file line number Diff line number Diff line change
@@ -28,13 +28,6 @@
#include <AL/al.h>
#include <AL/alc.h>

#ifdef ASSUME_AL_FLOAT32
// We, in particular, are expected to support this, since
// this is the data type used by Web Audio.
#define AL_FORMAT_MONO_FLOAT32 0x10010
#define AL_FORMAT_STEREO_FLOAT32 0x10011
#endif

#define countof(x) (sizeof(x)/sizeof((x)[0]))

static int result = EXIT_SUCCESS;