document -P option everywhere;

actually use the parameter's value instead of the default path
This commit is contained in:
Clemens Ladisch 2004-07-02 12:21:13 +00:00
parent 40e94c77dc
commit 9615f45528
2 changed files with 6 additions and 14 deletions

View file

@ -23,11 +23,12 @@ sound card. You need to load snd-synth-opl3 module.
Usage Usage
----- -----
loadsbi [-p client:port] [-l] [-v level] instfile drumfile loadsbi [-p client:port] [-4] [-l] [-P path] [-v level] instfile drumfile
-p, --port=client:port - An ALSA client and port number to use -p, --port=client:port - An ALSA client and port number to use
-4 --opl3 - Four operators (OPL3) file type -4 --opl3 - Four operators (OPL3) file type
-l, --list - List possible output ports -l, --list - List possible output ports
-P, --path=path - Specify the patch path
-v, --verbose=level - Verbose level -v, --verbose=level - Verbose level
Because you may have more than one sound card and each sound Because you may have more than one sound card and each sound

View file

@ -32,16 +32,6 @@
#include <sys/time.h> #include <sys/time.h>
#include <unistd.h> #include <unistd.h>
/*
* Load a SBI FM instrument patch
* sbiload [-p client:port] [-4] [-l] [-v level] instfile drumfile
*
* -p client:port - An ALSA client and port number to load instrument to
* -4 - four operators file type
* -l - List possible output ports that could be used
* -v level - Verbose level
*/
typedef struct sbi_header typedef struct sbi_header
{ {
char key[4]; char key[4];
@ -182,7 +172,7 @@ static void
show_usage () { show_usage () {
char **cpp; char **cpp;
static char *msg[] = { static char *msg[] = {
"Usage: sbiload [-p client:port] [-4] [-l] [-v level] instfile drumfile", "Usage: sbiload [-p client:port] [-4] [-l] [-P path] [-v level] instfile drumfile",
"", "",
" -p client:port - A alsa client and port number to send midi to", " -p client:port - A alsa client and port number to send midi to",
" -4 - four operators file type (default = two ops)", " -4 - four operators file type (default = two ops)",
@ -455,7 +445,7 @@ load_file (int bank, char *filename) {
fd = open (filename, O_RDONLY); fd = open (filename, O_RDONLY);
else { else {
char path[1024]; char path[1024];
snprintf(path, sizeof(path), "%s/%s", PATCHDIR, filename); snprintf(path, sizeof(path), "%s/%s", patchdir, filename);
fd = open (path, O_RDONLY); fd = open (path, O_RDONLY);
} }
@ -590,11 +580,12 @@ finish_client ()
/* /*
* Load a .SBI FM instrument patch * Load a .SBI FM instrument patch
* sbiload [-p client:port] [-l] [-v level] instfile drumfile * sbiload [-p client:port] [-l] [-P path] [-v level] instfile drumfile
* *
* -p, --port=client:port - An ALSA client and port number to use * -p, --port=client:port - An ALSA client and port number to use
* -4 --opl3 - four operators file type * -4 --opl3 - four operators file type
* -l, --list - List possible output ports that could be used * -l, --list - List possible output ports that could be used
* -P, --path=path - Specify the patch path
* -v, --verbose=level - Verbose level * -v, --verbose=level - Verbose level
*/ */
int int