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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -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
Expand Up @@ -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
TimDaub marked this conversation as resolved.
Show resolved Hide resolved
#define AL_FORMAT_STEREO_FLOAT32 0x10011
#endif
#define AL_FREQUENCY 0x2001
#define AL_GAIN 0x100A
#define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION
Expand Down
4 changes: 0 additions & 4 deletions tests/openal_capture.c
Expand Up @@ -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) {
Expand Down
7 changes: 0 additions & 7 deletions tests/openal_capture_sanity.c
Expand Up @@ -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;
Expand Down