Compare commits

..

6 commits

Author SHA1 Message Date
Christopher Snowhill
72aca0856f WIP: Attempt to actually use the custom icons
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-07-01 04:49:33 -07:00
Christopher Snowhill
e52650497b Add new status icon resources
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-07-01 04:49:33 -07:00
Christopher Snowhill
55fe616c67 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-07-01 04:49:33 -07:00
Christopher Snowhill
5f4d2b32cd Apply recommended settings
Except for deployment target, which is staying at 10.13 for now.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-07-01 04:49:33 -07:00
Christopher Snowhill
98d898a715 Visualization: No longer throw an assert on error
If latency is greater than the buffer size, or somehow less than zero,
instead simply emit silent visualization data until latency recovers.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-07-01 04:48:33 -07:00
Christopher Snowhill
c3511ea5e7 Playlist: Add safety checks to update total length
Update total length had a mysterious crash for some user, hopefully this
will fix it.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-07-01 04:48:29 -07:00
2 changed files with 8 additions and 3 deletions

View file

@ -16,6 +16,7 @@
float *visAudio;
int visAudioCursor, visAudioSize;
uint64_t visSamplesPosted;
BOOL ignoreLatency;
}
static VisualizationController *_sharedController = nil;
@ -35,6 +36,7 @@ static VisualizationController *_sharedController = nil;
visAudio = NULL;
visAudioSize = 0;
latency = 0;
ignoreLatency = YES;
}
return self;
}
@ -48,6 +50,7 @@ static VisualizationController *_sharedController = nil;
latency = 0;
visAudioCursor = 0;
visSamplesPosted = 0;
ignoreLatency = YES;
if(visAudio && visAudioSize) {
bzero(visAudio, sizeof(float) * visAudioSize);
}
@ -99,7 +102,7 @@ static VisualizationController *_sharedController = nil;
- (void)postLatency:(double)latency {
self->latency = latency;
assert(latency < 45.0);
ignoreLatency = (latency >= 45.0) || (latency < 0.0);
}
- (double)readSampleRate {
@ -115,7 +118,7 @@ static VisualizationController *_sharedController = nil;
- (void)copyVisPCM:(float *_Nullable)outPCM visFFT:(float *_Nullable)outFFT latencyOffset:(double)latency {
if(!outPCM && !outFFT) return;
if(!visAudio || !visAudioSize) {
if(ignoreLatency || !visAudio || !visAudioSize) {
if(outPCM) bzero(outPCM, sizeof(float) * 4096);
if(outFFT) bzero(outFFT, sizeof(float) * 2048);
return;

View file

@ -374,8 +374,10 @@ static void *playlistControllerContext = &playlistControllerContext;
ldiv_t weeksAndDays;
for(PlaylistEntry *pe in [self arrangedObjects]) {
if(pe && !pe.deLeted && pe.length) {
if(!isnan([pe.length doubleValue])) tt += [pe.length doubleValue];
}
}
long sec = (long)(tt);
hoursAndMinutes = ldiv(sec / 60, 60);