Mercurial > hg > svcore
comparison plugin/DSSIPluginInstance.cpp @ 1039:b14064bd1f97 cxx11
This code now compiles. Main problem: sample rate types
author | Chris Cannam |
---|---|
date | Tue, 03 Mar 2015 17:09:19 +0000 |
parents | cc27f35aa75c |
children | a1cd5abcb38b |
comparison
equal
deleted
inserted
replaced
1038:cc27f35aa75c | 1039:b14064bd1f97 |
---|---|
1060 m_eventBuffer.skip(1); | 1060 m_eventBuffer.skip(1); |
1061 continue; | 1061 continue; |
1062 } | 1062 } |
1063 } | 1063 } |
1064 | 1064 |
1065 ev->time.tick = frameOffset; | 1065 ev->time.tick = (snd_seq_tick_time_t)frameOffset; |
1066 m_eventBuffer.skip(1); | 1066 m_eventBuffer.skip(1); |
1067 | 1067 |
1068 if (ev->type == SND_SEQ_EVENT_CONTROLLER) { | 1068 if (ev->type == SND_SEQ_EVENT_CONTROLLER) { |
1069 accept = handleController(ev); | 1069 accept = handleController(ev); |
1070 } else if (ev->type == SND_SEQ_EVENT_PGMCHANGE) { | 1070 } else if (ev->type == SND_SEQ_EVENT_PGMCHANGE) { |
1182 #ifdef DEBUG_DSSI_PROCESS | 1182 #ifdef DEBUG_DSSI_PROCESS |
1183 SVDEBUG << "DSSIPluginInstance::runGrouped(" << blockTime << "): I'm the first, running" << endl; | 1183 SVDEBUG << "DSSIPluginInstance::runGrouped(" << blockTime << "): I'm the first, running" << endl; |
1184 #endif | 1184 #endif |
1185 | 1185 |
1186 size_t index = 0; | 1186 size_t index = 0; |
1187 int *counts = (int *) | 1187 unsigned long *counts = (unsigned long *) |
1188 alloca(m_groupLocalEventBufferCount * sizeof(int)); | 1188 alloca(m_groupLocalEventBufferCount * sizeof(unsigned long)); |
1189 LADSPA_Handle *instances = (LADSPA_Handle *) | 1189 LADSPA_Handle *instances = (LADSPA_Handle *) |
1190 alloca(m_groupLocalEventBufferCount * sizeof(LADSPA_Handle)); | 1190 alloca(m_groupLocalEventBufferCount * sizeof(LADSPA_Handle)); |
1191 | 1191 |
1192 for (PluginSet::iterator i = s.begin(); i != s.end(); ++i) { | 1192 for (PluginSet::iterator i = s.begin(); i != s.end(); ++i) { |
1193 | 1193 |
1218 | 1218 |
1219 Vamp::RealTime evTime(ev->time.time.tv_sec, ev->time.time.tv_nsec); | 1219 Vamp::RealTime evTime(ev->time.time.tv_sec, ev->time.time.tv_nsec); |
1220 | 1220 |
1221 int frameOffset = 0; | 1221 int frameOffset = 0; |
1222 if (evTime > blockTime) { | 1222 if (evTime > blockTime) { |
1223 frameOffset = Vamp::RealTime::realTime2Frame(evTime - blockTime, m_sampleRate); | 1223 frameOffset = (int) |
1224 Vamp::RealTime::realTime2Frame(evTime - blockTime, | |
1225 (unsigned)m_sampleRate); | |
1224 } | 1226 } |
1225 | 1227 |
1226 #ifdef DEBUG_DSSI_PROCESS | 1228 #ifdef DEBUG_DSSI_PROCESS |
1227 SVDEBUG << "DSSIPluginInstance::runGrouped: evTime " << evTime << ", frameOffset " << frameOffset | 1229 SVDEBUG << "DSSIPluginInstance::runGrouped: evTime " << evTime << ", frameOffset " << frameOffset |
1228 << ", block size " << m_blockSize << endl; | 1230 << ", block size " << m_blockSize << endl; |
1268 } | 1270 } |
1269 | 1271 |
1270 void | 1272 void |
1271 DSSIPluginInstance::midiSend(LADSPA_Handle /* instance */, | 1273 DSSIPluginInstance::midiSend(LADSPA_Handle /* instance */, |
1272 snd_seq_event_t * /* events */, | 1274 snd_seq_event_t * /* events */, |
1273 unsignd long /* eventCount */) | 1275 unsigned long /* eventCount */) |
1274 { | 1276 { |
1275 // This is likely to be called from an RT context | 1277 // This is likely to be called from an RT context |
1276 | 1278 |
1277 SVDEBUG << "DSSIPluginInstance::midiSend" << endl; | 1279 SVDEBUG << "DSSIPluginInstance::midiSend" << endl; |
1278 } | 1280 } |