MCPcopy Create free account
hub / github.com/LMMS/lmms / processNextBuffer

Method processNextBuffer

src/core/Song.cpp:195–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193
194
195void Song::processNextBuffer()
196{
197 m_vstSyncController.setPlaybackJumped( false );
198
199 // if not playing, nothing to do
200 if( m_playing == false )
201 {
202 return;
203 }
204
205 TrackList trackList;
206 int tcoNum = -1; // track content object number
207
208 // determine the list of tracks to play and the track content object
209 // (TCO) number
210 switch( m_playMode )
211 {
212 case Mode_PlaySong:
213 trackList = tracks();
214 // at song-start we have to reset the LFOs
215 if( m_playPos[Mode_PlaySong] == 0 )
216 {
217 EnvelopeAndLfoParameters::instances()->reset();
218 }
219 break;
220
221 case Mode_PlayBB:
222 if( Engine::getBBTrackContainer()->numOfBBs() > 0 )
223 {
224 tcoNum = Engine::getBBTrackContainer()->
225 currentBB();
226 trackList.push_back( BBTrack::findBBTrack(
227 tcoNum ) );
228 }
229 break;
230
231 case Mode_PlayPattern:
232 if( m_patternToPlay != NULL )
233 {
234 tcoNum = m_patternToPlay->getTrack()->
235 getTCONum( m_patternToPlay );
236 trackList.push_back(
237 m_patternToPlay->getTrack() );
238 }
239 break;
240
241 default:
242 return;
243
244 }
245
246 // if we have no tracks to play, nothing to do
247 if( trackList.empty() == true )
248 {
249 return;
250 }
251
252 // check for looping-mode and act if necessary

Callers 2

runMethod · 0.45
renderNextBufferMethod · 0.45

Calls 15

instancesFunction · 0.85
getBBTrackContainerFunction · 0.85
framesPerTickFunction · 0.85
mixerFunction · 0.85
ticksPerTactFunction · 0.85
setPlaybackJumpedMethod · 0.80
numOfBBsMethod · 0.80
getTCONumMethod · 0.80
loopPointsEnabledMethod · 0.80
getTicksMethod · 0.80
setTicksMethod · 0.80
jumpedMethod · 0.80

Tested by

no test coverage detected