allow access to the frozen pattern

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@359 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Javier Serrano Polo
2006-08-24 00:18:36 +00:00
parent c9f9dfa57d
commit c5280c26ce
2 changed files with 11 additions and 2 deletions

View File

@@ -139,6 +139,11 @@ public:
return( m_frozenPattern != NULL );
}
sampleBuffer * getFrozenPattern( void )
{
return( m_frozenPattern );
}
// if channel-track recognizes that this pattern is frozen, it calls
// this instead of playing all the notes
void FASTCALL playFrozenData( sampleFrame * _ab,

View File

@@ -147,7 +147,10 @@ pattern::~pattern()
m_notes.clear();
m_frozenPatternMutex.lock();
delete m_frozenPattern;
if( m_frozenPattern )
{
sharedObject::unref( m_frozenPattern );
}
m_frozenPatternMutex.unlock();
}
@@ -396,6 +399,7 @@ void pattern::checkType( void )
//TODO: remove this method, check mutex
void pattern::playFrozenData( sampleFrame * _ab, const f_cnt_t _start_frame,
const fpab_t _frames )
{
@@ -608,7 +612,7 @@ void pattern::unfreeze( void )
if( m_frozenPattern != NULL )
{
m_frozenPatternMutex.lock();
delete m_frozenPattern;
sharedObject::unref( m_frozenPattern );
m_frozenPattern = NULL;
m_frozenPatternMutex.unlock();
update();