3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005 - 2008 Christian Schoenebeck * |
* Copyright (C) 2005 - 2016 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
9 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
170 |
//Produce resultset |
//Produce resultset |
171 |
String LSCPResultSet::Produce(void) { |
String LSCPResultSet::Produce(void) { |
172 |
//FIXME: I'm assuming that only a sinle like "OK" can have index |
//FIXME: I'm assuming that only a sinle like "OK" can have index |
173 |
if (count == 0) //When there is nothing in the resultset we just send "OK" to ack the request |
if (count == 0) { //When there is nothing in the resultset we just send "OK" to ack the request |
174 |
if (result_index == -1) |
if (result_index == -1) |
175 |
return "OK\r\n"; |
return "OK\r\n"; |
176 |
else |
else |
177 |
return "OK[" + ToString(result_index) + "]\r\n"; |
return "OK[" + ToString(result_index) + "]\r\n"; |
178 |
|
} |
179 |
if (count == 1) //Single line results are just that, single line |
if (count == 1) //Single line results are just that, single line |
180 |
return storage; |
return storage; |
181 |
//Multiline results MUST end with a line with a single dot |
//Multiline results MUST end with a line with a single dot |