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

upstreaming fixes for homebrew formular as requested ... #97

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AlexanderWillner
Copy link
Contributor

@@ -7,7 +7,7 @@ PATH_AUDIO ?= "./wav"

CFLAGS ?= -O3 -g
LDFLAGS ?= -g
CFLAGS += -Wall -Werror
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't agree with that - what warning do you run into, and can't we just fix that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally a big fan of -Werror ;) However, it's a workaround for the current situation on macOS 11:

% make
cc -I/usr/local/opt/ruby/include -O3 -g -Wall -Werror -DVERSION=\"1.4.0\" -DPATH_AUDIO=\""./wav"\" -I/usr/local/Cellar/alure/1.2_1/include -c main.c -o main.o
main.c:155:16: error: 'alcGetString' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
                opt_device = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
                             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:236:38: note: 'alcGetString'
      has been explicitly marked deprecated here
ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param ) OPENAL_DEPRECATED;
                                     ^
main.c:160:11: error: 'alcOpenDevice' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
        device = alcOpenDevice(opt_device);
                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:209:38: note: 
      'alcOpenDevice' has been explicitly marked deprecated here
ALC_API ALCdevice *     ALC_APIENTRY alcOpenDevice( const ALCchar *devicename ) OPENAL_DEPRECATED;
                                     ^
main.c:167:12: error: 'alcCreateContext' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
        context = alcCreateContext(device, NULL);
                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:191:38: note: 
      'alcCreateContext' has been explicitly marked deprecated here
ALC_API ALCcontext *    ALC_APIENTRY alcCreateContext( ALCdevice *device, const ALCint* attrlist ) OPENAL_DEPRECATED;
                                     ^
main.c:168:7: error: 'alcMakeContextCurrent' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
        if (!alcMakeContextCurrent(context)) {
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:193:38: note: 
      'alcMakeContextCurrent' has been explicitly marked deprecated here
ALC_API ALCboolean      ALC_APIENTRY alcMakeContextCurrent( ALCcontext *context ) OPENAL_DEPRECATED;
                                     ^
main.c:172:2: error: 'alGetError' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
        TEST_ERROR("make default context");
        ^
main.c:28:10: note: expanded from macro 'TEST_ERROR'
        error = alGetError();           \
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:405:27: note: 'alGetError' has
      been explicitly marked deprecated here
AL_API ALenum AL_APIENTRY alGetError( void ) OPENAL_DEPRECATED;
                          ^
main.c:174:2: error: 'alListener3f' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
        alListener3f(AL_POSITION, 0, 0, 0);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:438:25: note: 'alListener3f'
      has been explicitly marked deprecated here
AL_API void AL_APIENTRY alListener3f( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ) OPENAL_DEPRECATED;
                        ^
main.c:175:2: error: 'alListener3f' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
        alListener3f(AL_VELOCITY, 0, 0, 0);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:438:25: note: 'alListener3f'
      has been explicitly marked deprecated here
AL_API void AL_APIENTRY alListener3f( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ) OPENAL_DEPRECATED;
                        ^
main.c:176:2: error: 'alListenerfv' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
        alListenerfv(AL_ORIENTATION, listenerOri);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:440:25: note: 'alListenerfv'
      has been explicitly marked deprecated here
AL_API void AL_APIENTRY alListenerfv( ALenum param, const ALfloat* values ) OPENAL_DEPRECATED;
                        ^
main.c:191:11: error: 'alcGetContextsDevice' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
        device = alcGetContextsDevice(context);
                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:203:38: note: 
      'alcGetContextsDevice' has been explicitly marked deprecated here
ALC_API ALCdevice*      ALC_APIENTRY alcGetContextsDevice( ALCcontext *context ) OPENAL_DEPRECATED;
                                     ^
main.c:192:2: error: 'alcMakeContextCurrent' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
        alcMakeContextCurrent(NULL);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:193:38: note: 
      'alcMakeContextCurrent' has been explicitly marked deprecated here
ALC_API ALCboolean      ALC_APIENTRY alcMakeContextCurrent( ALCcontext *context ) OPENAL_DEPRECATED;
                                     ^
main.c:193:14: error: 'alcDestroyContext' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
        if(context) alcDestroyContext(context);
                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:199:38: note: 
      'alcDestroyContext' has been explicitly marked deprecated here
ALC_API void            ALC_APIENTRY alcDestroyContext( ALCcontext *context ) OPENAL_DEPRECATED;
                                     ^
main.c:194:13: error: 'alcCloseDevice' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
        if(device) alcCloseDevice(device);
                   ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:211:38: note: 
      'alcCloseDevice' has been explicitly marked deprecated here
ALC_API ALCboolean      ALC_APIENTRY alcCloseDevice( ALCdevice *device ) OPENAL_DEPRECATED;
                                     ^
main.c:224:27: error: 'alcGetString' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
        const ALCchar *devices = alcGetString(NULL, ALC_DEVICE_SPECIFIER);
                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/alc.h:236:38: note: 'alcGetString'
      has been explicitly marked deprecated here
ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param ) OPENAL_DEPRECATED;
                                     ^
