127 |
LSCPEvent::RegisterEvent(LSCPEvent::event_db_instr_info, "DB_INSTRUMENT_INFO"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_db_instr_info, "DB_INSTRUMENT_INFO"); |
128 |
LSCPEvent::RegisterEvent(LSCPEvent::event_db_instrs_job_info, "DB_INSTRUMENTS_JOB_INFO"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_db_instrs_job_info, "DB_INSTRUMENTS_JOB_INFO"); |
129 |
LSCPEvent::RegisterEvent(LSCPEvent::event_misc, "MISCELLANEOUS"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_misc, "MISCELLANEOUS"); |
130 |
|
LSCPEvent::RegisterEvent(LSCPEvent::event_total_stream_count, "TOTAL_STREAM_COUNT"); |
131 |
LSCPEvent::RegisterEvent(LSCPEvent::event_total_voice_count, "TOTAL_VOICE_COUNT"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_total_voice_count, "TOTAL_VOICE_COUNT"); |
132 |
LSCPEvent::RegisterEvent(LSCPEvent::event_global_info, "GLOBAL_INFO"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_global_info, "GLOBAL_INFO"); |
133 |
hSocket = -1; |
hSocket = -1; |
189 |
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_total_voice_count, NewCount)); |
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_total_voice_count, NewCount)); |
190 |
} |
} |
191 |
|
|
192 |
|
void LSCPServer::EventHandler::TotalStreamCountChanged(int NewCount) { |
193 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_total_stream_count, NewCount)); |
194 |
|
} |
195 |
|
|
196 |
#if HAVE_SQLITE3 |
#if HAVE_SQLITE3 |
197 |
void LSCPServer::DbInstrumentsEventHandler::DirectoryCountChanged(String Dir) { |
void LSCPServer::DbInstrumentsEventHandler::DirectoryCountChanged(String Dir) { |
198 |
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_db_instr_dir_count, InstrumentsDb::toEscapedPath(Dir))); |
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_db_instr_dir_count, InstrumentsDb::toEscapedPath(Dir))); |
289 |
pSampler->AddVoiceCountListener(&eventHandler); |
pSampler->AddVoiceCountListener(&eventHandler); |
290 |
pSampler->AddStreamCountListener(&eventHandler); |
pSampler->AddStreamCountListener(&eventHandler); |
291 |
pSampler->AddBufferFillListener(&eventHandler); |
pSampler->AddBufferFillListener(&eventHandler); |
292 |
|
pSampler->AddTotalStreamCountListener(&eventHandler); |
293 |
pSampler->AddTotalVoiceCountListener(&eventHandler); |
pSampler->AddTotalVoiceCountListener(&eventHandler); |
294 |
pSampler->AddFxSendCountListener(&eventHandler); |
pSampler->AddFxSendCountListener(&eventHandler); |
295 |
MidiInstrumentMapper::AddMidiInstrumentCountListener(&eventHandler); |
MidiInstrumentMapper::AddMidiInstrumentCountListener(&eventHandler); |
2352 |
return result.Produce(); |
return result.Produce(); |
2353 |
} |
} |
2354 |
|
|
2355 |
|
/** |
2356 |
|
* Will be called by the parser to return the current number of all active streams. |
2357 |
|
*/ |
2358 |
|
String LSCPServer::GetTotalStreamCount() { |
2359 |
|
dmsg(2,("LSCPServer: GetTotalStreamCount()\n")); |
2360 |
|
LSCPResultSet result; |
2361 |
|
result.Add(pSampler->GetDiskStreamCount()); |
2362 |
|
return result.Produce(); |
2363 |
|
} |
2364 |
|
|
2365 |
/** |
/** |
2366 |
* Will be called by the parser to return the current number of all active voices. |
* Will be called by the parser to return the current number of all active voices. |
2367 |
*/ |
*/ |