Improved buffer-allocator

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@71 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2006-01-30 10:50:02 +00:00
parent 422e4364e6
commit 66d18659a4
9 changed files with 98 additions and 46 deletions

View File

@@ -2,7 +2,7 @@
* buffer_allocator.h - namespace bufferAllocator providing routines for own
* optimized memory-management for audio-buffers
*
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -46,10 +46,15 @@ namespace bufferAllocator
return( (T *) allocBytes( sizeof( T ) * _n ) );
}
// free given buffer
void FASTCALL free( void * _buf );
// try to cleanup _level unused buffers
void FASTCALL cleanUp( Uint16 _level );
// disable autocleanup-mechanisms
void FASTCALL disableAutoCleanup( bool _disabled );
// simple class for automatically freeing buffer in complex functions
template<class T = void>