Compare commits

...

3 commits

Author SHA1 Message Date
Christopher Snowhill
a14254bd2e Sentry: Update sentry-cocoa to version 8.53.2
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-07-12 04:25:17 -07:00
Christopher Snowhill
14dac74c54 Playback: Always remember last playing track
Select it on startup, and start playback at the last position if
configured to do so. Also, if there is a bug and multiple tracks are
marked for current, unmark them as usual, but also commit the changes.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-07-12 02:45:18 -07:00
Christopher Snowhill
ddf7438c6e Organya Decoder: Fix up some lambda functions
Change the variable capture of two lambda functions, in one case to
silence a warning about deprecation of capturing `this`.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-07-12 02:35:32 -07:00
3 changed files with 8 additions and 10 deletions

View file

@ -271,14 +271,11 @@ static BOOL consentLastEnabled = NO;
if(results && [results count] > 0) { if(results && [results count] > 0) {
PlaylistEntry *pe = results[0]; PlaylistEntry *pe = results[0];
// Select this track
[playlistView selectRowIndexes:[NSIndexSet indexSetWithIndex:pe.index] byExtendingSelection:NO];
if([[NSUserDefaults standardUserDefaults] boolForKey:@"resumePlaybackOnStartup"]) { if([[NSUserDefaults standardUserDefaults] boolForKey:@"resumePlaybackOnStartup"]) {
// And play it
[playbackController playEntryAtIndex:pe.index startPaused:(lastStatus == CogStatusPaused) andSeekTo:@(pe.currentPosition)]; [playbackController playEntryAtIndex:pe.index startPaused:(lastStatus == CogStatusPaused) andSeekTo:@(pe.currentPosition)];
} else {
pe.current = NO;
pe.stopAfter = NO;
pe.currentPosition = 0.0;
pe.countAdded = NO;
[playlistController commitPersistentStore];
} }
// Bug fix // Bug fix
if([results count] > 1) { if([results count] > 1) {
@ -286,6 +283,7 @@ static BOOL consentLastEnabled = NO;
PlaylistEntry *pe = results[i]; PlaylistEntry *pe = results[i];
[pe setCurrent:NO]; [pe setCurrent:NO];
} }
[playlistController commitPersistentStore];
} }
} }
} }

View file

@ -6,8 +6,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/getsentry/sentry-cocoa.git", "location" : "https://github.com/getsentry/sentry-cocoa.git",
"state" : { "state" : {
"revision" : "56fb914f14922efeda6c744c0125696552b6d2b5", "revision" : "ca92efeb24b10052cd2a79e5205f42c5a16770ec",
"version" : "8.53.1" "version" : "8.53.2"
} }
} }
], ],

View file

@ -104,7 +104,7 @@ namespace Organya {
auto& c = carrier, &f = frequency, &a = amplitude; auto& c = carrier, &f = frequency, &a = amplitude;
double mainpos = c.offset, maindelta = 256*c.pitch/nsamples; double mainpos = c.offset, maindelta = 256*c.pitch/nsamples;
for(size_t i=0; i<result.size(); ++i) { for(size_t i=0; i<result.size(); ++i) {
auto s = [=](double p=1) { return 256*p*i/nsamples; }; auto s = [this,i](double p=1) { return 256*p*i/nsamples; };
// Take sample from each of the three signal generators: // Take sample from each of the three signal generators:
int freqval = f.wave[0xFF & int(f.offset + s(f.pitch))] * f.level; int freqval = f.wave[0xFF & int(f.offset + s(f.pitch))] * f.level;
int ampval = a.wave[0xFF & int(a.offset + s(a.pitch))] * a.level; int ampval = a.wave[0xFF & int(a.offset + s(a.pitch))] * a.level;
@ -121,7 +121,7 @@ namespace Organya {
void Load(FILE* fp) { // Load PXT file from disk and initialize synthesizer. void Load(FILE* fp) { // Load PXT file from disk and initialize synthesizer.
/* C++11 simplifies things by a great deal. */ /* C++11 simplifies things by a great deal. */
/* This function would be a lot more complex without it. */ /* This function would be a lot more complex without it. */
auto f = [=](){ return (int) fgetv(fp); }; auto f = [fp](){ return (int) fgetv(fp); };
for(auto&c: channels) for(auto&c: channels)
c = { f() != 0, f(), // enabled, length c = { f() != 0, f(), // enabled, length
{ Waveforms[f()%6], fgetv(fp), f(), f() }, // carrier wave { Waveforms[f()%6], fgetv(fp), f(), f() }, // carrier wave