-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LMMS Memory Manager #1088
Merged
Merged
LMMS Memory Manager #1088
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
9c25be1
LMMS Memory Manager
diizy 75770b4
Fix 64 bit, increase mm usage
diizy 9972cb3
Fixes
diizy 5e43085
More fixes
diizy 42e67d2
Add dedicated manager for noteplayhandles
diizy 8fb8c68
Changing and fixing some stuff
diizy 3a9e9cc
Use ReadWriteLock for the pools container instead of Mutex
diizy a821187
Fix arpeggio to work better with the new way to handle note offsets
diizy 3d9a7fb
remove tr.whitespace
diizy f3ed39a
Fix weird issue with remotevstplugin
diizy daa5f6c
Use memory management in LADSPA effects
diizy af60402
Make it possible to use sample-exact controls in LADSPA plugins
diizy 311d33d
Implement BufferManager
diizy 857de8d
Huge structural changes
diizy 1deb80a
Finish audioport rehaul, get vol/pan knobs working again, also some b…
diizy 1864dcf
Fix bugs
diizy 9a3d3cb
Fix windows compiling
diizy 7bc97f5
Fixes
diizy 68b5a21
Initialize BufferManager from within Mixer
tobydox 9fe5516
Remove base64.h again (was re-added accidentally at merge resolution)
diizy dc4bfdc
Various fixes and precautions
diizy f25da35
Sanitize all channel outputs when exporting
diizy 50bfed7
Fix Carla in memmgr branch
diizy 8a596b0
Sanitize output of all effects when exporting
diizy f207613
Some attention on peak controller
diizy b441bda
Freeverb3: make it work properly on all samplerates
diizy ba05b75
More peak controller changes:
diizy 815a70a
Sync
diizy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* BufferManager.h - A buffer caching/memory management system | ||
* | ||
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi> | ||
* Copyright (c) 2006-2014 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., 51 Franklin Street, Fifth Floor, | ||
* Boston, MA 02110-1301 USA. | ||
* | ||
*/ | ||
|
||
#ifndef BUFFER_MANAGER_H | ||
#define BUFFER_MANAGER_H | ||
|
||
#include "MemoryManager.h" | ||
#include "lmms_basics.h" | ||
#include "engine.h" | ||
#include "Mixer.h" | ||
#include <QtCore/QAtomicInt> | ||
#include <QtCore/QReadWriteLock> | ||
|
||
|
||
const int BM_INITIAL_BUFFERS = 512; | ||
//const int BM_INCREMENT = 64; | ||
|
||
class EXPORT BufferManager | ||
{ | ||
public: | ||
static void init( fpp_t framesPerPeriod ); | ||
static sampleFrame * acquire(); | ||
static void release( sampleFrame * buf ); | ||
static void refresh(); | ||
// static void extend( int c ); | ||
|
||
private: | ||
static sampleFrame ** s_available; | ||
static QAtomicInt s_availableIndex; | ||
|
||
static sampleFrame ** s_released; | ||
static QAtomicInt s_releasedIndex; | ||
// static QReadWriteLock s_mutex; | ||
static int s_size; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ class track; | |
|
||
class EXPORT Instrument : public Plugin | ||
{ | ||
MM_OPERATORS | ||
public: | ||
enum Flag | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tobydox, should this be
class EXPORT InstrumentPlayHandle
? It's the only way I could get compilation for Win32/64 to succeed but I'm just taking guesses here.