comparison audioio/AudioCallbackPlaySource.cpp @ 180:98ba77e0d897

* Merge from sv-match-alignment branch (excluding alignment-specific document). - add aggregate wave model (not yet complete enough to be added as a true model in a layer, but there's potential) - add play solo mode - add alignment model -- unused in plain SV - fix two plugin leaks - add m3u playlist support (opens all files at once, potentially hazardous) - fix retrieval of pre-encoded URLs - add ability to resample audio files on import, so as to match rates with other files previously loaded; add preference for same - add preliminary support in transform code for range and rate of transform input - reorganise preferences dialog, move dark-background option to preferences, add option for temporary directory location
author Chris Cannam
date Fri, 28 Sep 2007 13:56:38 +0000
parents f0c47d8988bc
children
comparison
equal deleted inserted replaced
179:dab257bd9d2d 180:98ba77e0d897
695 m_auditioningPlugin = plugin; 695 m_auditioningPlugin = plugin;
696 m_auditioningPluginBypassed = false; 696 m_auditioningPluginBypassed = false;
697 if (formerPlugin) m_pluginScavenger.claim(formerPlugin); 697 if (formerPlugin) m_pluginScavenger.claim(formerPlugin);
698 } 698 }
699 699
700 void
701 AudioCallbackPlaySource::setSoloModelSet(std::set<Model *> s)
702 {
703 m_audioGenerator->setSoloModelSet(s);
704 clearRingBuffers();
705 }
706
707 void
708 AudioCallbackPlaySource::clearSoloModelSet()
709 {
710 m_audioGenerator->clearSoloModelSet();
711 clearRingBuffers();
712 }
713
700 size_t 714 size_t
701 AudioCallbackPlaySource::getTargetSampleRate() const 715 AudioCallbackPlaySource::getTargetSampleRate() const
702 { 716 {
703 if (m_targetSampleRate) return m_targetSampleRate; 717 if (m_targetSampleRate) return m_targetSampleRate;
704 else return getSourceSampleRate(); 718 else return getSourceSampleRate();
1106 1120
1107 if (m_timeStretcher && m_timeStretcher->getRatio() < 0.4) { 1121 if (m_timeStretcher && m_timeStretcher->getRatio() < 0.4) {
1108 #ifdef DEBUG_AUDIO_PLAY_SOURCE 1122 #ifdef DEBUG_AUDIO_PLAY_SOURCE
1109 std::cout << "Using crappy converter" << std::endl; 1123 std::cout << "Using crappy converter" << std::endl;
1110 #endif 1124 #endif
1111 src_process(m_crapConverter, &data); 1125 err = src_process(m_crapConverter, &data);
1112 } else { 1126 } else {
1113 src_process(m_converter, &data); 1127 err = src_process(m_converter, &data);
1114 } 1128 }
1115 1129
1116 size_t toCopy = size_t(got * ratio + 0.1); 1130 size_t toCopy = size_t(got * ratio + 0.1);
1117 1131
1118 if (err) { 1132 if (err) {