Mercurial > hg > sonic-visualiser
comparison main/MainWindow.cpp @ 54:ec77936c268e
* Add system-specific LADSPA and DSSI plugin paths (for OS/X and Windows)
* Add ability to open more than one audio file at once from the command line
* Add plugin input source selection (with some caveats)
* Show name of file being decoded in Ogg/mp3 decode progress dialog
author | Chris Cannam |
---|---|
date | Thu, 12 Oct 2006 14:56:28 +0000 |
parents | 94f1c2747de4 |
children | ca1e3f5657d5 |
comparison
equal
deleted
inserted
replaced
53:94f1c2747de4 | 54:ec77936c268e |
---|---|
2280 } | 2280 } |
2281 } | 2281 } |
2282 } | 2282 } |
2283 | 2283 |
2284 bool | 2284 bool |
2285 MainWindow::openSomeFile(QString path) | 2285 MainWindow::openSomeFile(QString path, AudioFileOpenMode mode) |
2286 { | 2286 { |
2287 if (openAudioFile(path)) { | 2287 if (openAudioFile(path, mode)) { |
2288 return true; | 2288 return true; |
2289 } else if (openSessionFile(path)) { | 2289 } else if (openSessionFile(path)) { |
2290 return true; | 2290 return true; |
2291 } else { | 2291 } else { |
2292 return false; | 2292 return false; |
2991 } | 2991 } |
2992 } | 2992 } |
2993 } | 2993 } |
2994 } | 2994 } |
2995 | 2995 |
2996 bool ok = factory->getConfigurationForTransform(transform, | 2996 Model *inputModel = factory->getConfigurationForTransform(transform, |
2997 candidateInputModels, | 2997 candidateInputModels, |
2998 context, | 2998 context, |
2999 configurationXml, | 2999 configurationXml, |
3000 m_playSource); | 3000 m_playSource); |
3001 if (!ok) return; | 3001 if (!inputModel) return; |
3002 | |
3003 std::cerr << "Input model is " << inputModel << " \"" << inputModel->objectName().toStdString() << std::endl; | |
3002 | 3004 |
3003 Layer *newLayer = m_document->createDerivedLayer(transform, | 3005 Layer *newLayer = m_document->createDerivedLayer(transform, |
3004 m_document->getMainModel(), | 3006 inputModel, |
3005 context, | 3007 context, |
3006 configurationXml); | 3008 configurationXml); |
3007 | 3009 |
3008 if (newLayer) { | 3010 if (newLayer) { |
3009 m_document->addLayerToView(pane, newLayer); | 3011 m_document->addLayerToView(pane, newLayer); |