Skip to content

Commit 37ef47c

Browse files
committed
xpc nuked out of the driver
1 parent 6b5bf7b commit 37ef47c

6 files changed

Lines changed: 2 additions & 208 deletions

File tree

native/driver/Driver.xcodeproj/project.pbxproj

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
1CB8B3921BBCF50A000E2DD1 /* EQM_WrappedAudioEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CB8B3901BBCF50A000E2DD1 /* EQM_WrappedAudioEngine.cpp */; };
2424
1CDF3ABC1E863B980001E9B7 /* EQM_NullDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CDF3ABA1E863B980001E9B7 /* EQM_NullDevice.cpp */; };
2525
1CDF3ABF1E8644C20001E9B7 /* EQM_AbstractDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CDF3ABD1E8644C20001E9B7 /* EQM_AbstractDevice.cpp */; };
26-
27381A161C8EF50F00DF167C /* EQM_XPCHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 27381A141C8EF50F00DF167C /* EQM_XPCHelper.m */; };
2726
2743C9CD1D7EF8760089613B /* CACFArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CE3E68F1BE2683900167F5D /* CACFArray.cpp */; };
2827
2743C9CF1D7EF8760089613B /* CACFDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CE3E68C1BE263CA00167F5D /* CACFDictionary.cpp */; };
2928
2743C9D11D7EF8760089613B /* CACFNumber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C305D9B1BE294B5004EBB91 /* CACFNumber.cpp */; };
@@ -109,8 +108,6 @@
109108
1CE3E68D1BE263CA00167F5D /* CACFDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CACFDictionary.h; path = PublicUtility/CACFDictionary.h; sourceTree = "<group>"; };
110109
1CE3E68F1BE2683900167F5D /* CACFArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CACFArray.cpp; path = PublicUtility/CACFArray.cpp; sourceTree = "<group>"; };
111110
1CE3E6901BE2683900167F5D /* CACFArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CACFArray.h; path = PublicUtility/CACFArray.h; sourceTree = "<group>"; };
112-
27381A141C8EF50F00DF167C /* EQM_XPCHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EQM_XPCHelper.m; sourceTree = "<group>"; };
113-
27381A151C8EF50F00DF167C /* EQM_XPCHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EQM_XPCHelper.h; sourceTree = "<group>"; };
114111
2743C9C61D7EF84B0089613B /* libPublicUtility.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPublicUtility.a; sourceTree = BUILT_PRODUCTS_DIR; };
115112
E00879C8237EC3D3006AACF8 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
116113
E01A29F32456E4F800369F41 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -211,8 +208,6 @@
211208
1C0CB6AF1C642C600084C15A /* DeviceClients */,
212209
1C38210D1C4A163A00A0C8C6 /* EQM_TaskQueue.h */,
213210
1C38210C1C4A163A00A0C8C6 /* EQM_TaskQueue.cpp */,
214-
27381A151C8EF50F00DF167C /* EQM_XPCHelper.h */,
215-
27381A141C8EF50F00DF167C /* EQM_XPCHelper.m */,
216211
1CB8B3911BBCF50A000E2DD1 /* EQM_WrappedAudioEngine.h */,
217212
1CB8B3901BBCF50A000E2DD1 /* EQM_WrappedAudioEngine.cpp */,
218213
);
@@ -414,7 +409,6 @@
414409
1CB8B3921BBCF50A000E2DD1 /* EQM_WrappedAudioEngine.cpp in Sources */,
415410
1CB8B36E1BBBD541000E2DD1 /* EQM_PlugInInterface.cpp in Sources */,
416411
1CB8B37D1BBCCF62000E2DD1 /* EQM_PlugIn.cpp in Sources */,
417-
27381A161C8EF50F00DF167C /* EQM_XPCHelper.m in Sources */,
418412
1CDF3ABF1E8644C20001E9B7 /* EQM_AbstractDevice.cpp in Sources */,
419413
1C7010791F07A0BA00D8CCDC /* EQM_VolumeControl.cpp in Sources */,
420414
1C0CB6BA1C642C600084C15A /* EQM_ClientMap.cpp in Sources */,
@@ -656,7 +650,7 @@
656650
MACOSX_DEPLOYMENT_TARGET = 10.10;
657651
MARKETING_VERSION = 1.2.1;
658652
MTL_ENABLE_DEBUG_INFO = NO;
659-
OTHER_CODE_SIGN_FLAGS = timestamp;
653+
OTHER_CODE_SIGN_FLAGS = "--timestamp";
660654
PRODUCT_BUNDLE_IDENTIFIER = com.bitgapp.eqmac.driver;
661655
PRODUCT_NAME = "$(TARGET_NAME)";
662656
PROVISIONING_PROFILE_SPECIFIER = "";

native/driver/Source/EQM_Device.cpp

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
// Local Includes
1717
#include "EQM_PlugIn.h"
18-
#include "EQM_XPCHelper.h"
1918
#include "EQM_Utils.h"
2019