main.c:352:3: error: 'alGenSources' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
                alGenSources((ALuint)1, &src[idx]);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:498:25: note: 'alGenSources'
      has been explicitly marked deprecated here
AL_API void AL_APIENTRY alGenSources( ALsizei n, ALuint* sources ) OPENAL_DEPRECATED;
                        ^
main.c:353:3: error: 'alGetError' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
                TEST_ERROR("source generation");
                ^
main.c:28:10: note: expanded from macro 'TEST_ERROR'
        error = alGetError();           \
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:405:27: note: 'alGetError' has
      been explicitly marked deprecated here
AL_API ALenum AL_APIENTRY alGetError( void ) OPENAL_DEPRECATED;
                          ^
main.c:357:4: error: 'alSource3f' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
                        alSource3f(src[idx], AL_POSITION, -x, 0, (100 - opt_stereo_width) / 100.0);
                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:511:25: note: 'alSource3f' has
      been explicitly marked deprecated here
AL_API void AL_APIENTRY alSource3f( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ) OPENAL_DEPRECATED;
                        ^
main.c:359:3: error: 'alSourcef' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
                alSourcef(src[idx], AL_GAIN, opt_gain / 100.0);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:509:25: note: 'alSourcef' has
      been explicitly marked deprecated here
AL_API void AL_APIENTRY alSourcef( ALuint sid, ALenum param, ALfloat value ) OPENAL_DEPRECATED;
                        ^
main.c:361:3: error: 'alSourcei' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
                alSourcei(src[idx], AL_BUFFER, buf[idx]);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:515:25: note: 'alSourcei' has
      been explicitly marked deprecated here
AL_API void AL_APIENTRY alSourcei( ALuint sid, ALenum param, ALint value ) OPENAL_DEPRECATED;
                        ^
main.c:362:3: error: 'alGetError' is deprecated: first deprecated in macOS 10.15 - OpenAL is deprecated in favor of AVAudioEngine [-Werror,-Wdeprecated-declarations]
                TEST_ERROR("buffer binding");
                ^
main.c:28:10: note: expanded from macro 'TEST_ERROR'
        error = alGetError();           \
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h:405:27: note: 'alGetError' has
      been explicitly marked deprecated here
AL_API ALenum AL_APIENTRY alGetError( void ) OPENAL_DEPRECATED;
                          ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [main.o] Error 1

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow that's quite a mess. Well, I don't have an apple at hand and I don't feel like whipping up some complete CI for this, so let's move the -Werror out for now then...

$ make
$ ./buckle
```

Note that you need superuser privileges to create the event tap on Mac OS X.
Note that you might need superuser privileges to create the event tap on Mac OS X.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been called macOS for a couple years now, with the last version being XI/11 instead of X/10

ahmednofal and others added 3 commits January 26, 2021 15:04
…ds but the packaging process has not been modified to include the installation of the sounds in their appropriate location
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants