simple xrun-detection
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@80 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
115
include/engine.h
Normal file
115
include/engine.h
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* engine.h - engine-system of LMMS
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ENGINE_H
|
||||
#define _ENGINE_H
|
||||
|
||||
class mixer;
|
||||
class lmmsMainWin;
|
||||
class songEditor;
|
||||
class bbEditor;
|
||||
class pianoRoll;
|
||||
|
||||
|
||||
class engine
|
||||
{
|
||||
public:
|
||||
engine( bool _has_gui = TRUE );
|
||||
engine( const engine & _engine );
|
||||
~engine();
|
||||
|
||||
engine * duplicate( const engine * _engine )
|
||||
{
|
||||
return( new engine( *_engine ) );
|
||||
}
|
||||
|
||||
inline bool hasGUI( void ) const
|
||||
{
|
||||
return( m_hasGUI );
|
||||
}
|
||||
|
||||
inline mixer * getMixer( void )
|
||||
{
|
||||
return( m_mixer );
|
||||
}
|
||||
|
||||
inline lmmsMainWin * getMainWindow( void )
|
||||
{
|
||||
return( m_mainWindow );
|
||||
}
|
||||
|
||||
inline songEditor * getSongEditor( void )
|
||||
{
|
||||
return( m_songEditor );
|
||||
}
|
||||
|
||||
inline bbEditor * getBBEditor( void )
|
||||
{
|
||||
return( m_bbEditor );
|
||||
}
|
||||
|
||||
inline pianoRoll * getPianoRoll( void )
|
||||
{
|
||||
return( m_pianoRoll );
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
bool m_hasGUI;
|
||||
|
||||
mixer * m_mixer;
|
||||
lmmsMainWin * m_mainWindow;
|
||||
songEditor * m_songEditor;
|
||||
bbEditor * m_bbEditor;
|
||||
pianoRoll * m_pianoRoll;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
class engineObject
|
||||
{
|
||||
public:
|
||||
engineObject( engine * _engine );
|
||||
~engineObject();
|
||||
|
||||
inline engine * eng( void )
|
||||
{
|
||||
return( m_engine );
|
||||
}
|
||||
|
||||
inline bool hasGUI( void ) const
|
||||
{
|
||||
return( m_engine->hasGUI() );
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
engine * m_engine;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
@@ -195,7 +195,14 @@ public:
|
||||
|
||||
inline void addPlayHandle( playHandle * _ph )
|
||||
{
|
||||
m_playHandles.push_back( _ph );
|
||||
if( criticalXRuns() == FALSE )
|
||||
{
|
||||
m_playHandles.push_back( _ph );
|
||||
}
|
||||
else
|
||||
{
|
||||
delete _ph;
|
||||
}
|
||||
}
|
||||
|
||||
inline void removePlayHandle( playHandle * _ph )
|
||||
@@ -223,7 +230,7 @@ public:
|
||||
return( m_masterGain );
|
||||
}
|
||||
|
||||
inline void setMasterGain( float _mo )
|
||||
inline void setMasterGain( const float _mo )
|
||||
{
|
||||
m_masterGain = _mo;
|
||||
}
|
||||
@@ -277,6 +284,7 @@ public:
|
||||
return( m_playHandles.size() == 0 );
|
||||
}
|
||||
|
||||
bool criticalXRuns( void ) const;
|
||||
|
||||
const surroundSampleFrame * renderNextBuffer( void );
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* pattern.h - declaration of class pattern, which contains all informations
|
||||
* about a pattern
|
||||
*
|
||||
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
BEAT_PATTERN, MELODY_PATTERN/*, AUTOMATION_PATTERN*/
|
||||
} ;
|
||||
|
||||
pattern( channelTrack * _channel_track );
|
||||
pattern( channelTrack * _channel_track ) FASTCALL;
|
||||
pattern( const pattern & _pat_to_copy ) FASTCALL;
|
||||
virtual ~pattern();
|
||||
|
||||
|
||||
@@ -119,6 +119,8 @@ public:
|
||||
return( m_exporting );
|
||||
}
|
||||
|
||||
bool realTimeTask( void ) const;
|
||||
|
||||
inline bool exportDone( void ) const
|
||||
{
|
||||
return( m_exporting == TRUE &&
|
||||
|
||||
Reference in New Issue
Block a user