Mercurial > hg > svcore
diff data/fileio/MIDIFileWriter.cpp @ 1048:c7e9afcbf070 cxx11
More type fixes. We now build with -Wconversion, on this platform (64-bit Linux) at least.
author | Chris Cannam |
---|---|
date | Tue, 10 Mar 2015 17:23:45 +0000 |
parents | cc27f35aa75c |
children | 50210da3997c |
line wrap: on
line diff
--- 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);