Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions TAAESample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
4CDCACBD1CA25AA8008AAEF1 /* Products */,
);
sourceTree = "<group>";
usesTabs = 0;
};
4CDCACBD1CA25AA8008AAEF1 /* Products */ = {
isa = PBXGroup;
Expand Down
2 changes: 1 addition & 1 deletion TAAESample/Platform/macOS/Classes/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
self.audio = AEAudioController();
do {
try self.audio!.start();
if let viewController = NSApplication.sharedApplication().mainWindow?.contentViewController as? ViewController {
if let viewController = NSApplication.shared.mainWindow?.contentViewController as? ViewController {
viewController.audio = self.audio
}
} catch {
Expand Down
2 changes: 1 addition & 1 deletion TAAESample/Platform/macOS/Classes/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ViewController: NSViewController {
// Do any additional setup after loading the view.
}

override var representedObject: AnyObject? {
override var representedObject: Any? {
didSet {
// Update the view, if already loaded.
}
Expand Down
3 changes: 3 additions & 0 deletions TheAmazingAudioEngine.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@
4CDCAC991CA25A29008AAEF1 /* Products */,
);
sourceTree = "<group>";
usesTabs = 0;
};
4CDCAC991CA25A29008AAEF1 /* Products */ = {
isa = PBXGroup;
Expand Down Expand Up @@ -1188,6 +1189,7 @@
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SKIP_INSTALL = YES;
Expand All @@ -1198,6 +1200,7 @@
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SKIP_INSTALL = YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ - (double)releaseTime {
}

- (double)masterGain {
return [self getParameterValueForId:kDynamicsProcessorParam_OverallGain];
if ( @available(iOS 15.0, macOS 12.0, *) ) {
return [self getParameterValueForId:6];
}
else {
return [self getParameterValueForId:kDynamicsProcessorParam_MasterGain];
}
}

- (double)compressionAmount {
Expand Down Expand Up @@ -110,8 +115,14 @@ - (void)setReleaseTime:(double)releaseTime {
}

- (void)setMasterGain:(double)masterGain {
[self setParameterValue: masterGain
forId: kDynamicsProcessorParam_OverallGain];
if ( @available(iOS 15.0, macOS 12.0, *) ) {
[self setParameterValue: masterGain
forId: 6];
}
else {
[self setParameterValue: masterGain
forId: kDynamicsProcessorParam_MasterGain];
}
}

@end
2 changes: 1 addition & 1 deletion TheAmazingAudioEngine/Outputs/AEAudioUnitOutput.m
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ static void AEAudioUnitOutputReportRenderTime(__unsafe_unretained AEAudioUnitOut

if ( now - THIS->_firstReportTime > kRenderBudgetWarningInitialDelay
&& renderTime > bufferDuration * kRenderBudgetWarningThreshold ) {
if ( @available(iOS 12, *) ) {
if ( @available(iOS 12, macOS 10.14, *) ) {
os_signpost_event_emit(THIS->_log, OS_SIGNPOST_ID_EXCLUSIVE, "Overrun");
}
dispatch_async(dispatch_get_main_queue(), ^{
Expand Down
2 changes: 2 additions & 0 deletions TheAmazingAudioEngine/Utilities/AEIOAudioUnit.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
NSString * const AEIOAudioUnitSessionInterruptionBeganNotification = @"AEIOAudioUnitSessionInterruptionBeganNotification";
NSString * const AEIOAudioUnitSessionInterruptionEndedNotification = @"AEIOAudioUnitSessionInterruptionEndedNotification";

#if TARGET_OS_IPHONE
static const double kAVAudioSession0dBGain = 0.75;
#endif

@interface AEIOAudioUnit ()
@property (nonatomic, strong) AEManagedValue * renderBlockValue;
Expand Down