1
1
mirror of https://github.com/bitgapp/eqMac.git synced 2024-11-22 13:07:26 +03:00

setup mixed obj-c swift target for the driver

This commit is contained in:
Nodeful 2021-08-12 02:10:37 +03:00
parent 5214237907
commit 896a678eed
7 changed files with 91 additions and 4349 deletions

View File

@ -7,7 +7,8 @@
objects = {
/* Begin PBXBuildFile section */
789B5F202699153000C72029 /* eqMac.c in Sources */ = {isa = PBXBuildFile; fileRef = 789B5F1F2699153000C72029 /* eqMac.c */; };
78A8049E26C4866D0021981C /* eqMacBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 78A8049D26C4866D0021981C /* eqMacBridge.m */; };
78A804D726C4903E0021981C /* eqMac.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78A804D626C4903E0021981C /* eqMac.swift */; };
E01A29F82456E50500369F41 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E01A29F72456E50500369F41 /* CoreFoundation.framework */; };
E0DAAFBD21FE545F00DCCCEC /* icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = E0DAAFBC21FE545F00DCCCEC /* icon.icns */; };
/* End PBXBuildFile section */
@ -15,8 +16,10 @@
/* Begin PBXFileReference section */
1CB8B3641BBBB78D000E2DD1 /* eqMac.driver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = eqMac.driver; sourceTree = BUILT_PRODUCTS_DIR; };
1CB8B3681BBBB78D000E2DD1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
789B5F1E2699153000C72029 /* eqMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = eqMac.h; sourceTree = "<group>"; };
789B5F1F2699153000C72029 /* eqMac.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = eqMac.c; sourceTree = "<group>"; };
78A8049D26C4866D0021981C /* eqMacBridge.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = eqMacBridge.m; sourceTree = "<group>"; };
78A804A026C486820021981C /* eqMacBridge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = eqMacBridge.h; sourceTree = "<group>"; };
78A804D526C4903E0021981C /* eqMac-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "eqMac-Bridging-Header.h"; sourceTree = "<group>"; };
78A804D626C4903E0021981C /* eqMac.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = eqMac.swift; sourceTree = "<group>"; };
E01A29F72456E50500369F41 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
E0DAAFBC21FE545F00DCCCEC /* icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = icon.icns; sourceTree = "<group>"; };
E0FA2BB021FBB917001C99CD /* build.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = build.sh; sourceTree = "<group>"; };
@ -56,8 +59,9 @@
1CB8B3661BBBB78D000E2DD1 /* Source */ = {
isa = PBXGroup;
children = (
789B5F1E2699153000C72029 /* eqMac.h */,
789B5F1F2699153000C72029 /* eqMac.c */,
78A8049C26C486350021981C /* Bridge */,
78A804D626C4903E0021981C /* eqMac.swift */,
78A804D526C4903E0021981C /* eqMac-Bridging-Header.h */,
);
path = Source;
sourceTree = "<group>";
@ -71,6 +75,15 @@
path = "Supporting Files";
sourceTree = "<group>";
};
78A8049C26C486350021981C /* Bridge */ = {
isa = PBXGroup;
children = (
78A8049D26C4866D0021981C /* eqMacBridge.m */,
78A804A026C486820021981C /* eqMacBridge.h */,
);
path = Bridge;
sourceTree = "<group>";
};
E00879C7237EC3D3006AACF8 /* Frameworks */ = {
isa = PBXGroup;
children = (
@ -121,6 +134,7 @@
1CB8B3631BBBB78D000E2DD1 = {
CreatedOnToolsVersion = 6.4;
DevelopmentTeam = JZA6C97KJA;
LastSwiftMigration = 1240;
ProvisioningStyle = Manual;
};
};
@ -179,7 +193,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
789B5F202699153000C72029 /* eqMac.c in Sources */,
78A8049E26C4866D0021981C /* eqMacBridge.m in Sources */,
78A804D726C4903E0021981C /* eqMac.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -322,10 +337,11 @@
1CB8B36A1BBBB78D000E2DD1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_ENABLE_MODULES = NO;
CLANG_ENABLE_OBJC_ARC = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_ASSIGN_ENUM = NO;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
@ -341,10 +357,12 @@
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1.2.3;
DEAD_CODE_STRIPPING = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = JZA6C97KJA;
ENABLE_NS_ASSERTIONS = YES;
GCC_C_LANGUAGE_STANDARD = c11;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_CPP_RTTI = YES;
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
@ -359,6 +377,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Audio/Plug-Ins/HAL";
IPHONEOS_DEPLOYMENT_TARGET = "";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MARKETING_VERSION = 1.2.3;
MTL_ENABLE_DEBUG_INFO = YES;
@ -369,6 +388,9 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SKIP_INSTALL = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Source/eqMac-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = "";
WARNING_CFLAGS = "";
WATCHOS_DEPLOYMENT_TARGET = "";
@ -379,10 +401,11 @@
1CB8B36B1BBBB78D000E2DD1 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_ENABLE_MODULES = NO;
CLANG_ENABLE_OBJC_ARC = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_ASSIGN_ENUM = NO;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
@ -398,10 +421,12 @@
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1.2.3;
DEAD_CODE_STRIPPING = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = JZA6C97KJA;
ENABLE_NS_ASSERTIONS = YES;
GCC_C_LANGUAGE_STANDARD = c11;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_ENABLE_CPP_RTTI = YES;
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
GCC_PREPROCESSOR_DEFINITIONS = "";
@ -415,6 +440,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Audio/Plug-Ins/HAL";
IPHONEOS_DEPLOYMENT_TARGET = "";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MARKETING_VERSION = 1.2.3;
MTL_ENABLE_DEBUG_INFO = NO;
@ -424,6 +450,8 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SKIP_INSTALL = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Source/eqMac-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = "";
WARNING_CFLAGS = "";
WATCHOS_DEPLOYMENT_TARGET = "";

View File

@ -0,0 +1,11 @@
//
// eqMacBridge.h
// Driver
//
// Created by Nodeful on 12/08/2021.
// Copyright © 2021 Bitgapp. All rights reserved.
//
#import <CoreFoundation/CoreFoundation.h>
void *eqMac_Create(CFAllocatorRef allocator, CFUUIDRef requestedTypeUUID);

View File

@ -0,0 +1,14 @@
//
// eqMacBridge.m
// eqMac
//
// Created by Nodeful on 12/08/2021.
// Copyright © 2021 Bitgapp. All rights reserved.
//
#import "eqMacBridge.h"
#import "eqMac-Swift.h"
void *eqMac_Create(CFAllocatorRef allocator, CFUUIDRef requestedTypeUUID) {
return [eqMac createWithAllocator:allocator requestedTypeUUID:requestedTypeUUID];
}

View File

@ -0,0 +1,4 @@
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//

File diff suppressed because it is too large Load Diff

View File

@ -1,277 +0,0 @@
//
// eqMac.h
// eqMac Driver
//
// Created by Nodeful on 09/07/2021.
// Copyright © 2021 Apple. All rights reserved.
//
#ifndef eqMac_h
#define eqMac_h
#endif /* eqMac_h */
#include <CoreAudio/AudioServerPlugIn.h>
#include <dispatch/dispatch.h>
#include <mach/mach_time.h>
#include <pthread.h>
#include <stdint.h>
#include <sys/syslog.h>
//==================================================================================================
#pragma mark -
#pragma mark Macros
//==================================================================================================
#if TARGET_RT_BIG_ENDIAN
#define FourCCToCString(the4CC) { ((char*)&the4CC)[0], ((char*)&the4CC)[1], ((char*)&the4CC)[2], ((char*)&the4CC)[3], 0 }
#else
#define FourCCToCString(the4CC) { ((char*)&the4CC)[3], ((char*)&the4CC)[2], ((char*)&the4CC)[1], ((char*)&the4CC)[0], 0 }
#endif
#if DEBUG
#define DebugMsg(inFormat, ...) printf(inFormat "\n", ## __VA_ARGS__)
#define FailIf(inCondition, inHandler, inMessage) \
if (inCondition) { \
DebugMsg(inMessage); \
goto inHandler; \
}
#define FailWithAction(inCondition, inAction, inHandler, inMessage) \
if (inCondition) { \
DebugMsg(inMessage); \
{ inAction; } \
goto inHandler; \
}
#else
#define DebugMsg(inFormat, ...)
#define FailIf(inCondition, inHandler, inMessage) \
if (inCondition) { \
goto inHandler; \
}
#define FailWithAction(inCondition, inAction, inHandler, inMessage) \
if (inCondition) { \
{ inAction; } \
goto inHandler; \
}
#endif
//==================================================================================================
#pragma mark -
#pragma mark eqMac State
//==================================================================================================
// The purpose of the eqMac sample is to provide a bare bones implementations to
// illustrate the minimal set of things a driver has to do. The sample driver has the following
// qualities:
// - a plug-in
// - custom property with the selector kPlugIn_CustomPropertyID = 'PCst'
// - a box
// - a device
// - supports 44100 and 48000 sample rates
// - provides a rate scalar of 1.0 via hard coding
// - a single input stream
// - supports 2 channels of 32 bit float LPCM samples
// - always produces zeros
// - a single output stream
// - supports 2 channels of 32 bit float LPCM samples
// - data written to it is ignored
// - controls
// - master input volume
// - master output volume
// - master input mute
// - master output mute
// - master input data source
// - master output data source
// - master play-through data destination
// - all are for illustration purposes only and do not actually manipulate data
// Declare the internal object ID numbers for all the objects this driver implements. Note that
// this driver has a fixed set of objects that never grows or shrinks. If this were not the case,
// the driver would need to have a means to dynamically allocate these IDs. It's important to
// realize that a lot of the structure of this driver is vastly simpler when the IDs are all
// known a priori. Comments in the code will try to identify some of these simplifications and
// point out what a more complicated driver will need to do.
enum {
kObjectID_PlugIn = kAudioObjectPlugInObject,
kObjectID_Box = 2,
kObjectID_Device = 3,
kObjectID_Stream_Input = 4,
kObjectID_Volume_Input_Master = 5,
kObjectID_Mute_Input_Master = 6,
kObjectID_DataSource_Input_Master = 7,
kObjectID_Stream_Output = 8,
kObjectID_Volume_Output_Master = 9,
kObjectID_Mute_Output_Master = 10,
kObjectID_DataSource_Output_Master = 11,
// kObjectID_DataDestination_PlayThru_Master = 12
};
// Custom Properties
enum {
kAudioDeviceCustomPropertyLatency = 'cltc',
kAudioDeviceCustomPropertySafetyOffset = 'csfo',
kAudioDeviceCustomPropertyShown = 'shwn',
kAudioDeviceCustomPropertyVersion = 'vrsn'
};
// Declare the stuff that tracks the state of the plug-in, the device and its sub-objects.
// Note that we use global variables here because this driver only ever has a single device. If
// multiple devices were supported, this state would need to be encapsulated in one or more structs
// so that each object's state can be tracked individually.
// Note also that we share a single mutex across all objects to be thread safe for the same reason.
#define kChannelCount 2
#define kBitsPerChannel 32
#define kBytesPerChannel (kBitsPerChannel / 8)
#define kBytesPerFrame (kChannelCount * kBytesPerChannel)
#define kDevice_Name "eqMac"
#define kDevice_Manufacturer "Bitgapp Ltd"
static Float32* buffer;
#define kBufferSize (65536 * kChannelCount)
#define kPlugIn_BundleID "com.bitgapp.eqmac.driver"
static pthread_mutex_t gPlugIn_StateMutex = PTHREAD_MUTEX_INITIALIZER;
static UInt32 gPlugIn_RefCount = 0;
static AudioServerPlugInHostRef gPlugIn_Host = NULL;
static const AudioObjectPropertySelector kPlugIn_CustomPropertyID = 'PCst';
#define kBox_UID "eqMacBox_UID"
static CFStringRef gBox_Name = NULL;
static Boolean gBox_Acquired = true;
#define kDevice_UID "EQMDevice"
#define kDevice_ModelUID "EQMDeviceModelUID"
static pthread_mutex_t gDevice_IOMutex = PTHREAD_MUTEX_INITIALIZER;
static Float64 gDevice_SampleRate = 44100.0;
static UInt64 gDevice_IOIsRunning = 0;
static const UInt32 kDevice_RingBufferSize = 16384;
static Float64 gDevice_HostTicksPerFrame = 0.0;
static UInt64 gDevice_NumberTimeStamps = 0;
static Float64 gDevice_AnchorSampleTime = 0.0;
static UInt64 gDevice_AnchorHostTime = 0;
static bool gStream_Input_IsActive = true;
static bool gStream_Output_IsActive = true;
static const Float32 kVolume_MinDB = -96.0;
static const Float32 kVolume_MaxDB = 0.0;
static Float32 gVolume_Input_Master_Value = 1.0;
static Float32 gVolume_Output_Master_Value = 1.0;
static bool gMute_Input_Master_Value = false;
static bool gMute_Output_Master_Value = false;
static const UInt32 kDataSource_NumberItems = 1;
#define kDataSource_ItemNamePattern kDevice_Name
static UInt32 gDataSource_Input_Master_Value = 0;
static UInt32 gDataSource_Output_Master_Value = 0;
//static UInt32 gDataDestination_PlayThru_Master_Value = 0;
static UInt32 mShown = 0;
static UInt32 mSafetyOffset = 0;
static UInt32 mLatency = 0;
#
//==================================================================================================
#pragma mark -
#pragma mark AudioServerPlugInDriverInterface Implementation
//==================================================================================================
#pragma mark Prototypes
// Entry points for the COM methods
void* eqMac_Create (CFAllocatorRef inAllocator, CFUUIDRef inRequestedTypeUUID);
static HRESULT eqMac_QueryInterface (void* inDriver, REFIID inUUID, LPVOID* outInterface);
static ULONG eqMac_AddRef (void* inDriver);
static ULONG eqMac_Release (void* inDriver);
static OSStatus eqMac_Initialize (AudioServerPlugInDriverRef inDriver, AudioServerPlugInHostRef inHost);
static OSStatus eqMac_CreateDevice (AudioServerPlugInDriverRef inDriver, CFDictionaryRef inDescription, const AudioServerPlugInClientInfo* inClientInfo, AudioObjectID* outDeviceObjectID);
static OSStatus eqMac_DestroyDevice (AudioServerPlugInDriverRef inDriver, AudioObjectID inDeviceObjectID);
static OSStatus eqMac_AddDeviceClient (AudioServerPlugInDriverRef inDriver, AudioObjectID inDeviceObjectID, const AudioServerPlugInClientInfo* inClientInfo);
static OSStatus eqMac_RemoveDeviceClient (AudioServerPlugInDriverRef inDriver, AudioObjectID inDeviceObjectID, const AudioServerPlugInClientInfo* inClientInfo);
static OSStatus eqMac_PerformDeviceConfigurationChange (AudioServerPlugInDriverRef inDriver, AudioObjectID inDeviceObjectID, UInt64 inChangeAction, void* inChangeInfo);
static OSStatus eqMac_AbortDeviceConfigurationChange (AudioServerPlugInDriverRef inDriver, AudioObjectID inDeviceObjectID, UInt64 inChangeAction, void* inChangeInfo);
static Boolean eqMac_HasProperty (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress);
static OSStatus eqMac_IsPropertySettable (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, Boolean* outIsSettable);
static OSStatus eqMac_GetPropertyDataSize (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32* outDataSize);
static OSStatus eqMac_GetPropertyData (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32 inDataSize, UInt32* outDataSize, void* outData);
static OSStatus eqMac_SetPropertyData (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32 inDataSize, const void* inData);
static OSStatus eqMac_StartIO (AudioServerPlugInDriverRef inDriver, AudioObjectID inDeviceObjectID, UInt32 inClientID);
static OSStatus eqMac_StopIO (AudioServerPlugInDriverRef inDriver, AudioObjectID inDeviceObjectID, UInt32 inClientID);
static OSStatus eqMac_GetZeroTimeStamp (AudioServerPlugInDriverRef inDriver, AudioObjectID inDeviceObjectID, UInt32 inClientID, Float64* outSampleTime, UInt64* outHostTime, UInt64* outSeed);
static OSStatus eqMac_WillDoIOOperation (AudioServerPlugInDriverRef inDriver, AudioObjectID inDeviceObjectID, UInt32 inClientID, UInt32 inOperationID, Boolean* outWillDo, Boolean* outWillDoInPlace);
static OSStatus eqMac_BeginIOOperation (AudioServerPlugInDriverRef inDriver, AudioObjectID inDeviceObjectID, UInt32 inClientID, UInt32 inOperationID, UInt32 inIOBufferFrameSize, const AudioServerPlugInIOCycleInfo* inIOCycleInfo);
static OSStatus eqMac_DoIOOperation (AudioServerPlugInDriverRef inDriver, AudioObjectID inDeviceObjectID, AudioObjectID inStreamObjectID, UInt32 inClientID, UInt32 inOperationID, UInt32 inIOBufferFrameSize, const AudioServerPlugInIOCycleInfo* inIOCycleInfo, void* ioMainBuffer, void* ioSecondaryBuffer);
static OSStatus eqMac_EndIOOperation (AudioServerPlugInDriverRef inDriver, AudioObjectID inDeviceObjectID, UInt32 inClientID, UInt32 inOperationID, UInt32 inIOBufferFrameSize, const AudioServerPlugInIOCycleInfo* inIOCycleInfo);
// Implementation
static Boolean eqMac_HasPlugInProperty (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress);
static OSStatus eqMac_IsPlugInPropertySettable (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, Boolean* outIsSettable);
static OSStatus eqMac_GetPlugInPropertyDataSize (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32* outDataSize);
static OSStatus eqMac_GetPlugInPropertyData (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32 inDataSize, UInt32* outDataSize, void* outData);
static OSStatus eqMac_SetPlugInPropertyData (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32 inDataSize, const void* inData, UInt32* outNumberPropertiesChanged, AudioObjectPropertyAddress outChangedAddresses[2]);
static Boolean eqMac_HasBoxProperty (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress);
static OSStatus eqMac_IsBoxPropertySettable (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, Boolean* outIsSettable);
static OSStatus eqMac_GetBoxPropertyDataSize (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32* outDataSize);
static OSStatus eqMac_GetBoxPropertyData (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32 inDataSize, UInt32* outDataSize, void* outData);
static OSStatus eqMac_SetBoxPropertyData (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32 inDataSize, const void* inData, UInt32* outNumberPropertiesChanged, AudioObjectPropertyAddress outChangedAddresses[2]);
static Boolean eqMac_HasDeviceProperty (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress);
static OSStatus eqMac_IsDevicePropertySettable (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, Boolean* outIsSettable);
static OSStatus eqMac_GetDevicePropertyDataSize (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32* outDataSize);
static OSStatus eqMac_GetDevicePropertyData (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32 inDataSize, UInt32* outDataSize, void* outData);
static OSStatus eqMac_SetDevicePropertyData (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32 inDataSize, const void* inData, UInt32* outNumberPropertiesChanged, AudioObjectPropertyAddress outChangedAddresses[2]);
static Boolean eqMac_HasStreamProperty (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress);
static OSStatus eqMac_IsStreamPropertySettable (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, Boolean* outIsSettable);
static OSStatus eqMac_GetStreamPropertyDataSize (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32* outDataSize);
static OSStatus eqMac_GetStreamPropertyData (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32 inDataSize, UInt32* outDataSize, void* outData);
static OSStatus eqMac_SetStreamPropertyData (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32 inDataSize, const void* inData, UInt32* outNumberPropertiesChanged, AudioObjectPropertyAddress outChangedAddresses[2]);
static Boolean eqMac_HasControlProperty (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress);
static OSStatus eqMac_IsControlPropertySettable (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, Boolean* outIsSettable);
static OSStatus eqMac_GetControlPropertyDataSize (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32* outDataSize);
static OSStatus eqMac_GetControlPropertyData (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32 inDataSize, UInt32* outDataSize, void* outData);
static OSStatus eqMac_SetControlPropertyData (AudioServerPlugInDriverRef inDriver, AudioObjectID inObjectID, pid_t inClientProcessID, const AudioObjectPropertyAddress* inAddress, UInt32 inQualifierDataSize, const void* inQualifierData, UInt32 inDataSize, const void* inData, UInt32* outNumberPropertiesChanged, AudioObjectPropertyAddress outChangedAddresses[2]);
#pragma mark The Interface
static AudioServerPlugInDriverInterface gAudioServerPlugInDriverInterface = {
NULL,
eqMac_QueryInterface,
eqMac_AddRef,
eqMac_Release,
eqMac_Initialize,
eqMac_CreateDevice,
eqMac_DestroyDevice,
eqMac_AddDeviceClient,
eqMac_RemoveDeviceClient,
eqMac_PerformDeviceConfigurationChange,
eqMac_AbortDeviceConfigurationChange,
eqMac_HasProperty,
eqMac_IsPropertySettable,
eqMac_GetPropertyDataSize,
eqMac_GetPropertyData,
eqMac_SetPropertyData,
eqMac_StartIO,
eqMac_StopIO,
eqMac_GetZeroTimeStamp,
eqMac_WillDoIOOperation,
eqMac_BeginIOOperation,
eqMac_DoIOOperation,
eqMac_EndIOOperation
};
static AudioServerPlugInDriverInterface* gAudioServerPlugInDriverInterfacePtr = &gAudioServerPlugInDriverInterface;
static AudioServerPlugInDriverRef gAudioServerPlugInDriverRef = &gAudioServerPlugInDriverInterfacePtr;

View File

@ -0,0 +1,20 @@
//
// eqMac.swift
// eqMac
//
// Created by Nodeful on 12/08/2021.
// Copyright © 2021 Bitgapp. All rights reserved.
//
import Foundation
import CoreAudio.AudioServerPlugIn
@objc
class eqMac: NSObject {
@objc
static func create (allocator: CFAllocator!, requestedTypeUUID: CFUUID!) -> UnsafeMutablePointer<AudioServerPlugInDriverRef>? {
return nil
}
}