Merge branch 'master' into ed_refac
Conflicts: src/gui/editors/PianoRoll.cpp
This commit is contained in:
@@ -234,7 +234,7 @@ EqBand* EqParameterWidget::selectNearestHandle( const int x, const int y )
|
||||
{
|
||||
selectedModel = &m_bands[shortestBand];
|
||||
}
|
||||
delete distanceToHandles;
|
||||
delete[] distanceToHandles;
|
||||
return selectedModel;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,14 @@ if(LMMS_HAVE_GIG)
|
||||
SET(GCC_COVERAGE_COMPILE_FLAGS "-fexceptions")
|
||||
add_definitions(${GCC_COVERAGE_COMPILE_FLAGS})
|
||||
|
||||
LINK_DIRECTORIES(${GIG_LIBRARY_DIRS})
|
||||
LINK_LIBRARIES(${GIG_LIBRARIES})
|
||||
# disable deprecated check for mingw-x-libgig
|
||||
if(LMMS_BUILD_WIN32)
|
||||
SET(GCC_GIG_COMPILE_FLAGS "-Wno-deprecated")
|
||||
add_definitions(${GCC_GIG_COMPILE_FLAGS})
|
||||
endif(LMMS_BUILD_WIN32)
|
||||
|
||||
LINK_DIRECTORIES(${GIG_LIBRARY_DIRS} ${SAMPLERATE_LIBRARY_DIRS})
|
||||
LINK_LIBRARIES(${GIG_LIBRARIES} ${SAMPLERATE_LIBRARIES})
|
||||
BUILD_PLUGIN(gigplayer GigPlayer.cpp GigPlayer.h PatchesDialog.cpp PatchesDialog.h PatchesDialog.ui MOCFILES GigPlayer.h PatchesDialog.h UICFILES PatchesDialog.ui EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
|
||||
endif(LMMS_HAVE_GIG)
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ void LadspaControlDialog::updateEffectView( LadspaControls * _ctl )
|
||||
grouper->setAlignment( Qt::Vertical );
|
||||
|
||||
for( control_list_t::iterator it = controls.begin();
|
||||
it != controls.end(); it++ )
|
||||
it != controls.end(); ++it )
|
||||
{
|
||||
if( (*it)->port()->proc == proc )
|
||||
{
|
||||
|
||||
@@ -983,7 +983,7 @@ bool drawbar_organ::check_percussion() {
|
||||
void drawbar_organ::pitch_bend(int amt)
|
||||
{
|
||||
parameters->pitch_bend = pow(2.0, (amt * parameters->pitch_bend_range) / (1200.0 * 8192.0));
|
||||
for (list<voice *>::iterator i = active_voices.begin(); i != active_voices.end(); i++)
|
||||
for (list<voice *>::iterator i = active_voices.begin(); i != active_voices.end(); ++i)
|
||||
{
|
||||
organ_voice *v = dynamic_cast<organ_voice *>(*i);
|
||||
v->update_pitch();
|
||||
|
||||
@@ -25,7 +25,7 @@ using namespace std;
|
||||
|
||||
void basic_synth::kill_note(int note, int vel, bool just_one)
|
||||
{
|
||||
for (list<dsp::voice *>::iterator it = active_voices.begin(); it != active_voices.end(); it++) {
|
||||
for (list<dsp::voice *>::iterator it = active_voices.begin(); it != active_voices.end(); ++it) {
|
||||
// preserve sostenuto notes
|
||||
if ((*it)->get_current_note() == note && !(sostenuto && (*it)->sostenuto)) {
|
||||
(*it)->note_off(vel);
|
||||
@@ -58,7 +58,7 @@ dsp::voice *basic_synth::steal_voice()
|
||||
std::list<dsp::voice *>::iterator found = active_voices.end();
|
||||
float priority = 10000;
|
||||
//int idx = 0;
|
||||
for(std::list<dsp::voice *>::iterator i = active_voices.begin(); i != active_voices.end(); i++)
|
||||
for(std::list<dsp::voice *>::iterator i = active_voices.begin(); i != active_voices.end(); ++i)
|
||||
{
|
||||
//printf("Voice %d priority %f at %p\n", idx++, (*i)->get_priority(), *i);
|
||||
if ((*i)->get_priority() < priority)
|
||||
@@ -79,7 +79,7 @@ void basic_synth::trim_voices()
|
||||
{
|
||||
// count stealable voices
|
||||
unsigned int count = 0;
|
||||
for(std::list<dsp::voice *>::iterator i = active_voices.begin(); i != active_voices.end(); i++)
|
||||
for(std::list<dsp::voice *>::iterator i = active_voices.begin(); i != active_voices.end(); ++i)
|
||||
{
|
||||
if ((*i)->get_priority() < 10000)
|
||||
count++;
|
||||
@@ -118,7 +118,7 @@ void basic_synth::note_off(int note, int vel)
|
||||
kill_note(note, vel, false);
|
||||
}
|
||||
|
||||
#define for_all_voices(iter) for (std::list<dsp::voice *>::iterator iter = active_voices.begin(); iter != active_voices.end(); iter++)
|
||||
#define for_all_voices(iter) for (std::list<dsp::voice *>::iterator iter = active_voices.begin(); iter != active_voices.end(); ++iter)
|
||||
|
||||
void basic_synth::on_pedal_release()
|
||||
{
|
||||
@@ -204,7 +204,7 @@ void basic_synth::render_to(float (*output)[2], int nsamples)
|
||||
unused_voices.push(v);
|
||||
continue;
|
||||
}
|
||||
i++;
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ basic_synth::~basic_synth()
|
||||
delete unused_voices.top();
|
||||
unused_voices.pop();
|
||||
}
|
||||
for (list<voice *>::iterator i = active_voices.begin(); i != active_voices.end(); i++)
|
||||
for (list<voice *>::iterator i = active_voices.begin(); i != active_voices.end(); ++i)
|
||||
delete *i;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ string encode_map(const dictionary &data)
|
||||
osctl::string_buffer sb;
|
||||
osc_stream<osctl::string_buffer> str(sb);
|
||||
str << (uint32_t)data.size();
|
||||
for(dictionary::const_iterator i = data.begin(); i != data.end(); i++)
|
||||
for(dictionary::const_iterator i = data.begin(); i != data.end(); ++i)
|
||||
{
|
||||
str << i->first << i->second;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#include "audio_file_processor.h"
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
#include "MainWindow.h"
|
||||
#include "GuiApplication.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "NotePlayHandle.h"
|
||||
#include "interpolation.h"
|
||||
@@ -234,6 +236,14 @@ void audioFileProcessor::loadSettings( const QDomElement & _this )
|
||||
if( _this.attribute( "src" ) != "" )
|
||||
{
|
||||
setAudioFile( _this.attribute( "src" ), false );
|
||||
|
||||
QString absolutePath = m_sampleBuffer.tryToMakeAbsolute( m_sampleBuffer.audioFile() );
|
||||
if ( !QFileInfo( absolutePath ).exists() )
|
||||
{
|
||||
QString message = tr( "Sample not found: %1" ).arg( m_sampleBuffer.audioFile() );
|
||||
|
||||
gui->mainWindow()->collectError( message );
|
||||
}
|
||||
}
|
||||
else if( _this.attribute( "sampledata" ) != "" )
|
||||
{
|
||||
|
||||
@@ -70,7 +70,7 @@ ladspaDescription::ladspaDescription( QWidget * _parent,
|
||||
|
||||
QList<QString> pluginNames;
|
||||
for( l_sortable_plugin_t::iterator it = plugins.begin();
|
||||
it != plugins.end(); it++ )
|
||||
it != plugins.end(); ++it )
|
||||
{
|
||||
if( _type != VALID ||
|
||||
manager->getDescription( ( *it ).second )->inputChannels
|
||||
|
||||
@@ -649,14 +649,19 @@ void sf2Instrument::play( sampleFrame * _working_buffer )
|
||||
if( m_lastMidiPitch != currentMidiPitch )
|
||||
{
|
||||
m_lastMidiPitch = currentMidiPitch;
|
||||
m_synthMutex.lock();
|
||||
fluid_synth_pitch_bend( m_synth, m_channel, m_lastMidiPitch );
|
||||
m_synthMutex.unlock();
|
||||
|
||||
}
|
||||
|
||||
const int currentMidiPitchRange = instrumentTrack()->midiPitchRange();
|
||||
if( m_lastMidiPitchRange != currentMidiPitchRange )
|
||||
{
|
||||
m_lastMidiPitchRange = currentMidiPitchRange;
|
||||
m_synthMutex.lock();
|
||||
fluid_synth_pitch_wheel_sens( m_synth, m_channel, m_lastMidiPitchRange );
|
||||
m_synthMutex.unlock();
|
||||
}
|
||||
// if we have no new noteons/noteoffs, just render a period and call it a day
|
||||
if( m_playingNotes.isEmpty() )
|
||||
|
||||
Reference in New Issue
Block a user