From 9c0646f404d5ff2cbda0e967ba5e0b59ff5de6ab Mon Sep 17 00:00:00 2001 From: zlago Date: Mon, 2 Sep 2024 11:54:08 +0200 Subject: docs --- README.md | 9 ++++++++ doc/mu-sdl.1 | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/mu123.1 | 53 ++++++++++++++++++++++++++++++++++++++++++++++ src/common/common.c | 4 ++-- 4 files changed, 125 insertions(+), 2 deletions(-) create mode 100644 README.md create mode 100644 doc/mu-sdl.1 create mode 100644 doc/mu123.1 diff --git a/README.md b/README.md new file mode 100644 index 0000000..b52d774 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# mu123 and mu-sdl + + + +play a song on loop + +## rationale + +i despise audio players that do not loop tracks correctly, since i always listen to a single song on loop diff --git a/doc/mu-sdl.1 b/doc/mu-sdl.1 new file mode 100644 index 0000000..4e8e6a9 --- /dev/null +++ b/doc/mu-sdl.1 @@ -0,0 +1,61 @@ +.Dd September 2, 2024 +.Dt mu-sdl 1 +.Os +.Sh NAME +.Nm mu-sdl +.Nd audio player that never stops meowing +.Sh SYNOPSIS +.Nm mu-sdl +.Op audio file +.Sh DESCRIPTION +.Nm +will play audio files you drag and drop onto its window + +currently supported formats: +.Bl -bullet +.It +s3xmodit +.It +midi +.El +.Sh ENVIRONMENT +SOUNDFONT + +soundfont to use for midi +.Sh FILES +/usr/share/sounds/sf2/default-GM.sf2 + +default soundfont +.Sh EXAMPLES +SOUNDFONT=gm.sf2 +.Nm +e1m1.mid + +will play +.Em e1m1.mid +on loop with the soundfont +.Em gm.sf2 + +you can then hit +.Em space +or +.Em escape +to pause and quit the program, respectively +.Sh SEE ALSO +.Xr mu123 1 +.Xr openmpt123 1 +.Xr out123 1 +.\" .Sh STANDARDS +.\" .Sh HISTORY +.Sh AUTHORS +.An sylvie +.\" .Sh CAVEATS +.Sh BUGS +loading midi files leaks ~15KB of memory each time + +i have no idea how to fix that + +.\" there is also a crash i couldnt reproduce .\" i think i fixed it + +.\" .Sh SECURITY CONSIDERATIONS +.\" Not used in OpenBSD. diff --git a/doc/mu123.1 b/doc/mu123.1 new file mode 100644 index 0000000..939467a --- /dev/null +++ b/doc/mu123.1 @@ -0,0 +1,53 @@ +.Dd September 2, 2024 +.Dt mu123 1 +.Os +.Sh NAME +.Nm mu123 +.Nd audio player that never stops meowing +.Sh SYNOPSIS +.Nm mu123 +.Ar audio file +.Sh DESCRIPTION +.Nm +will play the audio file you pass to it + +currently supported formats: +.Bl -bullet +.It +s3xmodit +.It +midi +.El +.Sh ENVIRONMENT +SOUNDFONT + +soundfont to use for midi +.Sh FILES +/usr/share/sounds/sf2/default-GM.sf2 + +default soundfont +.Sh EXAMPLES +SOUNDFONT=gm.sf2 +.Nm +e1m1.mid + +will play +.Em e1m1.mid +on loop with the soundfont +.Em gm.sf2 +.Sh SEE ALSO +.Xr mu-sdl 1 +.Xr openmpt123 1 +.Xr out123 1 +.\" .Sh STANDARDS +.\" .Sh HISTORY +.Sh AUTHORS +.An sylvie +.\" .Sh CAVEATS +.Sh BUGS +loading midi files leaks ~15KB of memory each time + +i have no idea how to fix that + +.\" .Sh SECURITY CONSIDERATIONS +.\" Not used in OpenBSD. diff --git a/src/common/common.c b/src/common/common.c index 508140d..3fb1c6a 100644 --- a/src/common/common.c +++ b/src/common/common.c @@ -8,9 +8,9 @@ int (*file_ext(char *file))(struct blob *, struct userdata *) { size_t len = strlen(file); #define ext(extension) memcmp(file + len - sizeof (extension) + 1, extension, sizeof (extension)) - if ((ext(".mptm") && ext(".mod") && ext(".xm") && ext(".s3m") && ext(".it")) == 0) { + if ((ext(".mptm") && ext(".mod") && ext(".MOD") && ext(".xm") && ext(".s3m") && ext(".it")) == 0) { return module_openmpt; - } else if ((ext(".mid") && ext(".midi")) == 0) { + } else if ((ext(".mid") && ext(".MID") && ext(".midi")) == 0) { return module_fluidsynth; } #undef ext -- cgit 1.4.1-2-gfad0