Comments (28)
No. I don't own a Mac so I have no idea when I'll get to it.
mini_al has an OpenAL backend which should work on Mac, but I don't have a way to test it personally.
from miniaudio.
While raylib with mini_al works for me™ on macOS High Sierra, homebrew's jenkins CI reported breakage on El Capitan:
[ 79%] Building C object release/CMakeFiles/raylib.dir/external/mini_al.c.o
cd /tmp/raylib-20180220-6462-ihgvj8/raylib-1.9.4-dev/release && /usr/local/Homebrew/Library/Homebrew/shims/super/clang -DGRAPHICS_API_OPENGL_33 -DPLATFORM_DESKTOP -I/tmp/raylib-20180220-6462-ihgvj8/raylib-1.9.4-dev/src/external/glfw/include -Werror=implicit-function-declaration -Werror=pointer-arith -DNDEBUG -fPIC -std=gnu99 -o CMakeFiles/raylib.dir/external/mini_al.c.o -c /tmp/raylib-20180220-6462-ihgvj8/raylib-1.9.4-dev/src/external/mini_al.c
In file included from /tmp/raylib-20180220-6462-ihgvj8/raylib-1.9.4-dev/src/external/mini_al.c:4:
/tmp/raylib-20180220-6462-ihgvj8/raylib-1.9.4-dev/src/external/mini_al.h:2084:19: error: use of undeclared identifier 'CLOCK_MONOTONIC'
clock_gettime(CLOCK_MONOTONIC, &newTime);
^
/tmp/raylib-20180220-6462-ihgvj8/raylib-1.9.4-dev/src/external/mini_al.h:2092:19: error: use of undeclared identifier 'CLOCK_MONOTONIC'
clock_gettime(CLOCK_MONOTONIC, &newTime);
^
2 errors generated.
from miniaudio.
Already dealt with clock issues on macOS on physac project. Current implementation to deal with that is:
from miniaudio.
Ah yes, that code was taken from another project of mine which was contributed by the community. I have no experience whatsoever with macOS, but I'm happy to merge a pull request if somebody's able to get that fixed.
from miniaudio.
ok, just checked your timming code, pretty similar to mine, I'll try to review it and send a PR.
from miniaudio.
Apparently starting with Sierra clock_gettime
is available, so maybe physac.h
should be adjusted too to
#if defined __APPLE__ && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
/* implement using mach functions */
#elif _WIN32
/* Windows API */
#else /* assume clock_gettime is available */
clock_gettime(CLOCK_REALTIME, &timeout);
+#endif
See zeromq/libzmq#2175
__MAC_OS_X_VERSION_MIN_REQUIRED
is set by -mmacosx-version-min
, which we don't set in raylib (and of course mini_al can't set). But that's ok, because undefined == 0, so it uses the available mach functions. If a user wants to restrict compatibility anyway to Sierra and newer, the preprocessor #ifdefery does the right thing.
from miniaudio.
Thanks for the update @a3f! Just reviewed it on raylib copy on commit raysan5/raylib@11612fc
I neither have a macOS, so I updated it there for testing first before pushing it to mini_al official repo.
from miniaudio.
Related issue on raylib raysan5/raylib#475
Sent PR for this specific timming issue #13
from miniaudio.
I've updated the dev branch with initial work on the Core Audio backend 👍 . I have also updated my raylib branch with these changes - would somebody be able to test that raylib branch for me? I have not done any testing whatsoever on iOS yet, not even in the simulator. My raylib branch is located at https://github.com/mackron/raylib/tree/dr/mini_al.
If you're able to test, don't forget to make sure USE_OPENAL_BACKEND is undefined to ensure the mini_al backend is enabled! Thanks!
from miniaudio.
@mackron I just tested mini_al new CoreAudio backend in macOS in VM. On High Sierra
it just works, but on Yosemite
I cannot compile it:
In file included from ../../../../golang/src/github.com/gen2brain/malgo/mini_al.c:4:
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12647:46: error: unknown type name 'AudioChannelBitmap'
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12741:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN'
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12742:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_0'
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12743:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_1'
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12744:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_2'
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12745:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_3'
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12746:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_4'
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12747:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_5'
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12748:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_6'
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12749:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_7'
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12750:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_8'
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12751:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_9'
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12752:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_10'; did you mean 'kAudioChannelLabel_Discrete_10'?
/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudioTypes.h:1027:5: note: 'kAudioChannelLabel_Discrete_10' declared here
In file included from ../../../../golang/src/github.com/gen2brain/malgo/mini_al.c:4:
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12753:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_11'; did you mean 'kAudioChannelLabel_Discrete_11'?
/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudioTypes.h:1028:5: note: 'kAudioChannelLabel_Discrete_11' declared here
In file included from ../../../../golang/src/github.com/gen2brain/malgo/mini_al.c:4:
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12754:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_12'; did you mean 'kAudioChannelLabel_Discrete_12'?
/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudioTypes.h:1029:5: note: 'kAudioChannelLabel_Discrete_12' declared here
In file included from ../../../../golang/src/github.com/gen2brain/malgo/mini_al.c:4:
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12755:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_13'; did you mean 'kAudioChannelLabel_Discrete_13'?
/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudioTypes.h:1030:5: note: 'kAudioChannelLabel_Discrete_13' declared here
In file included from ../../../../golang/src/github.com/gen2brain/malgo/mini_al.c:4:
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12756:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_14'; did you mean 'kAudioChannelLabel_Discrete_14'?
/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudioTypes.h:1031:5: note: 'kAudioChannelLabel_Discrete_14' declared here
In file included from ../../../../golang/src/github.com/gen2brain/malgo/mini_al.c:4:
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12757:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_15'; did you mean 'kAudioChannelLabel_Discrete_15'?
/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudioTypes.h:1032:5: note: 'kAudioChannelLabel_Discrete_15' declared here
In file included from ../../../../golang/src/github.com/gen2brain/malgo/mini_al.c:4:
../../../../golang/src/github.com/gen2brain/malgo/mini_al.h:12758:14: error: use of undeclared identifier 'kAudioChannelLabel_HOA_ACN_65024'
fatal error: too many errors emitted, stopping now [-ferror-limit=]
from miniaudio.
@gen2brain Thanks for that! I have updated the dev branch of mini_al with a potential fix for this (as well as iOS support). If you get more errors, would it be possible to disable the error limit just to avoid some back and forth?
from miniaudio.
Now it complains about NSString, output is with -ferror-limit=100
:
In file included from ../simple_playback.c:9:
In file included from ../../mini_al.h:12572:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:12:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVBase.h:11:
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:400:1: error: expected identifier or '('
@class NSString, Protocol;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:402:19: error: unknown type name 'NSString'
FOUNDATION_EXPORT NSString *NSStringFromSelector(SEL aSelector);
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:403:44: error: unknown type name 'NSString'
FOUNDATION_EXPORT SEL NSSelectorFromString(NSString *aSelectorName);
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:405:19: error: unknown type name 'NSString'
FOUNDATION_EXPORT NSString *NSStringFromClass(Class aClass);
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:406:43: error: unknown type name 'NSString'
FOUNDATION_EXPORT Class NSClassFromString(NSString *aClassName);
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:408:19: error: unknown type name 'NSString'
FOUNDATION_EXPORT NSString *NSStringFromProtocol(Protocol *proto) NS_AVAILABLE(10_5, 2_0);
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:408:50: error: unknown type name 'Protocol'
FOUNDATION_EXPORT NSString *NSStringFromProtocol(Protocol *proto) NS_AVAILABLE(10_5, 2_0);
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:409:19: error: unknown type name 'Protocol'
FOUNDATION_EXPORT Protocol *NSProtocolFromString(NSString *namestr) NS_AVAILABLE(10_5, 2_0);
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:409:50: error: unknown type name 'NSString'
FOUNDATION_EXPORT Protocol *NSProtocolFromString(NSString *namestr) NS_AVAILABLE(10_5, 2_0);
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:413:30: error: unknown type name 'NSString'
FOUNDATION_EXPORT void NSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2);
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:413:53: error: format argument not an NSString
FOUNDATION_EXPORT void NSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2);
~~~~~~~~~~~~~~~~ ^ ~
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:98:49: note: expanded from macro 'NS_FORMAT_FUNCTION'
#define NS_FORMAT_FUNCTION(F,A) __attribute__((format(__NSString__, F, A)))
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:414:31: error: unknown type name 'NSString'
FOUNDATION_EXPORT void NSLogv(NSString *format, va_list args) NS_FORMAT_FUNCTION(1,0);
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:414:63: error: format argument not an NSString
FOUNDATION_EXPORT void NSLogv(NSString *format, va_list args) NS_FORMAT_FUNCTION(1,0);
~~~~~~~~~~~~~~~~ ^ ~
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:98:49: note: expanded from macro 'NS_FORMAT_FUNCTION'
#define NS_FORMAT_FUNCTION(F,A) __attribute__((format(__NSString__, F, A)))
^
In file included from ../simple_playback.c:9:
In file included from ../../mini_al.h:12572:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:8:
/System/Library/Frameworks/Foundation.framework/Headers/NSZone.h:8:1: error: expected identifier or '('
@class NSString;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSZone.h:16:52: error: unknown type name 'NSString'
FOUNDATION_EXPORT void NSSetZoneName(NSZone *zone, NSString *name);
^
/System/Library/Frameworks/Foundation.framework/Headers/NSZone.h:17:19: error: unknown type name 'NSString'
FOUNDATION_EXPORT NSString *NSZoneName(NSZone *zone);
^
In file included from ../simple_playback.c:9:
In file included from ../../mini_al.h:12572:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5:
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:10:1: error: expected identifier or '('
@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:11:1: error: expected identifier or '('
@class Protocol;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:15:1: error: expected identifier or '('
@protocol NSCopying
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:19:1: error: expected identifier or '('
@end
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:25:1: error: expected identifier or '('
@end
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:30:1: error: expected external declaration
- (id)initWithCoder:(NSCoder *)aDecoder; // NS_DESIGNATED_INITIALIZER
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:30:4: error: redefinition of 'id' as different kind of symbol
- (id)initWithCoder:(NSCoder *)aDecoder; // NS_DESIGNATED_INITIALIZER
^
/usr/include/objc/objc.h:46:29: note: previous definition is here
typedef struct objc_object *id;
^
In file included from ../simple_playback.c:9:
In file included from ../../mini_al.h:12572:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5:
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:30:7: error: expected ';' after top level declarator
- (id)initWithCoder:(NSCoder *)aDecoder; // NS_DESIGNATED_INITIALIZER
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:32:1: error: expected identifier or '('
@end
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:42:1: error: expected identifier or '('
@end
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:49:1: error: expected external declaration
+ (void)setVersion:(NSInteger)aVersion;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:49:4: error: expected identifier or '('
+ (void)setVersion:(NSInteger)aVersion;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:49:4: error: expected ')'
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:49:3: note: to match this '('
+ (void)setVersion:(NSInteger)aVersion;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:50:1: error: expected identifier or '('
@property (readonly) Class classForCoder;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:51:1: error: expected external declaration
- (id)replacementObjectForCoder:(NSCoder *)aCoder;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:51:4: error: redefinition of 'id' as different kind of symbol
- (id)replacementObjectForCoder:(NSCoder *)aCoder;
^
/usr/include/objc/objc.h:46:29: note: previous definition is here
typedef struct objc_object *id;
^
In file included from ../simple_playback.c:9:
In file included from ../../mini_al.h:12572:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5:
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:51:7: error: expected ';' after top level declarator
- (id)replacementObjectForCoder:(NSCoder *)aCoder;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:52:1: error: expected external declaration
- (id)awakeAfterUsingCoder:(NSCoder *)aDecoder NS_REPLACES_RECEIVER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:52:4: error: redefinition of 'id' as different kind of symbol
- (id)awakeAfterUsingCoder:(NSCoder *)aDecoder NS_REPLACES_RECEIVER;
^
/usr/include/objc/objc.h:46:29: note: previous definition is here
typedef struct objc_object *id;
^
In file included from ../simple_playback.c:9:
In file included from ../../mini_al.h:12572:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5:
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:52:7: error: expected ';' after top level declarator
- (id)awakeAfterUsingCoder:(NSCoder *)aDecoder NS_REPLACES_RECEIVER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:54:1: error: expected identifier or '('
@end
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:65:1: error: expected identifier or '('
@end
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:74:1: error: expected external declaration
- (void)endContentAccess;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:74:4: error: expected identifier or '('
- (void)endContentAccess;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:74:4: error: expected ')'
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:74:3: note: to match this '('
- (void)endContentAccess;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:75:1: error: expected external declaration
- (void)discardContentIfPossible;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:75:4: error: expected identifier or '('
- (void)discardContentIfPossible;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:75:4: error: expected ')'
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:75:3: note: to match this '('
- (void)discardContentIfPossible;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:76:1: error: expected external declaration
- (BOOL)isContentDiscarded;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:76:4: error: redefinition of 'BOOL' as different kind of symbol
- (BOOL)isContentDiscarded;
^
/usr/include/objc/objc.h:65:21: note: previous definition is here
typedef signed char BOOL;
^
In file included from ../simple_playback.c:9:
In file included from ../../mini_al.h:12572:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5:
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:76:9: error: expected ';' after top level declarator
- (BOOL)isContentDiscarded;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:77:1: error: expected identifier or '('
@end
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:81:1: error: expected identifier or '('
@end
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:119:12: error: expected expression
return [(id)CFMakeCollectable(X) autorelease];
^
In file included from ../simple_playback.c:9:
In file included from ../../mini_al.h:12572:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:6:
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:1: error: expected identifier or '('
@class NSArray;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:26:1: error: expected identifier or '('
@protocol NSFastEnumeration
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:30:1: error: expected identifier or '('
@end
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:36:1: error: expected identifier or '('
@end
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:1: error: expected identifier or '('
@end
^
In file included from ../simple_playback.c:9:
In file included from ../../mini_al.h:12572:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:7:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSRange.h:5:
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:9:1: error: expected identifier or '('
@interface NSValue : NSObject <NSCopying, NSSecureCoding>
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:12:1: error: expected identifier or '('
@property (readonly) const char *objCType NS_RETURNS_INNER_POINTER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:14:1: error: expected external declaration
- (instancetype)initWithBytes:(const void *)value objCType:(const char *)type NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:14:4: error: redefinition of 'id' as different kind of symbol
- (instancetype)initWithBytes:(const void *)value objCType:(const char *)type NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:229:22: note: expanded from macro 'instancetype'
#define instancetype id
^
/usr/include/objc/objc.h:46:29: note: previous definition is here
typedef struct objc_object *id;
^
In file included from ../simple_playback.c:9:
In file included from ../../mini_al.h:12572:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:7:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSRange.h:5:
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:14:17: error: expected ';' after top level declarator
- (instancetype)initWithBytes:(const void *)value objCType:(const char *)type NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:15:1: error: expected external declaration
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:15:4: error: redefinition of 'id' as different kind of symbol
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:229:22: note: expanded from macro 'instancetype'
#define instancetype id
^
/usr/include/objc/objc.h:46:29: note: previous definition is here
typedef struct objc_object *id;
^
In file included from ../simple_playback.c:9:
In file included from ../../mini_al.h:12572:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:7:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSRange.h:5:
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:15:17: error: expected ';' after top level declarator
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:17:1: error: expected identifier or '('
@end
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:22:1: error: expected external declaration
+ (NSValue *)value:(const void *)value withObjCType:(const char *)type;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:22:12: error: expected ')'
+ (NSValue *)value:(const void *)value withObjCType:(const char *)type;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:22:3: note: to match this '('
+ (NSValue *)value:(const void *)value withObjCType:(const char *)type;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:22:14: error: expected ';' after top level declarator
+ (NSValue *)value:(const void *)value withObjCType:(const char *)type;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:24:1: error: expected identifier or '('
@end
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:29:1: error: expected identifier or '('
@property (nonatomic, readonly) id nonretainedObjectValue;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:31:1: error: expected external declaration
+ (NSValue *)valueWithPointer:(const void *)pointer;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:31:12: error: expected ')'
+ (NSValue *)valueWithPointer:(const void *)pointer;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:31:3: note: to match this '('
+ (NSValue *)valueWithPointer:(const void *)pointer;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:31:14: error: expected ';' after top level declarator
+ (NSValue *)valueWithPointer:(const void *)pointer;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:32:1: error: expected external declaration
- (void *)pointerValue;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:32:4: error: expected identifier or '('
- (void *)pointerValue;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:32:4: error: expected ')'
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:32:3: note: to match this '('
- (void *)pointerValue;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:34:1: error: expected external declaration
- (BOOL)isEqualToValue:(NSValue *)value;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:34:4: error: redefinition of 'BOOL' as different kind of symbol
- (BOOL)isEqualToValue:(NSValue *)value;
^
/usr/include/objc/objc.h:65:21: note: previous definition is here
typedef signed char BOOL;
^
In file included from ../simple_playback.c:9:
In file included from ../../mini_al.h:12572:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:7:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSRange.h:5:
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:34:9: error: expected ';' after top level declarator
- (BOOL)isEqualToValue:(NSValue *)value;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:36:1: error: expected identifier or '('
@end
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:41:1: error: expected external declaration
- (NSNumber *)initWithChar:(char)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:41:13: error: expected ')'
- (NSNumber *)initWithChar:(char)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:41:3: note: to match this '('
- (NSNumber *)initWithChar:(char)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:41:15: error: expected ';' after top level declarator
- (NSNumber *)initWithChar:(char)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:42:1: error: expected external declaration
- (NSNumber *)initWithUnsignedChar:(unsigned char)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:42:13: error: expected ')'
- (NSNumber *)initWithUnsignedChar:(unsigned char)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:42:3: note: to match this '('
- (NSNumber *)initWithUnsignedChar:(unsigned char)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:42:15: error: expected ';' after top level declarator
- (NSNumber *)initWithUnsignedChar:(unsigned char)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:43:1: error: expected external declaration
- (NSNumber *)initWithShort:(short)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:43:13: error: expected ')'
- (NSNumber *)initWithShort:(short)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:43:3: note: to match this '('
- (NSNumber *)initWithShort:(short)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:43:15: error: expected ';' after top level declarator
- (NSNumber *)initWithShort:(short)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:44:1: error: expected external declaration
- (NSNumber *)initWithUnsignedShort:(unsigned short)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:44:13: error: expected ')'
- (NSNumber *)initWithUnsignedShort:(unsigned short)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:44:3: note: to match this '('
- (NSNumber *)initWithUnsignedShort:(unsigned short)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:44:15: error: expected ';' after top level declarator
- (NSNumber *)initWithUnsignedShort:(unsigned short)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:45:1: error: expected external declaration
- (NSNumber *)initWithInt:(int)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:45:13: error: expected ')'
- (NSNumber *)initWithInt:(int)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:45:3: note: to match this '('
- (NSNumber *)initWithInt:(int)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:45:15: error: expected ';' after top level declarator
- (NSNumber *)initWithInt:(int)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:46:1: error: expected external declaration
- (NSNumber *)initWithUnsignedInt:(unsigned int)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:46:13: error: expected ')'
- (NSNumber *)initWithUnsignedInt:(unsigned int)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:46:3: note: to match this '('
- (NSNumber *)initWithUnsignedInt:(unsigned int)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:46:15: error: expected ';' after top level declarator
- (NSNumber *)initWithUnsignedInt:(unsigned int)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:47:1: error: expected external declaration
- (NSNumber *)initWithLong:(long)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:47:13: error: expected ')'
- (NSNumber *)initWithLong:(long)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:47:3: note: to match this '('
- (NSNumber *)initWithLong:(long)value NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSValue.h:47:15: error: expected ';' after top level declarator
- (NSNumber *)initWithLong:(long)value NS_DESIGNATED_INITIALIZER;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
101 errors generated.
from miniaudio.
I can see what's happening. From about line 12562 there is some logic for controlling which heasders to #include depending on whether or not the project is being compiled for mobile or desktop. For some reason yours is not being detected as desktop and is dragging in the Objective-C stuff from AVFoundation.h instead. Not sure why that would be happening...
Note that on mobile builds mini_al needs to be compiled as Objective-C.
from miniaudio.
Potential fix is in.
from miniaudio.
Now it compiles, but it segfaults. Only enumeration example works, playback and capture example just return Segmentation fault: 11
. I am now just using your mal_build_examples_mac script, not sure what is used instead of gdb on macOS.
Edit:
bash-3.2$ lldb ./simple_playback mail.original.wav
(lldb) target create "./simple_playback"
2018-07-02 07:28:41.815 lldb[67094:188406] Metadata.framework [Error]: couldn't get the client port
Current executable set to './simple_playback' (x86_64).
(lldb) settings set -- target.run-args "mail.original.wav"
(lldb) run
Process 67097 launched: './simple_playback' (x86_64)
Process 67097 stopped
* thread #1: tid = 0x2dffa, 0x0000000000000000, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
frame #0: 0x0000000000000000
error: memory read failed for 0x0
(lldb) bt
* thread #1: tid = 0x2dffa, 0x0000000000000000, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0: 0x0000000000000000
frame #1: 0x00000001000241bf simple_playback`mal_device_init__coreaudio + 511
frame #2: 0x000000010002ba42 simple_playback`mal_device_init + 1858
frame #3: 0x000000010002c222 simple_playback`mal_device_init_ex + 258
frame #4: 0x000000010002b3ad simple_playback`mal_device_init + 173
frame #5: 0x000000010004010c simple_playback`main + 332
frame #6: 0x00007fff866d35c9 libdyld.dylib`start + 1
(lldb)
from miniaudio.
Hmm, I think it's due to the runtime linking I'm doing. Can you #define MAL_NO_RUNTIME_LINKING and then link to -framework CoreFoundation -framework CoreAudio -framework AudioToolbox and see if you get any linking errors?
Thanks for your help!
from miniaudio.
With MAL_NO_RUNTIME_LINKING I am getting this:
bash-3.2$ clang -v ../simple_playback.c -o ../bin/simple_playback -Wall -lpthread -lm -framework CoreFoundation -framework CoreAudio -framework AudioToolbox
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.10.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name simple_playback.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 242.2 -v -dwarf-column-info -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.1.0 -Wall -fdebug-compilation-dir /Users/milann/Projects/mini_al-dev/examples/build -ferror-limit 19 -fmessage-length 144 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.10.0 -fencode-extended-block-signature -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/3l/pztksx_j7bj5kc645hxdd1cc0000gn/T/simple_playback-91c50d.o -x c ../simple_playback.c
clang -cc1 version 6.1.0 based upon LLVM 3.6.0svn default target x86_64-apple-darwin14.0.0
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.1.0/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
In file included from ../simple_playback.c:10:
../../mini_al.h:13864:56: warning: incompatible pointer types assigning to 'mal_proc' (aka 'void (*)(void)') from 'OSStatus (AudioObjectID,
const AudioObjectPropertyAddress *, UInt32, const void *, UInt32 *, void *)' [-Wincompatible-pointer-types]
pContext->coreaudio.AudioObjectGetPropertyData = AudioObjectGetPropertyData;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
../../mini_al.h:13865:56: warning: incompatible pointer types assigning to 'mal_proc' (aka 'void (*)(void)') from 'OSStatus (AudioObjectID,
const AudioObjectPropertyAddress *, UInt32, const void *, UInt32 *)' [-Wincompatible-pointer-types]
pContext->coreaudio.AudioObjectGetPropertyDataSize = AudioObjectGetPropertyDataSize;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../mini_al.h:13866:56: warning: incompatible pointer types assigning to 'mal_proc' (aka 'void (*)(void)') from 'OSStatus (AudioObjectID,
const AudioObjectPropertyAddress *, UInt32, const void *, UInt32, const void *)' [-Wincompatible-pointer-types]
pContext->coreaudio.AudioObjectSetPropertyData = AudioObjectSetPropertyData;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.10.0 -o ../bin/simple_playback /var/folders/3l/pztksx_j7bj5kc645hxdd1cc0000gn/T/simple_playback-91c50d.o -lpthread -lm -framework CoreFoundation -framework CoreAudio -framework AudioToolbox -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.1.0/lib/darwin/libclang_rt.osx.a
Undefined symbols for architecture x86_64:
"_AudioComponentFindNext", referenced from:
_mal_context_init__coreaudio in simple_playback-91c50d.o
"_AudioComponentInstanceDispose", referenced from:
_mal_context_init__coreaudio in simple_playback-91c50d.o
"_AudioComponentInstanceNew", referenced from:
_mal_context_init__coreaudio in simple_playback-91c50d.o
"_AudioOutputUnitStart", referenced from:
_mal_context_init__coreaudio in simple_playback-91c50d.o
"_AudioOutputUnitStop", referenced from:
_mal_context_init__coreaudio in simple_playback-91c50d.o
"_AudioUnitAddPropertyListener", referenced from:
_mal_context_init__coreaudio in simple_playback-91c50d.o
"_AudioUnitGetProperty", referenced from:
_mal_context_init__coreaudio in simple_playback-91c50d.o
"_AudioUnitInitialize", referenced from:
_mal_context_init__coreaudio in simple_playback-91c50d.o
"_AudioUnitRender", referenced from:
_mal_context_init__coreaudio in simple_playback-91c50d.o
"_AudioUnitSetProperty", referenced from:
_mal_context_init__coreaudio in simple_playback-91c50d.o
"_SDL_CloseAudio", referenced from:
_mal_context_init__sdl in simple_playback-91c50d.o
"_SDL_CloseAudioDevice", referenced from:
_mal_context_init__sdl in simple_playback-91c50d.o
"_SDL_GetAudioDeviceName", referenced from:
_mal_context_init__sdl in simple_playback-91c50d.o
"_SDL_GetNumAudioDevices", referenced from:
_mal_context_init__sdl in simple_playback-91c50d.o
"_SDL_InitSubSystem", referenced from:
_mal_context_init__sdl in simple_playback-91c50d.o
"_SDL_OpenAudio", referenced from:
_mal_context_init__sdl in simple_playback-91c50d.o
"_SDL_OpenAudioDevice", referenced from:
_mal_context_init__sdl in simple_playback-91c50d.o
"_SDL_PauseAudio", referenced from:
_mal_context_init__sdl in simple_playback-91c50d.o
"_SDL_PauseAudioDevice", referenced from:
_mal_context_init__sdl in simple_playback-91c50d.o
"_SDL_QuitSubSystem", referenced from:
_mal_context_init__sdl in simple_playback-91c50d.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
from miniaudio.
Those undefined symbols are from the AudioToolbox framework... I have no idea why they aren't being found. Maybe they are defined in a different framework somewhere???
from miniaudio.
Here is the output from nm -gU /System/Library/Frameworks/AudioToolbox.framework/Versions/Current/AudioToolbox
https://gist.github.com/gen2brain/8e41eef5e990eb4ab8409038755aa332
from miniaudio.
Yes, in AudioUnit framework, I will try to add it.
from miniaudio.
Could you try adding -framework AudioUnit?
Edit: You beat me to the AudioUnit framework idea :)
from miniaudio.
Ok, now compiles, after I also added MAL_NO_SDL, and simple_playback works.
from miniaudio.
Great! I will get runtime linking working as soon as I get home from work. Thanks for all that!
from miniaudio.
Fixes are in for that runtime linking bug and those three warnings.
from miniaudio.
Great, I tested and everything works :)
Btw. something is wrong with stdint.h on older versions of gcc. I think version 4.8 is used in Ubuntu 14 (that travis ci use), for now I just update to gcc 5 in .travis.yml:
In file included from mini_al.c:4:0:
mini_al.h: In function ‘mal_timer_get_time_in_seconds’:
mini_al.h:3584:5: error: unknown type name ‘uint64_t’
uint64_t newTimeCounter = (newTime.tv_sec * 1000000000) + newTime.tv_nsec;
^
mini_al.h:3585:5: error: unknown type name ‘uint64_t’
uint64_t oldTimeCounter = pTimer->counter;
^
In file included from mini_al.c:4:0:
mini_al.h: In function ‘mal_copy_memory_64’:
mini_al.h:19161:30: error: ‘SIZE_MAX’ undeclared (first use in this function)
if (bytesToCopyNow > SIZE_MAX) {
^
mini_al.h:19161:30: note: each undeclared identifier is reported only once for each function it appears in
mini_al.h: In function ‘mal_zero_memory_64’:
mini_al.h:19181:30: error: ‘SIZE_MAX’ undeclared (first use in this function)
if (bytesToZeroNow > SIZE_MAX) {
^
In file included from mini_al.c:4:0:
mini_al.h: In function ‘mal_decoder__full_decode_and_uninit’:
mini_al.h:25605:46: error: ‘SIZE_MAX’ undeclared (first use in this function)
if ((newDataCapInFrames * bpf) > SIZE_MAX) {
from miniaudio.
Thanks. No reason not to support 4.8. Fix is in (untested).
from miniaudio.
Tested fix in travis and it works now.
from miniaudio.
This has been merged into master. Thanks for testing @gen2brain!
from miniaudio.
Related Issues (20)
- ma_engine_uninit on windows causes Application Verifier breakpoint HOT 1
- [OSX/MacOS] Capture volume out of range ? HOT 10
- iOS: Some phones fail to init AudioUnit when using shared context HOT 3
- Android: Build failure of dev branch due to pthread_attr_setinheritsched HOT 2
- WASM duplicate symbol HOT 3
- Emscripten WASM Thread Problem HOT 2
- Question about Attenuation in Miniaudio. HOT 1
- Javascript error after uninitializing miniaudio HOT 4
- "Error: Invalid argument" due to ma_channel_map_is_valid HOT 6
- Does miniaudio support encoding PCM sample data into ADPCM sample data? HOT 1
- Uncaught RuntimeError: memory access out of bounds after starting playing the sound. HOT 8
- DELETED HOT 1
- Miniaudio waiting infinitely when calling ma_engine_uninit HOT 1
- Is there a way to gracefully shut down all threads created by miniaudio when the application exits? HOT 1
- Channel Convert Init Access Violation going from 2 channels to >2 channels HOT 2
- Sound system lags when playing sounds quickly and using delay or reverb HOT 1
- ma_device_uninit crash on Android <= 10 HOT 2
- error when compiling on android HOT 1
- "[ALSA] poll() failed" Bug. HOT 1
- Consider ditching ReadFile() in favor of FILE* fread() HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from miniaudio.