Compare commits
3 commits
6211ff6ef4
...
471fc2f725
Author | SHA1 | Date | |
---|---|---|---|
|
471fc2f725 | ||
|
f549465a4f | ||
|
6b047c0acf |
3 changed files with 8 additions and 10 deletions
|
@ -247,14 +247,11 @@ static BOOL consentLastEnabled = NO;
|
|||
|
||||
if(results && [results count] > 0) {
|
||||
PlaylistEntry *pe = results[0];
|
||||
// Select this track
|
||||
[playlistView selectRowIndexes:[NSIndexSet indexSetWithIndex:pe.index] byExtendingSelection:NO];
|
||||
if([[NSUserDefaults standardUserDefaults] boolForKey:@"resumePlaybackOnStartup"]) {
|
||||
// And play it
|
||||
[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
|
||||
if([results count] > 1) {
|
||||
|
@ -262,6 +259,7 @@ static BOOL consentLastEnabled = NO;
|
|||
PlaylistEntry *pe = results[i];
|
||||
[pe setCurrent:NO];
|
||||
}
|
||||
[playlistController commitPersistentStore];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/getsentry/sentry-cocoa.git",
|
||||
"state" : {
|
||||
"revision" : "56fb914f14922efeda6c744c0125696552b6d2b5",
|
||||
"version" : "8.53.1"
|
||||
"revision" : "ca92efeb24b10052cd2a79e5205f42c5a16770ec",
|
||||
"version" : "8.53.2"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
|
@ -104,7 +104,7 @@ namespace Organya {
|
|||
auto& c = carrier, &f = frequency, &a = amplitude;
|
||||
double mainpos = c.offset, maindelta = 256*c.pitch/nsamples;
|
||||
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:
|
||||
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;
|
||||
|
@ -121,7 +121,7 @@ namespace Organya {
|
|||
void Load(FILE* fp) { // Load PXT file from disk and initialize synthesizer.
|
||||
/* C++11 simplifies things by a great deal. */
|
||||
/* 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)
|
||||
c = { f() != 0, f(), // enabled, length
|
||||
{ Waveforms[f()%6], fgetv(fp), f(), f() }, // carrier wave
|
||||
|
|
Loading…
Reference in a new issue