aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard <q@1bpm.net>2025-03-09 22:38:29 +0000
committerRichard <q@1bpm.net>2025-03-09 22:38:29 +0000
commit212bcc23589c06b4eff3cce510d7951210225b83 (patch)
tree92781a55d972209f264fec9667e7805c9dbca2d1
parente174c759182e11f85e221eff8684088eebd563a4 (diff)
downloadcsound-shout-212bcc23589c06b4eff3cce510d7951210225b83.tar.gz
csound-shout-212bcc23589c06b4eff3cce510d7951210225b83.tar.bz2
csound-shout-212bcc23589c06b4eff3cce510d7951210225b83.zip
strcmp tweaks on shoutinit
-rw-r--r--README.md6
-rw-r--r--src/opcodes.cpp5
2 files changed, 4 insertions, 7 deletions
diff --git a/README.md b/README.md
index 2f02e36..426ede3 100644
--- a/README.md
+++ b/README.md
@@ -32,9 +32,9 @@ Define a connection to a Shoutcast or Icecast server.
* Shost : server hostname or IP address
* iport : server port
-* Suser : username
-* Spassword : password
-* Smount : mount point
+* Suser : username; may be an empty string if not required
+* Spassword : password; may be an empty string if not required
+* Smount : mount point; may be an empty string if not required
## shoutopen ishout
Open a connection defined by shoutinit.
diff --git a/src/opcodes.cpp b/src/opcodes.cpp
index c975f42..31a1047 100644
--- a/src/opcodes.cpp
+++ b/src/opcodes.cpp
@@ -98,7 +98,7 @@ struct shoutinit : csnd::Plugin<1, 5> {
return csound->init_error("Could not set port");
}
- if (shout_set_password(session->shout, password.data) != SHOUTERR_SUCCESS) {
+ if (strcmp(password.data, "") != 0 && shout_set_password(session->shout, password.data) != SHOUTERR_SUCCESS) {
return csound->init_error("Could not set password");
}
@@ -224,8 +224,6 @@ struct shoutsetpublic : csnd::InPlug<2> {
}
};
-
-
struct shoutsetmeta : csnd::InPlug<3> {
ARGO = "";
ARGI = "iSS";
@@ -254,7 +252,6 @@ struct shoutsetmeta : csnd::InPlug<3> {
}
};
-
struct shoutsend : csnd::InPlug<4> {
ARGO = "";
ARGI = "iaaj";