Mercurial > hg > svcore
diff plugin/plugins/SamplePlayer.cpp @ 847:2d53205f70cd tonioni
Merge from default branch
author | Chris Cannam |
---|---|
date | Tue, 26 Nov 2013 14:37:01 +0000 |
parents | 2fa49f5caac5 a299c4cec0f8 |
children | b14064bd1f97 |
line wrap: on
line diff
--- a/plugin/plugins/SamplePlayer.cpp Fri Nov 22 10:37:28 2013 +0000 +++ b/plugin/plugins/SamplePlayer.cpp Tue Nov 26 14:37:01 2013 +0000 @@ -366,7 +366,7 @@ #ifdef DEBUG_SAMPLE_PLAYER SVDEBUG << "SamplePlayer::searchSamples: Directory is \"" - << m_sampleDir.toLocal8Bit().data() << "\"" << endl; + << m_sampleDir << "\"" << endl; #endif QDir dir(m_sampleDir, "*.wav"); @@ -377,7 +377,7 @@ m_samples.push_back(std::pair<QString, QString> (file.baseName(), file.filePath())); #ifdef DEBUG_SAMPLE_PLAYER - std::cerr << "Found: " << dir[i].toLocal8Bit().data() << std::endl; + cerr << "Found: " << dir[i] << endl; #endif } } @@ -397,9 +397,9 @@ info.format = 0; file = sf_open(path.toLocal8Bit().data(), SFM_READ, &info); if (!file) { - std::cerr << "SamplePlayer::loadSampleData: Failed to open file " - << path.toLocal8Bit().data() << ": " - << sf_strerror(file) << std::endl; + cerr << "SamplePlayer::loadSampleData: Failed to open file " + << path << ": " + << sf_strerror(file) << endl; return; } @@ -505,8 +505,8 @@ if (events[event_pos].type == SND_SEQ_EVENT_NOTEON) { #ifdef DEBUG_SAMPLE_PLAYER - std::cerr << "SamplePlayer: found NOTEON at time " - << events[event_pos].time.tick << std::endl; + cerr << "SamplePlayer: found NOTEON at time " + << events[event_pos].time.tick << endl; #endif snd_seq_ev_note_t n = events[event_pos].data.note; if (n.velocity > 0) { @@ -523,8 +523,8 @@ } else if (events[event_pos].type == SND_SEQ_EVENT_NOTEOFF && (!m_sustain || (*m_sustain < 0.001))) { #ifdef DEBUG_SAMPLE_PLAYER - std::cerr << "SamplePlayer: found NOTEOFF at time " - << events[event_pos].time.tick << std::endl; + cerr << "SamplePlayer: found NOTEOFF at time " + << events[event_pos].time.tick << endl; #endif snd_seq_ev_note_t n = events[event_pos].data.note; m_offs[n.note] = @@ -550,7 +550,7 @@ } #ifdef DEBUG_SAMPLE_PLAYER - std::cerr << "SamplePlayer: have " << notecount << " note(s) sounding currently" << std::endl; + cerr << "SamplePlayer: have " << notecount << " note(s) sounding currently" << endl; #endif pos += count; @@ -590,7 +590,7 @@ if (rsi >= m_sampleCount) { #ifdef DEBUG_SAMPLE_PLAYER - std::cerr << "Note " << n << " has run out of samples (were " << m_sampleCount << " available at ratio " << ratio << "), ending" << std::endl; + cerr << "Note " << n << " has run out of samples (were " << m_sampleCount << " available at ratio " << ratio << "), ending" << endl; #endif m_ons[n] = -1; break; @@ -609,7 +609,7 @@ if (dist > releaseFrames) { #ifdef DEBUG_SAMPLE_PLAYER - std::cerr << "Note " << n << " has expired its release time (" << releaseFrames << " frames), ending" << std::endl; + cerr << "Note " << n << " has expired its release time (" << releaseFrames << " frames), ending" << endl; #endif m_ons[n] = -1; break;