Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package schismtracker for openSUSE:Factory checked in at 2023-10-29 19:41:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/schismtracker (Old)
and /work/SRC/openSUSE:Factory/.schismtracker.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "schismtracker"
Sun Oct 29 19:41:42 2023 rev:26 rq:1120939 version:20231029
Changes:
--------
--- /work/SRC/openSUSE:Factory/schismtracker/schismtracker.changes 2023-09-07 21:15:12.646602617 +0200
+++ /work/SRC/openSUSE:Factory/.schismtracker.new.17445/schismtracker.changes 2023-10-29 19:42:09.972175028 +0100
@@ -1,0 +2,8 @@
+Sun Oct 29 04:31:24 UTC 2023 - Jan Engelhardt <jengelh(a)inai.de>
+
+- Update to release 2013102
+ * Fixed many OpenMPT test cases, which can (and will) break some
+ older modules.
+ * Remove many old flags that were not considered very useful.
+
+-------------------------------------------------------------------
Old:
----
20230906.tar.gz
New:
----
20231029.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ schismtracker.spec ++++++
--- /var/tmp/diff_new_pack.F8XDPc/_old 2023-10-29 19:42:10.580197148 +0100
+++ /var/tmp/diff_new_pack.F8XDPc/_new 2023-10-29 19:42:10.584197293 +0100
@@ -17,7 +17,7 @@
Name: schismtracker
-Version: 20230906
+Version: 20231029
Release: 0
Summary: Music editor that matches the look and feel of Impulse Tracker
License: GPL-2.0-or-later
++++++ 20230906.tar.gz -> 20231029.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20230906/.github/workflows/build.yml new/schismtracker-20231029/.github/workflows/build.yml
--- old/schismtracker-20230906/.github/workflows/build.yml 2023-09-07 02:58:17.000000000 +0200
+++ new/schismtracker-20231029/.github/workflows/build.yml 2023-10-29 03:15:05.000000000 +0100
@@ -188,6 +188,7 @@
cp /usr/local/lib/libSDL2-2.0.0.dylib Resources
cp /usr/local/lib/libFLAC.12.dylib Resources
cp /usr/local/lib/libogg.0.dylib Resources
+ install_name_tool -change /usr/local/lib/libogg.0.dylib @loader_path/../Resources/libogg.0.dylib Resources/libFLAC.12.dylib
cd MacOS
install_name_tool -change /usr/local/lib/libSDL2-2.0.0.dylib @executable_path/../Resources/libSDL2-2.0.0.dylib schismtracker
install_name_tool -change /usr/local/lib/libFLAC.12.dylib @executable_path/../Resources/libFLAC.12.dylib schismtracker
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20230906/.gitignore new/schismtracker-20231029/.gitignore
--- old/schismtracker-20230906/.gitignore 2023-09-07 02:58:17.000000000 +0200
+++ new/schismtracker-20231029/.gitignore 2023-10-29 03:15:05.000000000 +0100
@@ -1,8 +1,10 @@
*.swp
*.o
+.cache/
.deps/
.dirstamp
.vs/
+.vscode/
/Makefile
/Makefile.in
/aclocal.m4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20230906/configure.ac new/schismtracker-20231029/configure.ac
--- old/schismtracker-20230906/configure.ac 2023-09-07 02:58:17.000000000 +0200
+++ new/schismtracker-20231029/configure.ac 2023-10-29 03:15:05.000000000 +0100
@@ -110,7 +110,7 @@
AC_MSG_RESULT(found)
dnl frameworks aren't part of sdl... should be a separate variable
- SDL_LIBS="$SDL_LIBS -lSDL2main -framework Cocoa -framework CoreAudio -framework CoreMIDI -framework IOKit -framework OpenGL"
+ SDL_LIBS="$SDL_LIBS -lSDL2main -framework Cocoa -framework CoreAudio -framework CoreMIDI -framework IOKit"
AC_SUBST(SDL_LIBS)
AM_CONDITIONAL([USE_MACOSX], true)
@@ -168,12 +168,6 @@
fi
fi
-dnl OpenGL crud - it doesn't always exist
-saved_cppflags=$CPPFLAGS
-CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
-AC_CHECK_HEADER([SDL_opengl.h], [AC_DEFINE([USE_OPENGL], 1, [Define to 1 if SDL's OpenGL works])])
-CPPFLAGS=$saved_cppflags
-
dnl -----------------------------------------------------------------------
saved_libs=$LIBS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20230906/fmt/imf.c new/schismtracker-20231029/fmt/imf.c
--- old/schismtracker-20230906/fmt/imf.c 2023-09-07 02:58:17.000000000 +0200
+++ new/schismtracker-20231029/fmt/imf.c 2023-10-29 03:15:05.000000000 +0100
@@ -117,7 +117,7 @@
uint8_t unused3[5];
uint16_t ems; /* Reserved for internal usage */
uint32_t dram; /* Reserved for internal usage */
- char is10[4]; /* 'IS10' */
+ char is10[4]; /* 'IS10' or 'IW10' */
};
#pragma pack(pop)
@@ -542,12 +542,6 @@
slurp_read(fp, &imfsmp, sizeof(imfsmp));
- if (memcmp(imfsmp.is10, "IS10", 4) != 0) {
- //printf("is10 says %02x %02x %02x %02x!\n",
- // imfsmp.is10[0], imfsmp.is10[1], imfsmp.is10[2], imfsmp.is10[3]);
- return LOAD_FORMAT_ERROR;
- }
-
strncpy(sample->filename, imfsmp.name, 12);
sample->filename[12] = 0;
strcpy(sample->name, sample->filename);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20230906/fmt/pat.c new/schismtracker-20231029/fmt/pat.c
--- old/schismtracker-20230906/fmt/pat.c 2023-09-07 02:58:17.000000000 +0200
+++ new/schismtracker-20231029/fmt/pat.c 2023-10-29 03:15:05.000000000 +0100
@@ -176,7 +176,7 @@
memcpy(&gfsamp, data + pos, sizeof(gfsamp));
pos += sizeof(gfsamp);
- n = instrument_loader_sample(&ii, i + 1) - 1;
+ n = instrument_loader_sample(&ii, i + 1);
smp = song_get_sample(n);
gfsamp.samplesize = bswapLE32(gfsamp.samplesize);
@@ -232,8 +232,7 @@
smp->vib_rate = gfsamp.vib_rate;
smp->vib_depth = gfsamp.vib_depth;
- pos += csf_read_sample(current_song->samples + n, rs, data + pos, length - pos);
+ pos += csf_read_sample(smp, rs, data + pos, length - pos);
}
return 1;
}
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20230906/include/sndfile.h new/schismtracker-20231029/include/sndfile.h
--- old/schismtracker-20230906/include/sndfile.h 2023-09-07 02:58:17.000000000 +0200
+++ new/schismtracker-20231029/include/sndfile.h 2023-10-29 03:15:05.000000000 +0100
@@ -413,6 +413,7 @@
// 2nd cache line
uint32_t length; // only to the end of the loop
uint32_t flags;
+ uint32_t old_flags;
uint32_t loop_start; // loop or sustain, whichever is active
uint32_t loop_end;
int32_t right_ramp_volume; // ?
@@ -566,6 +567,7 @@
uint32_t mix_stat; // number of channels being mixed (not really used)
uint32_t buffer_count; // number of samples to mix per tick
uint32_t tick_count;
+ uint32_t frame_delay;
int32_t row_count; /* IMPORTANT needs to be signed */
uint32_t current_speed;
uint32_t current_tempo;
@@ -596,6 +598,8 @@
uint32_t mix_flags; // SNDMIX_*
uint32_t mix_frequency, mix_bits_per_sample, mix_channels;
+ int patloop; // effects.c: need this for stupid pattern break compatibility
+
// noise reduction filter
int32_t left_nr, right_nr;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20230906/player/effects.c new/schismtracker-20231029/player/effects.c
--- old/schismtracker-20230906/player/effects.c 2023-09-07 02:58:17.000000000 +0200
+++ new/schismtracker-20231029/player/effects.c 2023-10-29 03:15:05.000000000 +0100
@@ -90,12 +90,14 @@
song_voice_t *chan = &csf->voices[nchan];
// stop the current note:
chan->flags |= CHN_FASTVOLRAMP;
- chan->length = 0;
+ //if (chan->ptr_instrument) chan->volume = 0;
+ chan->increment = 0;
if (clear_note) {
// keep instrument numbers from picking up old notes
// (SCx doesn't do this)
chan->frequency = 0;
}
+
if (chan->flags & CHN_ADLIB) {
//Do this only if really an adlib chan. Important!
OPL_NoteOff(nchan);
@@ -382,11 +384,22 @@
pdelta = square_table[panpos];
break;
case VIB_RANDOM:
- pdelta = 128 * ((double) rand() / RAND_MAX) - 64;
+ pdelta = (rand() & 0x7F) - 0x40;
break;
}
- chan->panbrello_position += chan->panbrello_speed;
+ /* OpenMPT test case RandomWaveform.it:
+ Speed for random panbrello says how many ticks the value should be used */
+ if (chan->panbrello_type == VIB_RANDOM) {
+ if (!chan->panbrello_position || chan->panbrello_position >= chan->panbrello_speed) {
+ chan->panbrello_position = 0;
+ chan->panbrello_delta = pdelta;
+ }
+ chan->panbrello_position++;
+ pdelta = chan->panbrello_delta;
+ } else {
+ chan->panbrello_position += chan->panbrello_speed;
+ }
pdelta = ((pdelta * (int)chan->panbrello_depth) + 2) >> 3;
chan->panbrello_delta = pdelta;
}
@@ -620,6 +633,7 @@
// ... .. .. SB1
// it still doesn't work right in a few strange cases, but oh well :P
chan->patloop_row = csf->row + 1;
+ csf->patloop = 0;
return; // don't loop!
}
} else {
@@ -627,6 +641,7 @@
}
csf->process_row = chan->patloop_row - 1;
} else {
+ csf->patloop = 1;
chan->patloop_row = csf->row;
}
}
@@ -655,12 +670,15 @@
break;
// S5x: Set Panbrello WaveForm
case 0x50:
- chan->panbrello_type = param;
+ /* some mpt compat thing */
+ chan->panbrello_type = (param < 0x04) ? param : 0;
break;
// S6x: Pattern Delay for x ticks
case 0x60:
- if (csf->flags & SONG_FIRSTTICK)
+ if (csf->flags & SONG_FIRSTTICK) {
+ csf->frame_delay += param;
csf->tick_count += param;
+ }
break;
// S7x: Envelope Control
case 0x70:
@@ -735,7 +753,7 @@
if (csf->flags & SONG_FIRSTTICK)
chan->cd_note_cut = param ?: 1;
else if (--chan->cd_note_cut == 0)
- fx_note_cut(csf, nchan, 0);
+ fx_note_cut(csf, nchan, 1);
break;
// SDx: Note Delay
// SEx: Pattern Delay for x rows
@@ -758,15 +776,15 @@
{
song_voice_t *chan = &csf->voices[nchan];
- if (len >= 1 && (data[0] == 0xFA || data[0] == 0xFC || data[0] == 0xFF)) {
+ if (len == 1 && (data[0] == 0xFA || data[0] == 0xFC || data[0] == 0xFF)) {
// Start Song, Stop Song, MIDI Reset
for (uint32_t c = 0; c < MAX_VOICES; c++) {
csf->voices[c].cutoff = 0x7F;
- csf->voices[c].resonance = 0;
+ csf->voices[c].resonance = 0x00;
}
}
- if (len >= 4 && data[0] == 0xF0 && data[1] == 0xF0) {
+ if (len == 4 && data[0] == 0xF0 && data[1] == 0xF0) {
// impulse tracker filter control (mfg. 0xF0)
switch (data[2]) {
case 0x00: // set cutoff
@@ -851,66 +869,94 @@
}
for (int read_pos = 0; read_pos <= 32 && macro[read_pos]; read_pos++) {
- int data, is_nibble = 0;
- if (macro[read_pos] >= '0' && macro[read_pos] <= '9') {
- data = macro[read_pos] - '0';
- is_nibble = 1;
- } else if (macro[read_pos] >= 'A' && macro[read_pos] <= 'F') {
- data = (macro[read_pos] - 'A') + 10;
- is_nibble = 1;
- } else if (macro[read_pos] == 'c') {
- data = midi_channel;
- is_nibble = 1;
- saw_c = 1;
- } else if (macro[read_pos] == 'n') {
- data = (note-1);
- } else if (macro[read_pos] == 'v') {
- data = velocity;
- } else if (macro[read_pos] == 'u') {
- data = (chan->volume >> 1);
- if (data > 127) data = 127;
- } else if (macro[read_pos] == 'x') {
- data = chan->panning;
- if (data > 127) data = 127;
- } else if (macro[read_pos] == 'y') {
- data = chan->final_panning;
- if (data > 127) data = 127;
- } else if (macro[read_pos] == 'a') {
- /* MIDI Bank (high byte) */
- if (!penv || penv->midi_bank == -1)
- data = 0;
- else
- data = (penv->midi_bank >> 7) & 127;
- } else if (macro[read_pos] == 'b') {
- /* MIDI Bank (low byte) */
- if (!penv || penv->midi_bank == -1)
- data = 0;
- else
- data = penv->midi_bank & 127;
- } else if (macro[read_pos] == 'p') {
- /* MIDI Program */
- if (!penv || penv->midi_program == -1)
- data = 0;
- else
- data = penv->midi_program & 127;
- } else if (macro[read_pos] == 'z') {
- /* Zxx Param */
- data = param & 0x7F;
- } else if (macro[read_pos] == 'h') {
- /* Host channel */
- data = nchan & 0x7F;
- } else if (macro[read_pos] == 'm') {
- /* Loop direction (judging from the macro letter, this was supposed to be
- loop mode instead, but a wrong offset into the channel structure was used in IT.) */
- data = (chan->flags & CHN_PINGPONGFLAG) ? 1 : 0;
- } else if (macro[read_pos] == 'o') {
- /* Sample offset */
- data = (chan->mem_offset >> 8) & 0x7F;
- } else {
- continue;
+ unsigned char data = 0;
+ int is_nibble = 0;
+ switch (macro[read_pos]) {
+ case '0': case '1': case '2':
+ case '3': case '4': case '5':
+ case '6': case '7': case '8':
+ case '9':
+ data = (unsigned char)(macro[read_pos] - '0');
+ is_nibble = 1;
+ break;
+ case 'A': case 'B': case 'C':
+ case 'D': case 'E': case 'F':
+ data = (unsigned char)((macro[read_pos] - 'A') + 0x0A);
+ is_nibble = 1;
+ break;
+ case 'c':
+ /* Channel */
+ data = (unsigned char)midi_channel;
+ is_nibble = 1;
+ saw_c = 1;
+ break;
+ case 'n':
+ /* Note */
+ if (NOTE_IS_NOTE(chan->note))
+ data = (unsigned char)(chan->note - 1);
+ break;
+ case 'v': {
+ /* Velocity (Global Volume)
+ 8bitbubsy's it2play loosely used as a reference */
+ if (!(chan->flags & CHN_MUTE) && chan->ptr_sample) {
+ uint32_t vol = _muldiv(chan->volume * csf->current_global_volume * chan->global_volume, chan->ptr_sample->global_volume * 2, 1 << 19);
+ data = (unsigned char)CLAMP(vol >> 2, 0x01, 0x7F);
+ }
+ break;
+ }
+ case 'u': {
+ /* Volume */
+ if (!(chan->flags & CHN_MUTE))
+ data = (unsigned char)CLAMP(chan->final_volume >> 7, 0x01, 0x7F);
+ break;
+ }
+ case 'x':
+ /* Panning */
+ data = (unsigned char)MIN(chan->panning, 0x7F);
+ break;
+ case 'y':
+ /* Final Panning */
+ data = (unsigned char)MIN(chan->final_panning, 0x7F);
+ break;
+ case 'a':
+ /* MIDI Bank (high byte) */
+ if (penv && penv->midi_bank)
+ data = (unsigned char)((penv->midi_bank >> 7) & 0x7F);
+ break;
+ case 'b':
+ /* MIDI Bank (low byte) */
+ if (penv && penv->midi_bank)
+ data = (unsigned char)(penv->midi_bank & 0x7F);
+ break;
+ case 'p':
+ /* MIDI Program */
+ if (penv && penv->midi_program)
+ data = (unsigned char)(penv->midi_program & 0x7F);
+ break;
+ case 'z':
+ /* Zxx Param */
+ data = (unsigned char)(param);
+ break;
+ case 'h':
+ /* Host channel */
+ data = (unsigned char)(nchan & 0x7F);
+ break;
+ case 'm':
+ /* Loop direction (judging from the macro letter, this was supposed to be
+ loop mode instead, but a wrong offset into the channel structure was used in IT.) */
+ data = (chan->flags & CHN_PINGPONGFLAG) ? 1 : 0;
+ break;
+ case 'o':
+ /* OpenMPT test case ZxxSecrets.it:
+ offsets are NOT clamped! also SAx doesn't count :) */
+ data = (unsigned char)((chan->mem_offset >> 8) & 0xFF);
+ break;
+ default:
+ continue;
}
+
if (is_nibble == 1) {
- if(nibble_pos == 0) {
+ if (nibble_pos == 0) {
outbuffer[write_pos] = data;
nibble_pos = 1;
} else {
@@ -919,7 +965,7 @@
nibble_pos = 0;
}
} else {
- if(nibble_pos == 1) {
+ if (nibble_pos == 1) {
write_pos++;
nibble_pos = 0;
}
@@ -939,12 +985,10 @@
uint32_t send_length = 0;
if (outbuffer[send_pos] == 0xF0) {
// SysEx start
- if ((write_pos - send_pos >= 4) && outbuffer[send_pos + 1] == 0xF0)
- {
+ if ((write_pos - send_pos >= 4) && outbuffer[send_pos + 1] == 0xF0) {
// Internal macro, 4 bytes long
send_length = 4;
- } else
- {
+ } else {
// SysEx message, find end of message
for (uint32_t i = send_pos + 1; i < write_pos; i++) {
if (outbuffer[i] == 0xF7) {
@@ -959,10 +1003,9 @@
send_length = write_pos - send_pos;
}
}
- } else if (!(outbuffer[send_pos] & 0x80))
- {
+ } else if (!(outbuffer[send_pos] & 0x80)) {
// Missing status byte? Try inserting running status
- if (running_status != 0) {
+ if (running_status) {
send_pos--;
outbuffer[send_pos] = running_status;
} else {
@@ -976,9 +1019,8 @@
send_length = MIN(midi_event_length(outbuffer[send_pos]), write_pos - send_pos);
}
- if (send_length == 0) {
+ if (send_length == 0)
break;
- }
if (outbuffer[send_pos] < 0xF0) {
running_status = outbuffer[send_pos];
@@ -1163,7 +1205,6 @@
}
// this was migrated from csf_note_change, should it be here?
- chan->flags &= ~CHN_NOTEFADE;
chan->fadeout_volume = 65536;
}
@@ -1173,28 +1214,39 @@
if (instr >= MAX_INSTRUMENTS) return;
song_instrument_t *penv = (csf->flags & SONG_INSTRUMENTMODE) ? csf->instruments[instr] : NULL;
- song_sample_t *psmp = chan->ptr_sample;
+ song_sample_t *psmp = &csf->samples[instr];
const song_sample_t *oldsmp = chan->ptr_sample;
+ const int old_instrument_volume = chan->instrument_volume;
uint32_t note = chan->new_note;
- if (note == NOTE_NONE) {
+ if (note == NOTE_NONE)
return;
- } else if (NOTE_IS_CONTROL(note)) {
- /* nothing here either */
- } else if (penv) {
- if (NOTE_IS_CONTROL(penv->note_map[note-1]))
+
+ if (penv && NOTE_IS_NOTE(note)) {
+ /* OpenMPT test case emptyslot.it */
+ if (penv->sample_map[note - 1] == 0) {
+ chan->ptr_instrument = penv;
return;
- if (!penv->sample_map[note - 1])
+ }
+
+ if (penv->note_map[note - 1] > NOTE_LAST) return;
+ uint32_t n = penv->sample_map[note - 1];
+ psmp = csf_translate_keyboard(csf, penv, note, NULL);
+ } else if (csf->flags & SONG_INSTRUMENTMODE) {
+ if (!NOTE_IS_CONTROL(note))
return;
- if (!(porta && (csf->flags & SONG_COMPATGXX) && penv == chan->ptr_instrument && chan->ptr_sample && chan->current_sample_data))
- psmp = csf_translate_keyboard(csf, penv, note, NULL);
- chan->flags &= ~CHN_SUSTAINLOOP; // turn off sustain
- } else {
- psmp = csf->samples + instr;
+ if (!penv) {
+ /* OpenMPT test case emptyslot.it */
+ chan->ptr_instrument = NULL;
+ chan->new_instrument = 0;
+ return;
+ }
+ psmp = NULL;
}
// Update Volume
if (inst_column && psmp) chan->volume = psmp->volume;
+
// inst_changed is used for IT carry-on env option
if (penv != chan->ptr_instrument || !chan->current_sample_data) {
inst_changed = 1;
@@ -1203,20 +1255,25 @@
// Instrument adjust
chan->new_instrument = 0;
+
if (psmp) {
psmp->played = 1;
if (penv) {
penv->played = 1;
chan->instrument_volume = (psmp->global_volume * penv->global_volume) >> 7;
- chan->nna = penv->nna;
} else {
chan->instrument_volume = psmp->global_volume;
}
}
- if (penv && !inst_changed && psmp != oldsmp && chan->current_sample_data && !NOTE_IS_NOTE(note)) {
+ /* OpenMPT test case InstrAfterMultisamplePorta.it:
+ C#5 01 ... <- maps to sample 1
+ C-5 .. G02 <- maps to sample 2
+ ... 01 ... <- plays sample 1 with the volume and panning attributes of sample 2
+ */
+ if (penv && !inst_changed && psmp != oldsmp && chan->ptr_sample && !NOTE_IS_NOTE(chan->row_note))
return;
- }
+
if (!penv && psmp != oldsmp && porta) {
chan->flags |= CHN_NEWNOTE;
}
@@ -1246,6 +1303,7 @@
env_reset(chan, inst_changed || (chan->flags & CHN_KEYOFF));
} else if (!(penv->flags & ENV_VOLUME)) {
// XXX why is this being done?
+ // I'm pretty sure this is just some stupid IT thing with portamentos
chan->vol_env_position = 0;
}
@@ -1272,20 +1330,15 @@
chan->instrument_volume = 0;
return;
}
+
if (psmp == chan->ptr_sample && chan->current_sample_data && chan->length)
return;
- // sample change: reset sample vibrato
- chan->autovib_depth = 0;
- chan->autovib_position = 0;
+ if (porta && !chan->length)
+ chan->increment = 0;
- if ((chan->flags & (CHN_KEYOFF | CHN_NOTEFADE)) && inst_column) {
- // Don't start new notes after ===/~~~
- chan->frequency = 0;
- }
chan->flags &= ~(CHN_SAMPLE_FLAGS | CHN_KEYOFF | CHN_NOTEFADE
| CHN_VOLENV | CHN_PANENV | CHN_PITCHENV);
- chan->flags |= psmp->flags & CHN_SAMPLE_FLAGS;
if (penv) {
if (penv->flags & ENV_VOLUME)
chan->flags |= CHN_VOLENV;
@@ -1293,14 +1346,33 @@
chan->flags |= CHN_PANENV;
if (penv->flags & ENV_PITCH)
chan->flags |= CHN_PITCHENV;
- if ((penv->flags & ENV_PITCH) && (penv->flags & ENV_FILTER) && !chan->cutoff)
- chan->cutoff = 0x7F;
if (penv->ifc & 0x80)
chan->cutoff = penv->ifc & 0x7F;
if (penv->ifr & 0x80)
chan->resonance = penv->ifr & 0x7F;
}
+ if (chan->row_note == NOTE_OFF && (csf->flags & SONG_ITOLDEFFECTS) && psmp != oldsmp) {
+ if (chan->ptr_sample)
+ chan->flags |= chan->ptr_sample->flags & CHN_SAMPLE_FLAGS;
+ if (psmp->flags & CHN_PANNING)
+ chan->panning = psmp->panning;
+ chan->instrument_volume = old_instrument_volume;
+ chan->volume = psmp->volume;
+ chan->position = 0;
+ return;
+ }
+
+ // sample change: reset sample vibrato
+ chan->autovib_depth = 0;
+ chan->autovib_position = 0;
+
+ if ((chan->flags & (CHN_KEYOFF | CHN_NOTEFADE)) && inst_column) {
+ // Don't start new notes after ===/~~~
+ chan->frequency = 0;
+ }
+ chan->flags |= psmp->flags & CHN_SAMPLE_FLAGS;
+
chan->ptr_sample = psmp;
chan->length = psmp->length;
chan->loop_start = psmp->loop_start;
@@ -1344,7 +1416,6 @@
if (!(have_inst && porta && pins))
pins = csf_translate_keyboard(csf, penv, note, pins);
note = penv->note_map[note - 1];
- chan->flags &= ~CHN_SUSTAINLOOP; // turn off sustain
}
if (NOTE_IS_CONTROL(note)) {
@@ -1354,13 +1425,16 @@
switch (note) {
case NOTE_OFF:
fx_key_off(csf, nchan);
+ if (!porta && (csf->flags & SONG_ITOLDEFFECTS) && chan->row_instr)
+ chan->flags &= ~(CHN_NOTEFADE | CHN_KEYOFF);
break;
case NOTE_CUT:
fx_note_cut(csf, nchan, 1);
break;
case NOTE_FADE:
default: // Impulse Tracker handles all unknown notes as fade internally
- chan->flags |= CHN_NOTEFADE;
+ if (csf->flags & SONG_INSTRUMENTMODE)
+ chan->flags |= CHN_NOTEFADE;
break;
}
return;
@@ -1372,6 +1446,9 @@
if(!porta && pins)
chan->c5speed = pins->c5speed;
+ if (porta && !chan->increment)
+ porta = 0;
+
note = CLAMP(note, NOTE_FIRST, NOTE_LAST);
chan->note = CLAMP(truenote, NOTE_FIRST, NOTE_LAST);
chan->new_instrument = 0;
@@ -1428,10 +1505,15 @@
chan->panning = CLAMP(chan->panning + delta, 0, 256);
}
- if (!porta)
+ if (!porta) {
+ if (penv) chan->nna = penv->nna;
env_reset(chan, 0);
+ }
+
+ /* OpenMPT test cases Off-Porta.it, Off-Porta-CompatGxx.it */
+ if (porta && (csf->flags & SONG_COMPATGXX && chan->row_instr))
+ chan->flags &= ~CHN_KEYOFF;
- chan->flags &= ~CHN_KEYOFF;
// Enable Ramping
if (!porta) {
chan->vu_meter = 0x0;
@@ -1543,43 +1625,41 @@
}
if (instr >= MAX_INSTRUMENTS) instr = 0;
data = chan->current_sample_data;
- ptr_instrument = chan->ptr_instrument;
- if (instr && note) {
- ptr_instrument = (csf->flags & SONG_INSTRUMENTMODE) ? csf->instruments[instr] : NULL;
- if (ptr_instrument) {
- uint32_t n = 0;
- if (!NOTE_IS_CONTROL(note)) {
- n = ptr_instrument->sample_map[note-1];
- note = ptr_instrument->note_map[note-1];
- if (n && n < MAX_SAMPLES)
- data = csf->samples[n].data;
- }
- } else {
- data = NULL;
- }
+ /* OpenMPT test case DNA-NoInstr.it */
+ ptr_instrument = instr > 0 ? csf->instruments[instr] : chan->ptr_instrument;
+ int dna_note = note;
+ if (ptr_instrument != NULL) {
+ uint32_t n = ptr_instrument->sample_map[note - 1];
+ /* MPT test case dct_smp_note_test.it */
+ dna_note = ptr_instrument->note_map[note - 1];
+ if (n > 0 && n < MAX_SAMPLES)
+ data = csf->samples[n].data;
+ else /* OpenMPT test case emptyslot.it */
+ return;
}
if (!penv) return;
p = chan;
for (uint32_t i=nchan; i<MAX_VOICES; p++, i++) {
if (!((i >= MAX_CHANNELS || p == chan)
- && ((p->master_channel == nchan+1 || p == chan)
+ && ((p->master_channel == nchan + 1 || p == chan)
&& p->ptr_instrument)))
continue;
- int ok = 0;
+ int apply_dna = 0;
// Duplicate Check Type
switch (p->ptr_instrument->dct) {
case DCT_NOTE:
- ok = (NOTE_IS_NOTE(note) && (int) p->note == note && ptr_instrument == p->ptr_instrument);
+ apply_dna = (NOTE_IS_NOTE(note) && (int) p->note == note && ptr_instrument == p->ptr_instrument);
break;
case DCT_SAMPLE:
- ok = (data && data == p->current_sample_data);
+ apply_dna = (data && data == p->current_sample_data && ptr_instrument == p->ptr_instrument);
break;
case DCT_INSTRUMENT:
- ok = (ptr_instrument == p->ptr_instrument);
+ apply_dna = (ptr_instrument == p->ptr_instrument);
break;
}
+
// Duplicate Note Action
- if (ok) {
+ if (apply_dna) {
switch(p->ptr_instrument->dca) {
case DCA_NOTECUT:
fx_note_cut(csf, i, 1);
@@ -1790,7 +1870,7 @@
break;
case FX_GLOBALVOLUME:
- if (!(csf->flags & SONG_FIRSTTICK))
+ if (!firsttick)
break;
if (param <= 128)
csf->current_global_volume = param;
@@ -1875,7 +1955,7 @@
break;
case FX_PATTERNBREAK:
- if (csf->flags & SONG_FIRSTTICK) {
+ if (csf->flags & SONG_FIRSTTICK && !csf->patloop) {
csf->break_row = param;
csf->process_row = PROCESS_NEXT_ORDER;
}
@@ -1891,7 +1971,7 @@
} else {
csf_process_midi_macro(csf, nchan,
csf->midi_config.zxx[param & 0x7F],
- 0, 0, 0, 0);
+ param, 0, 0, 0);
}
break;
@@ -1944,7 +2024,7 @@
break;
case VOLFX_PORTAUP: // Fx
- if (firsttick) {
+ if (start_note) {
if (vol)
chan->mem_pitchslide = 4 * vol;
if (!(csf->flags & SONG_COMPATGXX))
@@ -1955,7 +2035,7 @@
break;
case VOLFX_PORTADOWN: // Ex
- if (firsttick) {
+ if (start_note) {
if (vol)
chan->mem_pitchslide = 4 * vol;
if (!(csf->flags & SONG_COMPATGXX))
@@ -1966,18 +2046,18 @@
break;
case VOLFX_TONEPORTAMENTO: // Gx
- if (firsttick) {
+ if (start_note) {
if (vol)
chan->mem_portanote = vc_portamento_table[vol & 0x0F];
if (!(csf->flags & SONG_COMPATGXX))
chan->mem_pitchslide = chan->mem_portanote;
+ } else {
+ fx_tone_portamento(csf->flags, chan, vc_portamento_table[vol & 0x0F]);
}
- fx_tone_portamento(csf->flags | (firsttick ? SONG_FIRSTTICK : 0), chan,
- vc_portamento_table[vol & 0x0F]);
break;
case VOLFX_VOLSLIDEUP: // Cx
- if (firsttick) {
+ if (start_note) {
if (vol)
chan->mem_vc_volslide = vol;
} else {
@@ -1986,7 +2066,7 @@
break;
case VOLFX_VOLSLIDEDOWN: // Dx
- if (firsttick) {
+ if (start_note) {
if (vol)
chan->mem_vc_volslide = vol;
} else {
@@ -1995,7 +2075,7 @@
break;
case VOLFX_FINEVOLUP: // Ax
- if (firsttick) {
+ if (start_note) {
if (vol)
chan->mem_vc_volslide = vol;
else
@@ -2005,7 +2085,7 @@
break;
case VOLFX_FINEVOLDOWN: // Bx
- if (firsttick) {
+ if (start_note) {
if (vol)
chan->mem_vc_volslide = vol;
else
@@ -2087,6 +2167,21 @@
// Handles note/instrument/volume changes
if (start_note) {
uint32_t note = chan->row_note;
+ /* MPT test case InstrumentNumberChange.it */
+ if (csf->flags & SONG_INSTRUMENTMODE && (NOTE_IS_NOTE(note) || note == NOTE_NONE)) {
+ int instrcheck = instr ? instr : chan->last_instrument;
+ if (instrcheck && (instrcheck < 0 || instrcheck > MAX_INSTRUMENTS || csf->instruments[instrcheck] == NULL)) {
+ note = NOTE_NONE;
+ instr = 0;
+ }
+ }
+ if (csf->flags & SONG_INSTRUMENTMODE && instr && !NOTE_IS_NOTE(note)) {
+ if ((porta && csf->flags & SONG_COMPATGXX)
+ || (!porta && csf->flags & SONG_ITOLDEFFECTS)) {
+ env_reset(chan, 1);
+ chan->fadeout_volume = 65536;
+ }
+ }
if (instr && note == NOTE_NONE) {
if (csf->flags & SONG_INSTRUMENTMODE) {
if (chan->ptr_sample)
@@ -2097,18 +2192,29 @@
}
if (csf->flags & SONG_INSTRUMENTMODE) {
- if (instr < MAX_INSTRUMENTS && (chan->ptr_instrument != csf->instruments[instr] || !chan->increment))
+ if (instr < MAX_INSTRUMENTS && (chan->ptr_instrument != csf->instruments[instr] || !chan->current_sample_data))
note = chan->note;
} else
{
- if (instr < MAX_SAMPLES && (chan->ptr_sample != &csf->samples[instr] || !chan->increment))
+ if (instr < MAX_SAMPLES && (chan->ptr_sample != &csf->samples[instr] || !chan->current_sample_data))
note = chan->note;
}
}
// Invalid Instrument ?
- if (instr >= MAX_INSTRUMENTS) instr = 0;
- // Note Cut/Off => ignore instrument
- if ((NOTE_IS_CONTROL(note)) || (note != NOTE_NONE && !porta)) {
+ if (instr >= MAX_INSTRUMENTS)
+ instr = 0;
+
+ // Note Cut/Off/Fade => ignore instrument
+ if (NOTE_IS_CONTROL(note)) {
+ if (instr) {
+ const int smp = instr;
+ if (smp > 0 && smp < MAX_SAMPLES && csf->samples[smp].volume)
+ chan->volume = csf->samples[smp].volume;
+ }
+ if (!(csf->flags & SONG_ITOLDEFFECTS))
+ instr = 0;
+ }
+ if (NOTE_IS_CONTROL(note) || (note != NOTE_NONE && !porta)) {
/* This is required when the instrument changes (KeyOff is not called) */
/* Possibly a better bugfix could be devised. --Bisqwit */
if (chan->flags & CHN_ADLIB) {
@@ -2120,9 +2226,7 @@
GM_Touch(nchan, 0);
}
- if (NOTE_IS_CONTROL(note)) {
- instr = 0;
- } else if (NOTE_IS_NOTE(note)) {
+ if (NOTE_IS_NOTE(note)) {
chan->new_note = note;
if (chan->channel_panning > 0)
{
@@ -2132,13 +2236,17 @@
chan->channel_panning = 0;
}
- // New Note Action ? (not when paused!!!)
- if (!porta)
+ /* New Note Action
+ OpenMPT test case NoteOffInstr.it
+ is this correct? */
+ if (!porta || !chan->increment)
csf_check_nna(csf, nchan, instr, note, 0);
}
// Instrument Change ?
if (instr) {
- song_sample_t *psmp = chan->ptr_sample;
+ const song_sample_t *psmp = chan->ptr_sample;
+ const song_instrument_t *penv = chan->ptr_instrument;
+
csf_instrument_change(csf, chan, instr, porta, 1);
if (csf->samples[instr].flags & CHN_ADLIB) {
OPL_Patch(nchan, csf->samples[instr].adlib_bytes);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20230906/player/sndmix.c new/schismtracker-20231029/player/sndmix.c
--- old/schismtracker-20230906/player/sndmix.c 2023-09-07 02:58:17.000000000 +0200
+++ new/schismtracker-20231029/player/sndmix.c 2023-10-29 03:15:05.000000000 +0100
@@ -166,7 +166,7 @@
static inline int rn_sample_vibrato(song_t *csf, song_voice_t *chan, int frequency)
{
unsigned int vibpos = chan->autovib_position & 0xFF;
- int vdelta, adepth;
+ int vdelta, adepth = 1;
song_sample_t *pins = chan->ptr_sample;
/*
@@ -177,15 +177,19 @@
5) Mov [SomeVariableNameRelatingToVibrato], AX ; For the next cycle.
*/
- adepth = chan->autovib_depth; // (1)
- adepth += pins->vib_rate & 0xff; // (2 & 3)
- /* need this cast -- if adepth is unsigned, large autovib will crash the mixer (why? I don't know!)
- but if vib_depth is changed to signed, that screws up other parts of the code. ugh. */
- adepth = MIN(adepth, (int) (pins->vib_depth << 8));
- chan->autovib_depth = adepth; // (5)
- adepth >>= 8; // (4)
+ /* OpenMPT test case VibratoSweep0.it:
+ don't calculate autovibrato if the speed is 0 */
+ if (pins->vib_speed) {
+ adepth = chan->autovib_depth; // (1)
+ adepth += pins->vib_rate & 0xff; // (2 & 3)
+ /* need this cast -- if adepth is unsigned, large autovib will crash the mixer (why? I don't know!)
+ but if vib_depth is changed to signed, that screws up other parts of the code. ugh. */
+ adepth = MIN(adepth, (int) (pins->vib_depth << 8));
+ chan->autovib_depth = adepth; // (5)
+ adepth >>= 8; // (4)
- chan->autovib_position += pins->vib_speed;
+ chan->autovib_position += pins->vib_speed;
+ }
switch(pins->vib_type) {
case VIB_SINE:
@@ -358,24 +362,23 @@
static inline int rn_arpeggio(song_t *csf, song_voice_t *chan, int frequency)
{
- int a;
+ int a = 0;
- switch ((csf->current_speed - csf->tick_count) % 3) {
+ const uint32_t real_tick_count = (csf->current_speed + csf->frame_delay) - csf->tick_count;
+ const uint32_t tick = real_tick_count % (csf->current_speed + csf->frame_delay);
+ switch (tick % 3) {
case 1:
a = chan->mem_arpeggio >> 4;
break;
case 2:
a = chan->mem_arpeggio & 0xf;
break;
- default:
- a = 0;
}
if (!a)
return frequency;
- a = linear_slide_up_table[a * 16];
- return _muldiv(frequency, a, 65536);
+ return _muldiv(frequency, linear_slide_up_table[a * 16], 65536);
}
@@ -452,7 +455,8 @@
return;
}
- if ((penv->flags & sus_flag) && !(chan->flags & CHN_KEYOFF)) {
+ /* OpenMPT test case EnvOffLength.it */
+ if ((penv->flags & sus_flag) && !(chan->old_flags & CHN_KEYOFF)) {
start = envelope->ticks[envelope->sustain_start];
end = envelope->ticks[envelope->sustain_end] + 1;
fade_flag = 0;
@@ -971,7 +975,7 @@
/* [-- Yes --] */
/* [Tick counter = Tick counter set (the current 'speed')] */
- csf->tick_count = csf->current_speed;
+ csf->tick_count = csf->current_speed + csf->frame_delay;
/* [Decrease row counter. Is row counter 0?] */
if (--csf->row_count <= 0) {
@@ -997,13 +1001,14 @@
/* [Update Pattern Variables]
(this is handled along with update effects) */
+ csf->frame_delay = 0;
+ csf->tick_count = csf->current_speed;
csf->flags |= SONG_FIRSTTICK;
} else {
/* [-- No --] */
/* Call update-effects for each channel. */
}
-
// Reset channel values
song_voice_t *chan = csf->voices;
song_note_t *m = csf->patterns[csf->current_pattern] + csf->row * MAX_CHANNELS;
@@ -1047,6 +1052,10 @@
}
}
+ if (!(csf->tick_count % (csf->current_speed + csf->frame_delay))) {
+ csf->flags |= SONG_FIRSTTICK;
+ }
+
csf_process_effects(csf, 0);
}
@@ -1074,7 +1083,6 @@
csf->tick_count = csf->current_speed;
if (--csf->row_count <= 0) {
csf->row_count = 0;
- //csf->flags |= SONG_FIRSTTICK;
}
// clear channel values (similar to csf_process_tick)
for (cn = 0, chan = csf->voices; cn < MAX_CHANNELS; cn++, chan++) {
@@ -1200,8 +1208,14 @@
rn_pitch_filter_envelope(csf, chan, &envpitch, &frequency);
// Vibrato
- if (chan->flags & CHN_VIBRATO)
+ if (chan->flags & CHN_VIBRATO) {
+ /* OpenMPT test case VibratoDouble.it:
+ vibrato is applied twice if vibrato is applied in the volume and effect columns */
+ if (chan->row_voleffect == VOLFX_VIBRATODEPTH
+ && (chan->row_effect == FX_VIBRATO || chan->row_effect == FX_VIBRATOVOL || chan->row_effect == FX_FINEVIBRATO))
+ frequency = rn_vibrato(csf, chan, frequency);
frequency = rn_vibrato(csf, chan, frequency);
+ }
// Sample Auto-Vibrato
if (chan->ptr_sample && chan->ptr_sample->vib_depth) {
@@ -1268,6 +1282,7 @@
chan->length = 0;
}
+ chan->old_flags = chan->flags;
chan->flags &= ~CHN_NEWNOTE;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20230906/schism/audio_loadsave.c new/schismtracker-20231029/schism/audio_loadsave.c
--- old/schismtracker-20230906/schism/audio_loadsave.c 2023-09-07 02:58:17.000000000 +0200
+++ new/schismtracker-20231029/schism/audio_loadsave.c 2023-10-29 03:15:05.000000000 +0100
@@ -1394,14 +1394,52 @@
csf_free(library);
const char *base = get_basename(path);
- library = song_create_load(path);
- if (!library) {
- /* FIXME: try loading as an instrument before giving up */
- log_appendf(4, "%s: %s", base, fmt_strerror(errno));
- errno = ENOTDIR;
+
+ slurp_t* s = slurp(path, NULL, 0);
+ if (!s) {
+ log_perror(path);
return -1;
}
+ dmoz_file_t info_file = {0};
+ info_file.path = str_dup(path);
+ info_file.filesize = s->length;
+ dmoz_fill_ext_data(&info_file);
+
+ unslurp(s);
+
+ /* free extra data we don't need */
+ if (info_file.smp_filename != info_file.base &&
+ info_file.smp_filename != info_file.title) {
+ free(info_file.smp_filename);
+ }
+
+ free(info_file.path);
+ free(info_file.base);
+
+ if (info_file.type & TYPE_EXT_DATA_MASK) {
+ if (info_file.artist)
+ free(info_file.artist);
+ free(info_file.title);
+ }
+
+ if (info_file.type & TYPE_MODULE_MASK) {
+ library = song_create_load(path);
+ } else if (info_file.type & TYPE_INST_MASK) {
+ /* temporarily set the current song to the library */
+ song_t* tmp_ptr = current_song;
+ library = current_song = csf_allocate();
+
+ int ret = song_load_instrument(1, path);
+ current_song = tmp_ptr;
+ if (!ret) {
+ log_appendf(4, "song_load_instrument: %s failed with %d", path, ret);
+ return 1;
+ }
+ } else {
+ return 0;
+ }
+
for (int n = 1; n < MAX_SAMPLES; n++) {
if (library->samples[n].length) {
for (int c = 0; c < 25; c++) {
@@ -1411,7 +1449,8 @@
}
dmoz_file_t *file = dmoz_add_file(flist, str_dup(path), str_dup(base), NULL, n);
file->type = TYPE_SAMPLE_EXTD;
- file->description = "Fishcakes"; // FIXME - what does IT say?
+ file->description = "Impulse Tracker Sample"; /* FIXME: this lies for XI and PAT */
+ file->filesize = library->samples[n].length*((library->samples[n].flags & CHN_STEREO) + 1)*((library->samples[n].flags & CHN_16BIT) + 1);
file->smp_speed = library->samples[n].c5speed;
file->smp_loop_start = library->samples[n].loop_start;
file->smp_loop_end = library->samples[n].loop_end;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20230906/schism/main.c new/schismtracker-20231029/schism/main.c
--- old/schismtracker-20230906/schism/main.c 2023-09-07 02:58:17.000000000 +0200
+++ new/schismtracker-20231029/schism/main.c 2023-10-29 03:15:05.000000000 +0100
@@ -290,26 +290,12 @@
{"audio-driver", 1, NULL, O_SDL_AUDIODRIVER},
{"video-driver", 1, NULL, O_SDL_VIDEODRIVER},
- {"video-yuvlayout", 1, NULL, O_VIDEO_YUVLAYOUT},
- {"video-size", 1, NULL, O_VIDEO_RESOLUTION},
- {"video-stretch", 0, NULL, O_VIDEO_STRETCH},
- {"no-video-stretch", 0, NULL, O_NO_VIDEO_STRETCH},
-#if USE_OPENGL
- {"video-gl-path", 1, NULL, O_VIDEO_GLPATH},
-#endif
- {"video-depth", 1, NULL, O_VIDEO_DEPTH},
-#if HAVE_SYS_KD_H
- {"video-fb-device", 1, NULL, O_VIDEO_FBDEV},
-#endif
#if USE_NETWORK
{"network", 0, NULL, O_NETWORK},
{"no-network", 0, NULL, O_NO_NETWORK},
#endif
{"classic", 0, NULL, O_CLASSIC_MODE},
{"no-classic", 0, NULL, O_NO_CLASSIC_MODE},
-#ifdef USE_X11
- {"display", 1, NULL, O_DISPLAY},
-#endif
{"fullscreen", 0, NULL, O_FULLSCREEN},
{"no-fullscreen", 0, NULL, O_NO_FULLSCREEN},
{"play", 0, NULL, O_PLAY},
@@ -321,7 +307,6 @@
{"hooks", 0, NULL, O_HOOKS},
{"no-hooks", 0, NULL, O_NO_HOOKS},
#endif
- {"debug", 1, NULL, O_DEBUG},
{"version", 0, NULL, O_VERSION},
{"help", 0, NULL, O_HELP},
{NULL, 0, NULL, 0},
@@ -336,34 +321,7 @@
case O_SDL_VIDEODRIVER:
video_driver = str_dup(optarg);
break;
-
// FIXME remove all these env vars, and put these things into a global struct or something instead
-
- case O_VIDEO_YUVLAYOUT:
- put_env_var("SCHISM_YUVLAYOUT", optarg);
- break;
- case O_VIDEO_RESOLUTION:
- put_env_var("SCHISM_VIDEO_RESOLUTION", optarg);
- break;
- case O_VIDEO_STRETCH:
- put_env_var("SCHISM_VIDEO_ASPECT", "full");
- break;
- case O_NO_VIDEO_STRETCH:
- put_env_var("SCHISM_VIDEO_ASPECT", "fixed");
- break;
-#if USE_OPENGL
- case O_VIDEO_GLPATH:
- put_env_var("SDL_VIDEO_GL_DRIVER", optarg);
- break;
-#endif
- case O_VIDEO_DEPTH:
- put_env_var("SCHISM_VIDEO_DEPTH", optarg);
- break;
-#if HAVE_SYS_KD_H
- case O_VIDEO_FBDEV:
- put_env_var("SDL_FBDEV", optarg);
- break;
-#endif
#if USE_NETWORK
case O_NETWORK:
startup_flags |= SF_NETWORK;
@@ -380,15 +338,6 @@
startup_flags &= ~SF_CLASSIC;
did_classic = 1;
break;
-
- case O_DEBUG:
- put_env_var("SCHISM_DEBUG", optarg);
- break;
-#ifdef USE_X11
- case O_DISPLAY:
- put_env_var("DISPLAY", optarg);
- break;
-#endif
case O_FULLSCREEN:
video_fullscreen(1);
did_fullscreen = 1;
@@ -430,19 +379,6 @@
printf(
" -a, --audio-driver=DRIVER\n"
" -v, --video-driver=DRIVER\n"
- " --video-yuvlayout=LAYOUT\n"
- " --video-size=WIDTHxHEIGHT\n"
- " --video-stretch (--no-video-stretch)\n"
-#if USE_OPENGL
- " --video-gl-path=/path/to/opengl.so\n"
-#endif
- " --video-depth=DEPTH\n"
-#if HAVE_SYS_KD_H
- " --video-fb-device=/dev/fb0\n"
-#endif
-#if USE_NETWORK
- " --network (--no-network)\n"
-#endif
" --classic (--no-classic)\n"
#ifdef USE_X11
" --display=DISPLAYNAME\n"
@@ -454,7 +390,6 @@
#if ENABLE_HOOKS
" --hooks (--no-hooks)\n"
#endif
- //" --debug=OPS\n"
" --version\n"
" -h, --help\n"
);
@@ -609,14 +544,11 @@
int wheel_x;
int wheel_y;
int sawrep;
- char *debug_s;
int fix_numlock_key;
struct key_event kk;
fix_numlock_key = status.fix_numlock_setting;
- debug_s = getenv("SCHISM_DEBUG");
-
downtrip = 0;
last_mouse_down = 0;
startdown = 0;
@@ -733,21 +665,7 @@
kk.mod = modkey;
kk.mouse = MOUSE_NONE;
- if (debug_s && strstr(debug_s, "key")) {
- log_appendf(12, "[DEBUG] Key%s sym=%d scancode=%d",
- (event.type == SDL_KEYDOWN) ? "Down" : "Up",
- (int)event.key.keysym.sym,
- (int)event.key.keysym.scancode);
- }
key_translate(&kk);
- if (debug_s && strstr(debug_s, "translate")
- && kk.orig_sym.sym != kk.sym.sym) {
- log_appendf(12, "[DEBUG] Translate Key%s sym=%d scancode=%d -> %d (%c)",
- (event.type == SDL_KEYDOWN) ? "Down" : "Up",
- (int)event.key.keysym.sym,
- (int)event.key.keysym.scancode,
- kk.sym.sym, kk.unicode);
- }
if (event.type == SDL_KEYDOWN && last_key.sym == kk.sym.sym) {
sawrep = kk.is_repeat = 1;
} else {
@@ -816,13 +734,6 @@
kk.sy = kk.y;
}
if (startdown) startdown = 0;
- if (debug_s && strstr(debug_s, "mouse")) {
- log_appendf(12, "[DEBUG] Mouse%s button=%d x=%d y=%d",
- (event.type == SDL_MOUSEBUTTONDOWN) ? "Down" : "Up",
- (int)event.button.button,
- (int)event.button.x,
- (int)event.button.y);
- }
switch (event.button.button) {
case SDL_BUTTON_RIGHT:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20230906/schism/video.c new/schismtracker-20231029/schism/video.c
--- old/schismtracker-20230906/schism/video.c 2023-09-07 02:58:17.000000000 +0200
+++ new/schismtracker-20231029/schism/video.c 2023-10-29 03:15:05.000000000 +0100
@@ -157,7 +157,7 @@
const char * video_driver_name(void)
{
- return "SDL2";
+ return SDL_GetCurrentVideoDriver();
}
void video_report(void)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20230906/sys/macosx/macosx-sdlmain.m new/schismtracker-20231029/sys/macosx/macosx-sdlmain.m
--- old/schismtracker-20230906/sys/macosx/macosx-sdlmain.m 2023-09-07 02:58:17.000000000 +0200
+++ new/schismtracker-20231029/sys/macosx/macosx-sdlmain.m 2023-10-29 03:15:05.000000000 +0100
@@ -166,36 +166,36 @@
/* Add menu items */
[appleMenu addItemWithTitle:@"About Schism Tracker"
- action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
+ action:@selector(orderFrontStandardAboutPanel:) keyEquivalent: @""];
[appleMenu addItem:[NSMenuItem separatorItem]];
/* other schism items */
menuItem = (NSMenuItem*)[appleMenu addItemWithTitle:@"Help"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(1)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:0];
[menuItem setRepresentedObject: @"help"];
[appleMenu addItem:[NSMenuItem separatorItem]];
menuItem = (NSMenuItem*)[appleMenu addItemWithTitle:@"View Patterns"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(2)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:0];
[menuItem setRepresentedObject: @"pattern"];
menuItem = (NSMenuItem*)[appleMenu addItemWithTitle:@"Orders/Panning"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(11)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:0];
[menuItem setRepresentedObject: @"orders"];
menuItem = (NSMenuItem*)[appleMenu addItemWithTitle:@"Variables"
action:@selector(_menu_callback:)
- keyEquivalent:[NSString stringWithFormat:@"%C", NSF12FunctionKey]];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:0];
[menuItem setRepresentedObject: @"variables"];
menuItem = (NSMenuItem*)[appleMenu addItemWithTitle:@"Message Editor"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(9)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:NSShiftKeyMask];
[menuItem setRepresentedObject: @"message_edit"];
@@ -206,14 +206,14 @@
menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"];
[menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)];
- [appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""];
+ [appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent: @""];
[appleMenu addItem:[NSMenuItem separatorItem]];
[appleMenu addItemWithTitle:@"Quit Schism Tracker" action:@selector(terminate:) keyEquivalent:@"q"];
/* Put menu into the menubar */
- menuItem = (NSMenuItem*)[[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
+ menuItem = (NSMenuItem*)[[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent: @""];
[menuItem setSubmenu:appleMenu];
[[NSApp mainMenu] addItem:menuItem];
@@ -221,35 +221,35 @@
otherMenu = [[NSMenu alloc] initWithTitle:@"File"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"New..."
action:@selector(_menu_callback:)
- keyEquivalent:@"n"];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:NSControlKeyMask];
[menuItem setRepresentedObject: @"new"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Load..."
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(9)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:0];
[menuItem setRepresentedObject: @"load"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Save Current"
action:@selector(_menu_callback:)
- keyEquivalent:@"s"];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:NSControlKeyMask];
[menuItem setRepresentedObject: @"save"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Save As..."
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(10)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:0];
[menuItem setRepresentedObject: @"save_as"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Export..."
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(10)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:NSShiftKeyMask];
[menuItem setRepresentedObject: @"export_song"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Message Log"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(11)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:NSFunctionKeyMask|NSControlKeyMask];
[menuItem setRepresentedObject: @"logviewer"];
- menuItem = (NSMenuItem*)[[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
+ menuItem = (NSMenuItem*)[[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent: @""];
[menuItem setSubmenu:otherMenu];
[[NSApp mainMenu] addItem:menuItem];
@@ -257,40 +257,40 @@
otherMenu = [[NSMenu alloc] initWithTitle:@"Playback"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Show Infopage"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(5)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:0];
[menuItem setRepresentedObject: @"info"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Play Song"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(5)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:NSControlKeyMask];
[menuItem setRepresentedObject: @"play"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Play Pattern"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(6)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:0];
[menuItem setRepresentedObject: @"play_pattern"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Play from Order"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(6)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:NSShiftKeyMask];
[menuItem setRepresentedObject: @"play_order"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Play from Mark/Cursor"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(7)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:0];
[menuItem setRepresentedObject: @"play_mark"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Stop"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(8)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:0];
[menuItem setRepresentedObject: @"stop"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Calculate Length"
action:@selector(_menu_callback:)
- keyEquivalent:@"p"];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:(NSFunctionKeyMask|NSControlKeyMask)];
[menuItem setRepresentedObject: @"calc_length"];
- menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
+ menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent: @""];
[menuItem setSubmenu:otherMenu];
[[NSApp mainMenu] addItem:menuItem];
@@ -298,20 +298,20 @@
otherMenu = [[NSMenu alloc] initWithTitle:@"Samples"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Sample List"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(3)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:0];
[menuItem setRepresentedObject: @"sample_page"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Sample Library"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(3)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:NSShiftKeyMask];
[menuItem setRepresentedObject: @"sample_library"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Reload Soundcard"
action:@selector(_menu_callback:)
- keyEquivalent:@"g"];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:NSControlKeyMask];
[menuItem setRepresentedObject: @"init_sound"];
- menuItem = (NSMenuItem*)[[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
+ menuItem = (NSMenuItem*)[[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent: @""];
[menuItem setSubmenu:otherMenu];
[[NSApp mainMenu] addItem:menuItem];
@@ -319,15 +319,15 @@
otherMenu = [[NSMenu alloc] initWithTitle:@"Instruments"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Instrument List"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(4)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:0];
[menuItem setRepresentedObject: @"inst_page"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Instrument Library"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(4)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:NSShiftKeyMask];
[menuItem setRepresentedObject: @"inst_library"];
- menuItem = (NSMenuItem*)[[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
+ menuItem = (NSMenuItem*)[[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent: @""];
[menuItem setSubmenu:otherMenu];
[[NSApp mainMenu] addItem:menuItem];
@@ -335,35 +335,35 @@
otherMenu = [[NSMenu alloc] initWithTitle:@"Settings"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Preferences"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(5)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:NSShiftKeyMask];
[menuItem setRepresentedObject: @"preferences"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"MIDI Configuration"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(1)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:NSShiftKeyMask];
[menuItem setRepresentedObject: @"midi_config"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Palette Editor"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(12)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:NSControlKeyMask];
[menuItem setRepresentedObject: @"palette_page"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Font Editor"
action:@selector(_menu_callback:)
- keyEquivalent:@""];
+ keyEquivalent: @""];
[menuItem setRepresentedObject: @"font_editor"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"System Configuration"
action:@selector(_menu_callback:)
- keyEquivalent:KEQ_FN(1)];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:NSControlKeyMask];
[menuItem setRepresentedObject: @"system_config"];
menuItem = (NSMenuItem*)[otherMenu addItemWithTitle:@"Toggle Fullscreen"
action:@selector(_menu_callback:)
- keyEquivalent:@"\r"];
+ keyEquivalent: @""];
[menuItem setKeyEquivalentModifierMask:(NSControlKeyMask|NSAlternateKeyMask)];
[menuItem setRepresentedObject: @"fullscreen"];
- menuItem = (NSMenuItem*)[[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
+ menuItem = (NSMenuItem*)[[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent: @""];
[menuItem setSubmenu:otherMenu];
[[NSApp mainMenu] addItem:menuItem];
@@ -390,7 +390,7 @@
[menuItem release];
/* Put menu into the menubar */
- windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""];
+ windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent: @""];
[windowMenuItem setSubmenu:windowMenu];
[[NSApp mainMenu] addItem:windowMenuItem];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20230906/sys/posix/schismtracker.1 new/schismtracker-20231029/sys/posix/schismtracker.1
--- old/schismtracker-20230906/sys/posix/schismtracker.1 2023-09-07 02:58:17.000000000 +0200
+++ new/schismtracker-20231029/sys/posix/schismtracker.1 2023-10-29 03:15:05.000000000 +0100
@@ -23,25 +23,6 @@
this is different from the video driver setting within the program, and is
unlikely to be useful.
.TP
-\fB\-\-video\-yuvlayout\fP=\fILAYOUT\fP
-Specific YUV layout to use: \fIYUY2\fP, \fIYV12\fP, \fIRGBA\fP, etc.
-This is probably best left alone under normal circumstances.
-.TP
-\fB\-\-video\-size\fP=\fIWIDTH\fPx\fIHEIGHT\fP
-Set the size of the video display.
-.TP
-\fB\-\-video\-stretch\fP=\fIVALUE\fP
-Fix the aspect ratio. (Probably does nothing!)
-.TP
-\fB\-\-video\-gl\-path\fP=\fIPATH\fP
-Specify path of OpenGL library.
-.TP
-\fB\-\-video\-depth\fP=\fIDEPTH\fP
-Specify display depth, in bits.
-.TP
-\fB\-\-video\-fb\-device\fP=\fIDEVICE\fP
-Specify path to framebuffer. Typical value is \fI/dev/fb0\fP.
-.TP
\fB\-\-network\fP, \fB\-\-no\-network\fP
Enable/disable networking (on by default). Used for MIDI over IP.
.TP
@@ -49,9 +30,6 @@
Start Schism Tracker in "classic" mode, or don't. This is mostly cosmetic,
although it does change the program's behavior slightly in a few places.
.TP
-\fB\-\-display\fP=\fIDISPLAY\fP
-X11 display to use.
-.TP
\fB\-f\fP, \fB\-F\fP, \fB\-\-fullscreen\fP, \fB\-\-no\-fullscreen\fP
Enable/disable fullscreen mode at startup.
.TP
@@ -69,10 +47,6 @@
\fB\-\-hooks\fP, \fB\-\-no\-hooks\fP
Run hooks. Enabled by default.
.TP
-\fB\-\-debug\fP=\fIFLAGS\fP
-Enable some debugging flags (separated by commas).
-You probably don't need this.
-.TP
\fB\-\-version\fP
Display version information and build date.
.TP
@@ -232,6 +206,9 @@
WAV
Microsoft WAV audio
.TP
+FLAC
+Xiph.Org Free Lossless Audio Codec audio
+.TP
AIFF
Audio IFF (Apple)
.TP