SF.net Git: supercollider branch, master, updated. 619ad1f6b1d9b840e61e55b7819be5c7d8b3c448
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "supercollider".
The branch, master has been updated
via 619ad1f6b1d9b840e61e55b7819be5c7d8b3c448 (commit)
via 755b7894dcdf60ad4bb0006952720d099c1838bf (commit)
from 767c9fcd86895e5a21012e1dc0fa3113e88d9704 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 619ad1f6b1d9b840e61e55b7819be5c7d8b3c448
Author: Tim Blechmann <tim@...>
Date: Mon Nov 1 16:44:03 2010 +0100
scsynth: remove unnecessary ; characters
Signed-off-by: Tim Blechmann <tim@...>
diff --git a/common/Source/server/SC_Lib.cpp b/common/Source/server/SC_Lib.cpp
index 324885a..b559ef9 100644
--- a/common/Source/server/SC_Lib.cpp
+++ b/common/Source/server/SC_Lib.cpp
<at> <at> -39,7 +39,7 <at> <at> void SendDone(ReplyAddress *inReply, const char *inCommandName)
packet.addtag('s');
packet.adds(inCommandName);
SendReply(inReply, packet.data(), packet.size());
-};
+}
void SendDoneWithIntValue(ReplyAddress *inReply, const char *inCommandName, int value)
{
<at> <at> -52,7 +52,7 <at> <at> void SendDoneWithIntValue(ReplyAddress *inReply, const char *inCommandName, int
packet.addtag('i');
packet.addi(value);
SendReply(inReply, packet.data(), packet.size());
-};
+}
void SendFailure(ReplyAddress *inReply, const char *inCommandName, const char *errString)
{
<at> <at> -65,7 +65,7 <at> <at> void SendFailure(ReplyAddress *inReply, const char *inCommandName, const char *e
packet.adds(inCommandName);
packet.adds(errString);
SendReply(inReply, packet.data(), packet.size());
-};
+}
void SendFailureWithBufnum(ReplyAddress *inReply, const char *inCommandName, const char
*errString, uint32 index)
{
<at> <at> -80,7 +80,7 <at> <at> void SendFailureWithBufnum(ReplyAddress *inReply, const char *inCommandName, con
packet.addtag('i');
packet.addi((int)index);
SendReply(inReply, packet.data(), packet.size());
-};
+}
void ReportLateness(ReplyAddress *inReply, float32 seconds)
{
<at> <at> -91,7 +91,7 <at> <at> void ReportLateness(ReplyAddress *inReply, float32 seconds)
packet.addtag('f');
packet.addf(seconds);
SendReply(inReply, packet.data(), packet.size());
-};
+}
SC_NamedObj::SC_NamedObj()
{
commit 755b7894dcdf60ad4bb0006952720d099c1838bf
Author: Tim Blechmann <tim@...>
Date: Mon Nov 1 16:41:30 2010 +0100
scsynth: introduce SendFailureWithBufnum
SendFailureWithBufnum sends also the bufnum, if creating/reading a buffer
fails.
sc-dev reference: 4CCA3728.1010604@...
Patch-by: Daniel van den Eijkel <dvde@...>
Signed-off-by: Tim Blechmann <tim@...>
diff --git a/common/Headers/server/SC_Prototypes.h b/common/Headers/server/SC_Prototypes.h
index 87e7fa0..8f19fd0 100644
--- a/common/Headers/server/SC_Prototypes.h
+++ b/common/Headers/server/SC_Prototypes.h
<at> <at> -191,6 +191,7 <at> <at> void Unit_ZeroOutputs(struct Unit *inUnit, int inNumSamples);
void SendDone(struct ReplyAddress *inReply, const char *inCommandName);
void SendDoneWithIntValue(struct ReplyAddress *inReply, const char *inCommandName, int value);
void SendFailure(struct ReplyAddress *inReply, const char *inCommandName, const char *errString);
+void SendFailureWithBufnum(struct ReplyAddress *inReply, const char *inCommandName, const char
*errString, uint32 index);
void ReportLateness(struct ReplyAddress *inReply, float32 seconds);
void DumpReplyAddress(struct ReplyAddress *inReplyAddress);
int32 Hash(struct ReplyAddress *inReplyAddress);
diff --git a/common/Source/server/SC_Lib.cpp b/common/Source/server/SC_Lib.cpp
index 5f6586d..324885a 100644
--- a/common/Source/server/SC_Lib.cpp
+++ b/common/Source/server/SC_Lib.cpp
<at> <at> -67,6 +67,21 <at> <at> void SendFailure(ReplyAddress *inReply, const char *inCommandName, const char *e
SendReply(inReply, packet.data(), packet.size());
};
+void SendFailureWithBufnum(ReplyAddress *inReply, const char *inCommandName, const char
*errString, uint32 index)
+{
+ small_scpacket packet;
+ packet.adds("/fail");
+ packet.maketags(4);
+ packet.addtag(',');
+ packet.addtag('s');
+ packet.addtag('s');
+ packet.adds(inCommandName);
+ packet.adds(errString);
+ packet.addtag('i');
+ packet.addi((int)index);
+ SendReply(inReply, packet.data(), packet.size());
+};
+
void ReportLateness(ReplyAddress *inReply, float32 seconds)
{
small_scpacket packet;
diff --git a/common/Source/server/SC_SequencedCommand.cpp b/common/Source/server/SC_SequencedCommand.cpp
index 559d5be..9a8fcf0 100644
--- a/common/Source/server/SC_SequencedCommand.cpp
+++ b/common/Source/server/SC_SequencedCommand.cpp
<at> <at> -541,7 +541,7 <at> <at> bool BufAllocReadCmd::Stage2()
if (!fp) {
char str[256];
sprintf(str, "File '%s' could not be opened.\n", mFilename);
- SendFailure(&mReplyAddress, "/b_allocRead", str);
+ SendFailureWithBufnum(&mReplyAddress, "/b_allocRead", str,
mBufIndex); //SendFailure(&mReplyAddress, "/b_allocRead", str);
scprintf(str);
return false;
}
<at> <at> -559,7 +559,7 <at> <at> bool BufAllocReadCmd::Stage2()
fclose(fp);
#endif
sprintf(str, "File '%s' could not be opened.\n", mFilename);
- SendFailure(&mReplyAddress, "/b_allocRead", str);
+ SendFailureWithBufnum(&mReplyAddress, "/b_allocRead", str,
mBufIndex); //SendFailure(&mReplyAddress, "/b_allocRead", str);
scprintf(str);
return false;
}
<at> <at> -664,7 +664,7 <at> <at> bool BufReadCmd::Stage2()
if (!fp) {
char str[256];
sprintf(str, "File '%s' could not be opened.\n", mFilename);
- SendFailure(&mReplyAddress, "/b_read", str);
+ SendFailureWithBufnum(&mReplyAddress, "/b_read", str, mBufIndex);
//SendFailure(&mReplyAddress, "/b_read", str);
scprintf(str);
return false;
}
<at> <at> -678,7 +678,7 <at> <at> bool BufReadCmd::Stage2()
fclose(fp);
#endif
sprintf(str, "File '%s' could not be opened.\n", mFilename);
- SendFailure(&mReplyAddress, "/b_read", str);
+ SendFailureWithBufnum(&mReplyAddress, "/b_read", str, mBufIndex);
//SendFailure(&mReplyAddress, "/b_read", str);
scprintf(str);
return false;
}
<at> <at> -686,7 +686,7 <at> <at> bool BufReadCmd::Stage2()
char str[256];
sf_close(sf);
sprintf(str, "channel mismatch. File'%s' has %d channels. Buffer has %d channels.\n", mFilename,
fileinfo.channels, buf->channels);
- SendFailure(&mReplyAddress, "/b_read", str);
+ SendFailureWithBufnum(&mReplyAddress, "/b_read", str, mBufIndex);
//SendFailure(&mReplyAddress, "/b_read", str);
scprintf(str);
return false;
}
<at> <at> -833,7 +833,7 <at> <at> bool BufAllocReadChannelCmd::Stage2()
if (!sf) {
char str[256];
sprintf(str, "File '%s' could not be opened.\n", mFilename);
- SendFailure(&mReplyAddress, "/b_allocRead", str);
+ SendFailureWithBufnum(&mReplyAddress, "/b_allocRead", str, mBufIndex);
//SendFailure(&mReplyAddress, "/b_allocRead", str);
scprintf(str);
return false;
}
<at> <at> -853,7 +853,7 <at> <at> bool BufAllocReadChannelCmd::Stage2()
// verify channel indexes
if (!CheckChannels(fileinfo.channels)) {
const char* str = "Channel index out of range.\n";
- SendFailure(&mReplyAddress, "/b_allocRead", str);
+ SendFailureWithBufnum(&mReplyAddress, "/b_allocRead", str, mBufIndex);
//SendFailure(&mReplyAddress, "/b_allocRead", str);
scprintf(str);
sf_close(sf);
return false;
<at> <at> -959,7 +959,7 <at> <at> bool BufReadChannelCmd::Stage2()
if (!sf) {
char str[256];
sprintf(str, "File '%s' could not be opened.\n", mFilename);
- SendFailure(&mReplyAddress, "/b_read", str);
+ SendFailureWithBufnum(&mReplyAddress, "/b_read", str, mBufIndex);
//SendFailure(&mReplyAddress, "/b_read", str);
scprintf(str);
return false;
}
<at> <at> -968,7 +968,7 <at> <at> bool BufReadChannelCmd::Stage2()
// verify channel indexes
if (!( CheckChannels(fileinfo.channels)) ) { // nescivi: && CheckChannels(buf->channels) (should
not check here for buf->channels)
const char* str = "Channel index out of range.\n";
- SendFailure(&mReplyAddress, "/b_allocRead", str);
+ SendFailureWithBufnum(&mReplyAddress, "/b_allocRead", str, mBufIndex);
//SendFailure(&mReplyAddress, "/b_allocRead", str);
scprintf(str);
sf_close(sf);
return false;
<at> <at> -1104,7 +1104,7 <at> <at> bool BufWriteCmd::Stage2()
char str[256];
sf_error_str(NULL, sferr, 256);
sprintf(str, "File '%s' could not be opened. '%s'\n", mFilename, sferr);
- SendFailure(&mReplyAddress, "/b_write", str);
+ SendFailureWithBufnum(&mReplyAddress, "/b_write", str, mBufIndex);
//SendFailure(&mReplyAddress, "/b_write", str);
scprintf(str);
return false;
}
-----------------------------------------------------------------------
Summary of changes:
common/Headers/server/SC_Prototypes.h | 1 +
common/Source/server/SC_Lib.cpp | 23 +++++++++++++++++++----
common/Source/server/SC_SequencedCommand.cpp | 20 ++++++++++----------
3 files changed, 30 insertions(+), 14 deletions(-)
hooks/post-receive
--
--
supercollider
_______________________________________________
sc-dev mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/