Refactor supportedFileExts from AudioFileProcessor

Refactor supported file extensions from AudioFileProcessor to
sampleBuffer, where the magic really happens. Change the hard-
coded MessageBox explaining supported formats to the real deal.
Also added modelines and switched spaces to tabs in the files
affected.
This commit is contained in:
Andrew Kelley
2009-07-16 04:34:11 -07:00
parent c7205351c2
commit 2aae228af4
8 changed files with 57 additions and 21 deletions

View File

@@ -46,9 +46,6 @@
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
static const char * __supportedExts[] =
{ "wav", "ogg", "ds", "spx", "au", "voc", "aif", "aiff", "flac", "raw", "mp3",
NULL };
extern "C"
{
@@ -65,7 +62,7 @@ plugin::descriptor PLUGIN_EXPORT audiofileprocessor_plugin_descriptor =
0x0100,
plugin::Instrument,
new pluginPixmapLoader( "logo" ),
__supportedExts,
sampleBuffer::supportedExts,
NULL
} ;
@@ -222,8 +219,8 @@ void audioFileProcessor::setAudioFile( const QString & _audio_file,
{
// is current channel-name equal to previous-filename??
if( _rename && ( getInstrumentTrack()->name() ==
QFileInfo( m_sampleBuffer.audioFile() ).fileName() ||
m_sampleBuffer.audioFile() == "" ) )
QFileInfo( m_sampleBuffer.audioFile() ).fileName() ||
m_sampleBuffer.audioFile() == "" ) )
{
// then set it to new one
getInstrumentTrack()->setName( QFileInfo( _audio_file).fileName() );
@@ -503,3 +500,4 @@ plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
#include "moc_audio_file_processor.cxx"
/* vim: set tw=0 expandtab: */

View File

@@ -1,6 +1,6 @@
/*
* audio_file_processor.h - declaration of class audioFileProcessor
* (instrument-plugin for using audio-files)
* (instrument-plugin for using audio-files)
*
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -128,3 +128,5 @@ private:
#endif
/* vim: set tw=0 noexpandtab: */