added missing file

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@82 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2006-02-10 10:49:36 +00:00
parent 5fd05b16e4
commit e953ad1051

94
src/core/engine.cpp Normal file
View File

@@ -0,0 +1,94 @@
/*
* engine.cpp - implementation of LMMS' engine-system
*
* Copyright (c) 2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#include "bb_editor.h"
#include "engine.h"
#include "main_window.h"
#include "mixer.h"
#include "piano_roll.h"
#include "preset_preview_play_handle.h"
#include "project_notes.h"
#include "song_editor.h"
engine::engine( const bool _has_gui ) :
m_hasGUI( _has_gui ),
m_mixer( NULL ),
m_mainWindow( NULL ),
m_songEditor( NULL ),
m_bbEditor( NULL ),
m_pianoRoll( NULL )
{
m_mainWindow = new mainWindow( this );
m_mixer = new mixer( this );
m_songEditor = new songEditor( this );
m_projectNotes = new projectNotes( this );
m_bbEditor = new bbEditor( this );
m_pianoRoll = new pianoRoll( this );
m_mainWindow->finalize();
m_mixer->initDevices();
m_mixer->startProcessing();
}
engine::~engine()
{
m_mixer->stopProcessing();
delete m_projectNotes;
delete m_pianoRoll;
delete m_songEditor;
delete m_bbEditor;
presetPreviewPlayHandle::cleanUp( this );
// now we can clean up all allocated buffer
//bufferAllocator::cleanUp( 0 );
delete m_mixer;
//delete configManager::inst();
}
engineObject::engineObject( engine * _engine ) :
m_engine( _engine )
{
}
engineObject::~engineObject()
{
}