Compare commits

..

4 commits

Author SHA1 Message Date
Christopher Snowhill
afde046111 WIP: Attempt to actually use the custom icons
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-06-20 19:45:52 -07:00
Christopher Snowhill
0112bd5268 Add new status icon resources
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-06-20 19:45:52 -07:00
Christopher Snowhill
151bfe9e5c Icon: Liquid Glass style icon for macOS Tahoe
Still need to adjust the custom dock icon for this.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-06-20 19:45:52 -07:00
Christopher Snowhill
8835d1981e Apply recommended settings
Except for deployment target, which is staying at 10.13 for now.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-06-20 19:45:52 -07:00
4 changed files with 16 additions and 32 deletions

View file

@ -79,9 +79,7 @@
} }
if(!output) { if(!output) {
output = [[OutputNode alloc] initWithController:self previous:nil]; output = [[OutputNode alloc] initWithController:self previous:nil];
if(![output setupWithInterval:resumeInterval]) { [output setupWithInterval:resumeInterval];
return;
}
} }
[output setVolume:volume]; [output setVolume:volume];
@synchronized(chainQueue) { @synchronized(chainQueue) {

View file

@ -45,8 +45,8 @@
- (double)secondsBuffered; - (double)secondsBuffered;
- (BOOL)setup; - (void)setup;
- (BOOL)setupWithInterval:(BOOL)resumeInterval; - (void)setupWithInterval:(BOOL)resumeInterval;
- (void)process; - (void)process;
- (void)close; - (void)close;
- (void)seek:(double)time; - (void)seek:(double)time;

View file

@ -33,11 +33,11 @@
VisualizationNode *visualizationNode; VisualizationNode *visualizationNode;
} }
- (BOOL)setup { - (void)setup {
return [self setupWithInterval:NO]; [self setupWithInterval:NO];
} }
- (BOOL)setupWithInterval:(BOOL)resumeInterval { - (void)setupWithInterval:(BOOL)resumeInterval {
if(!resumeInterval) { if(!resumeInterval) {
amountPlayed = 0.0; amountPlayed = 0.0;
amountPlayedInterval = 0.0; amountPlayedInterval = 0.0;
@ -49,26 +49,23 @@
output = [[OutputCoreAudio alloc] initWithController:self]; output = [[OutputCoreAudio alloc] initWithController:self];
if(![output setup]) { [output setup];
output = nil;
return NO;
}
if(!DSPsLaunched) { if(!DSPsLaunched) {
rubberbandNode = [[DSPRubberbandNode alloc] initWithController:self previous:nil latency:0.1]; rubberbandNode = [[DSPRubberbandNode alloc] initWithController:self previous:nil latency:0.1];
if(!rubberbandNode) return NO; if(!rubberbandNode) return;
fsurroundNode = [[DSPFSurroundNode alloc] initWithController:self previous:rubberbandNode latency:0.03]; fsurroundNode = [[DSPFSurroundNode alloc] initWithController:self previous:rubberbandNode latency:0.03];
if(!fsurroundNode) return NO; if(!fsurroundNode) return;
equalizerNode = [[DSPEqualizerNode alloc] initWithController:self previous:fsurroundNode latency:0.03]; equalizerNode = [[DSPEqualizerNode alloc] initWithController:self previous:fsurroundNode latency:0.03];
if(!equalizerNode) return NO; if(!equalizerNode) return;
hrtfNode = [[DSPHRTFNode alloc] initWithController:self previous:equalizerNode latency:0.03]; hrtfNode = [[DSPHRTFNode alloc] initWithController:self previous:equalizerNode latency:0.03];
if(!hrtfNode) return NO; if(!hrtfNode) return;
downmixNode = [[DSPDownmixNode alloc] initWithController:self previous:hrtfNode latency:0.03]; downmixNode = [[DSPDownmixNode alloc] initWithController:self previous:hrtfNode latency:0.03];
if(!downmixNode) return NO; if(!downmixNode) return;
// Approximately double the chunk size for Vis at 44100Hz // Approximately double the chunk size for Vis at 44100Hz
visualizationNode = [[VisualizationNode alloc] initWithController:self previous:downmixNode latency:8192.0 / 44100.0]; visualizationNode = [[VisualizationNode alloc] initWithController:self previous:downmixNode latency:8192.0 / 44100.0];
if(!visualizationNode) return NO; if(!visualizationNode) return;
[self setPreviousNode:visualizationNode]; [self setPreviousNode:visualizationNode];
@ -78,8 +75,6 @@
previousInput = nil; previousInput = nil;
} }
return YES;
} }
- (void)seek:(double)time { - (void)seek:(double)time {

View file

@ -223,12 +223,8 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons
while(!stopping) { while(!stopping) {
@autoreleasepool { @autoreleasepool {
if(outputdevicechanged) { if(outputdevicechanged) {
if([self updateDeviceFormat]) { [self updateDeviceFormat];
outputdevicechanged = NO; outputdevicechanged = NO;
} else {
usleep(2000);
continue;
}
} }
if([outputController shouldReset]) { if([outputController shouldReset]) {
@ -478,9 +474,6 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons
- (BOOL)updateDeviceFormat { - (BOOL)updateDeviceFormat {
AVAudioFormat *format = _au.outputBusses[0].format; AVAudioFormat *format = _au.outputBusses[0].format;
if(!format) {
return NO;
}
if(!_deviceFormat || ![_deviceFormat isEqual:format]) { if(!_deviceFormat || ![_deviceFormat isEqual:format]) {
NSError *err; NSError *err;
@ -812,9 +805,7 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons
[_au allocateRenderResourcesAndReturnError:&err]; [_au allocateRenderResourcesAndReturnError:&err];
if(![self updateDeviceFormat]) { [self updateDeviceFormat];
return NO;
}
visController = [VisualizationController sharedController]; visController = [VisualizationController sharedController];