2120
// PublicUtility Includes
@@ -1293,8 +1292,6 @@ void EQM_Device::Device_SetPropertyData(AudioObjectID inObjectID, pid_t inClient
12931292

12941293
void EQM_Device::StartIO(UInt32 inClientID)
12951294
{
1296-
bool clientIsEQMApp, EQMAppHasClientRegistered;
1297-
12981295
{
12991296
CAMutex::Locker theStateLocker(mStateMutex);
13001297

@@ -1319,40 +1316,6 @@ void EQM_Device::StartIO(UInt32 inClientID)
13191316
CAException(theError),
13201317
"EQM_Device::StartIO: Failed to start because of an error calling down to the driver.");
13211318
}
1322-
1323-
clientIsEQMApp = mClients.IsEQMApp(inClientID);
1324-
EQMAppHasClientRegistered = mClients.EQMAppHasClientRegistered();
1325-
}
1326-
1327-
// We only return from StartIO after EQMApp is ready to pass the audio through to the output device. That way
1328-
// the HAL doesn't start sending us data before EQMApp can play it, which would mean we'd have to either drop
1329-
// frames or increase latency.
1330-
if(!clientIsEQMApp && EQMAppHasClientRegistered)
1331-
{
1332-
UInt64 theXPCError = StartEQMAppPlayThroughSync(GetObjectID() == kObjectID_Device_UI_Sounds);
1333-
1334-
switch(theXPCError)
1335-
{
1336-
case kEQMXPC_Success:
1337-
DebugMsg("EQM_Device::StartIO: Ready for IO.");
1338-
break;
1339-
1340-
case kEQMXPC_MessageFailure:
1341-
// This most likely means EQMXPCHelper isn't installed or has crashed. IO will probably still work,
1342-
// but we may drop frames while the audio hardware starts up.
1343-
LogError("EQM_Device::StartIO: Couldn't reach EQMApp via XPC. Attempting to start IO anyway.");
1344-
break;
1345-
1346-
case kEQMXPC_ReturningEarlyError:
1347-
// This can (and might always) happen when the user changes output device in EQMApp while IO is running.
1348-
// See EQMAudioDeviceManager::startPlayThroughSync and EQMPlayThrough::WaitForOutputDeviceToStart.
1349-
LogWarning("EQM_Device::StartIO: EQMApp was busy, so EQMDriver has to return from StartIO early.");
1350-
break;
1351-
1352-
default:
1353-
LogError("EQM_Device::StartIO: EQMApp failed to start the output device. theXPCError=%llu", theXPCError);
1354-
Throw(CAException(kAudioHardwareNotRunningError));
1355-
}
13561319
}
13571320
}
13581321

native/driver/Source/EQM_Types.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
// TODO: Change these and the other defines to const strings?
2424
#define kEQMDriverBundleID "com.bitgapp.eqmac.driver"
2525
#define kEQMAppBundleID "com.bitgapp.eqmac"
26-
#define kEQMXPCHelperBundleID "com.bitgapp.eqmac.xpc"
2726

2827
#define kEQMDeviceUID "EQMDevice"
2928
#define kEQMDeviceModelUID "EQMDeviceModelUID"
@@ -200,17 +199,6 @@ static const AudioObjectPropertyAddress kEQMEnabledOutputControlsAddress = {
200199
kAudioObjectPropertyElementMaster
201200
};
202201

203-
#pragma mark XPC Return Codes
204-
205-
enum {
206-
kEQMXPC_Success,
207-
kEQMXPC_MessageFailure,
208-
kEQMXPC_Timeout,
209-
kEQMXPC_EQMAppStateError,
210-
kEQMXPC_HardwareError,
211-
kEQMXPC_ReturningEarlyError,
212-
kEQMXPC_InternalError
213-
};
214202

215203
#pragma mark Exceptions
216204

native/driver/Source/EQM_XPCHelper.h

Lines changed: 0 additions & 25 deletions
This file was deleted.

native/driver/Source/EQM_XPCHelper.m

Lines changed: 0 additions & 122 deletions
This file was deleted.

native/driver/Supporting Files/Info.plist

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>AudioServerPlugIn_MachServices</key>
6-
<array>
7-
<string>com.bitgapp.eqmac.xpc</string>
8-
</array>
95
<key>CFBundleDevelopmentRegion</key>
106
<string>en</string>
117
<key>CFBundleExecutable</key>
@@ -37,7 +33,7 @@
3733
</array>
3834
</dict>
3935
<key>NSHumanReadableCopyright</key>
40-
<string>Copyright © 2015 - 2019 Bitgapp Ltd.</string>
36+
<string>Copyright © 2015 - 2021 Bitgapp Ltd.</string>
4137
<key>NSPrincipalClass</key>
4238
<string></string>
4339
<key>sandboxSafe</key>

0 commit comments

Comments
 (0)