Fix reference sharing in SF2 player
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1653 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -197,7 +197,7 @@ IF(WANT_PULSEAUDIO)
|
||||
SET(STATUS_PULSEAUDIO "OK")
|
||||
ELSE(PULSEAUDIO_FOUND)
|
||||
SET(STATUS_PULSEAUDIO "not found, please install libpulse-dev (or similiar) "
|
||||
"if your require Portaudio support")
|
||||
"if your require PulseAudio support")
|
||||
ENDIF(PULSEAUDIO_FOUND)
|
||||
ENDIF(WANT_PULSEAUDIO)
|
||||
IF(NOT LMMS_HAVE_PULSEAUDIO)
|
||||
|
||||
13
ChangeLog
13
ChangeLog
@@ -1,3 +1,16 @@
|
||||
2008-09-16 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
|
||||
* plugins/sf2_player/sf2_player.cpp:
|
||||
Fix bug introduced in the last edit. Reference sharing was not working
|
||||
at all because the check was performed with a different filename than
|
||||
the insert
|
||||
|
||||
* plugins/vibed/logo.png:
|
||||
Add fabi's improved vibed logo
|
||||
|
||||
* CMakeLists.txt:
|
||||
Fix copy-and-paste error in a message
|
||||
|
||||
2008-09-20 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* src/core/config_mgr.cpp:
|
||||
|
||||
@@ -323,6 +323,7 @@ void sf2Instrument::openFile( const QString & _sf2File )
|
||||
// Used for loading file
|
||||
char * sf2Ascii = qstrdup( qPrintable(
|
||||
sampleBuffer::tryToMakeAbsolute( _sf2File ) ) );
|
||||
QString relativePath = sampleBuffer::tryToMakeRelative( _sf2File );
|
||||
|
||||
// free reference to soundfont if one is selected
|
||||
freeFont();
|
||||
@@ -331,12 +332,12 @@ void sf2Instrument::openFile( const QString & _sf2File )
|
||||
s_fontsMutex.lock();
|
||||
|
||||
// Increment Reference
|
||||
if( s_fonts.contains( _sf2File ) )
|
||||
if( s_fonts.contains( relativePath ) )
|
||||
{
|
||||
QTextStream cout( stdout, QIODevice::WriteOnly );
|
||||
cout << "Using existing reference to " << _sf2File << endl;
|
||||
cout << "Using existing reference to " << relativePath << endl;
|
||||
|
||||
m_font = s_fonts[ _sf2File ];
|
||||
m_font = s_fonts[ relativePath ];
|
||||
|
||||
m_font->refCount++;
|
||||
|
||||
@@ -352,7 +353,7 @@ void sf2Instrument::openFile( const QString & _sf2File )
|
||||
{
|
||||
// Grab this sf from the top of the stack and add to list
|
||||
m_font = new sf2Font( fluid_synth_get_sfont( m_synth, 0 ) );
|
||||
s_fonts.insert( sampleBuffer::tryToMakeRelative( _sf2File ), m_font );
|
||||
s_fonts.insert( relativePath, m_font );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -369,7 +370,7 @@ void sf2Instrument::openFile( const QString & _sf2File )
|
||||
// someone resolves a missing file
|
||||
//m_patchNum.setValue( 0 );
|
||||
//m_bankNum.setValue( 0 );
|
||||
m_filename = sampleBuffer::tryToMakeRelative( _sf2File );
|
||||
m_filename = relativePath;
|
||||
|
||||
emit fileChanged();
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 4.2 KiB |
Reference in New Issue
Block a user