# HG changeset patch # User Chris Cannam # Date 1426008225 0 # Node ID c7e9afcbf07063c99e25f696c9f6d61b3d76ff45 # Parent 26cf6d5251ec93b965a5d4b20bb76f6da9ef85ae More type fixes. We now build with -Wconversion, on this platform (64-bit Linux) at least. diff -r 26cf6d5251ec -r c7e9afcbf070 data/fileio/MIDIFileWriter.cpp --- a/data/fileio/MIDIFileWriter.cpp Tue Mar 10 17:02:52 2015 +0000 +++ b/data/fileio/MIDIFileWriter.cpp Tue Mar 10 17:23:45 2015 +0000 @@ -37,7 +37,7 @@ using namespace MIDIConstants; MIDIFileWriter::MIDIFileWriter(QString path, const NoteExportable *exportable, - int sampleRate, float tempo) : + sv_samplerate_t sampleRate, float tempo) : m_path(path), m_exportable(exportable), m_sampleRate(sampleRate), @@ -358,12 +358,12 @@ // Convert frame to MIDI time - double seconds = double(frame) / double(m_sampleRate); + double seconds = double(frame) / m_sampleRate; double quarters = (seconds * m_tempo) / 60.0; unsigned long midiTime = int(quarters * m_timingDivision + 0.5); // Get the sounding time for the matching NOTE_OFF - seconds = double(frame + duration) / double(m_sampleRate); + seconds = double(frame + duration) / m_sampleRate; quarters = (seconds * m_tempo) / 60.0; unsigned long endTime = int(quarters * m_timingDivision + 0.5); diff -r 26cf6d5251ec -r c7e9afcbf070 data/fileio/MIDIFileWriter.h --- a/data/fileio/MIDIFileWriter.h Tue Mar 10 17:02:52 2015 +0000 +++ b/data/fileio/MIDIFileWriter.h Tue Mar 10 17:23:45 2015 +0000 @@ -24,6 +24,7 @@ #define _MIDI_FILE_WRITER_H_ #include "base/RealTime.h" +#include "base/BaseTypes.h" #include @@ -45,7 +46,7 @@ public: MIDIFileWriter(QString path, const NoteExportable *exportable, - int sampleRate, // used to convert exportable sample timings + sv_samplerate_t sampleRate, // used to convert exportable sample timings float tempo = 120.f); virtual ~MIDIFileWriter(); @@ -79,7 +80,7 @@ QString m_path; const NoteExportable *m_exportable; - int m_sampleRate; + sv_samplerate_t m_sampleRate; float m_tempo; int m_timingDivision; // pulses per quarter note MIDIFileFormatType m_format; diff -r 26cf6d5251ec -r c7e9afcbf070 transform/ModelTransformerFactory.cpp --- a/transform/ModelTransformerFactory.cpp Tue Mar 10 17:02:52 2015 +0000 +++ b/transform/ModelTransformerFactory.cpp Tue Mar 10 17:23:45 2015 +0000 @@ -55,8 +55,8 @@ const std::vector &candidateInputModels, Model *defaultInputModel, AudioPlaySource *source, - int startFrame, - int duration, + sv_frame_t startFrame, + sv_frame_t duration, UserConfigurator *configurator) { ModelTransformer::Input input(0); diff -r 26cf6d5251ec -r c7e9afcbf070 transform/ModelTransformerFactory.h --- a/transform/ModelTransformerFactory.h Tue Mar 10 17:02:52 2015 +0000 +++ b/transform/ModelTransformerFactory.h Tue Mar 10 17:23:45 2015 +0000 @@ -47,8 +47,8 @@ Vamp::PluginBase *plugin, Model *&inputModel, AudioPlaySource *source, - int startFrame, - int duration, + sv_frame_t startFrame, + sv_frame_t duration, const QMap &modelMap, QStringList candidateModelNames, QString defaultModelName) = 0; @@ -67,8 +67,8 @@ const std::vector &candidateInputModels, Model *defaultInputModel, AudioPlaySource *source = 0, - int startFrame = 0, - int duration = 0, + sv_frame_t startFrame = 0, + sv_frame_t duration = 0, UserConfigurator *configurator = 0); class AdditionalModelHandler {