use lmmsconfig.h rather than config.h and use prefixed macro-names

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1097 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-06-08 11:30:47 +00:00
parent 6dcedad4f0
commit d6262bb556
81 changed files with 376 additions and 445 deletions

View File

@@ -40,27 +40,27 @@
#include "templates.h"
#ifdef HAVE_CONFIG_H
#ifdef LMMS_HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef HAVE_UNISTD_H
#ifdef LMMS_HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_FCNTL_H
#ifdef LMMS_HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
#ifdef LMMS_HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
#ifdef HAVE_STDLIB_H
#ifdef LMMS_HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_SYS_SOUNDCARD_H
#ifdef LMMS_HAVE_SYS_SOUNDCARD_H
// This is recommended by OSS
#include <sys/soundcard.h>
#elif HAVE_SOUNDCARD_H
#elif LMMS_HAVE_SOUNDCARD_H
// This is installed on some systems
#include <soundcard.h>
#endif

View File

@@ -25,10 +25,6 @@
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <Qt/QtXml>
#include <QtCore/QDir>
#include <QtCore/QFile>
@@ -50,7 +46,7 @@ configManager::configManager( void ) :
m_workingDir( QDir::home().absolutePath() + QDir::separator() +
"lmms" ),
m_dataDir( qApp->applicationDirPath()
#ifdef BUILD_WIN32
#ifdef LMMS_BUILD_WIN32
+ QDir::separator() + "data" + QDir::separator()
#else
.section( '/', 0, -2 ) + "/share/lmms/"
@@ -58,7 +54,7 @@ configManager::configManager( void ) :
),
m_artworkDir( defaultArtworkDir() ),
m_pluginDir( qApp->applicationDirPath()
#ifdef BUILD_WIN32
#ifdef LMMS_BUILD_WIN32
+ QDir::separator() + "plugins" + QDir::separator()
#else
.section( '/', 0, -2 ) + "/lib/lmms/"
@@ -136,7 +132,7 @@ void configManager::setLADSPADir( const QString & _fd )
void configManager::setSTKDir( const QString & _fd )
{
#ifdef HAVE_STK_H
#ifdef LMMS_HAVE_STK_H
m_stkDir = _fd;
#endif
}
@@ -314,7 +310,7 @@ bool configManager::loadConfigFile( void )
m_vstDir = value( "paths", "vstdir" );
m_flDir = value( "paths", "fldir" );
m_ladDir = value( "paths", "laddir" );
#ifdef HAVE_STK_H
#ifdef LMMS_HAVE_STK_H
m_stkDir = value( "paths", "stkdir" );
#endif
@@ -330,14 +326,14 @@ bool configManager::loadConfigFile( void )
if( m_ladDir == "" )
{
#ifdef BUILD_WIN32
#ifdef LMMS_BUILD_WIN32
m_ladDir = m_pluginDir + "ladspa" + QDir::separator();
#else
m_ladDir = "/usr/lib/ladspa/:/usr/local/lib/ladspa/";
#endif
}
#ifdef HAVE_STK_H
#ifdef LMMS_LMMS_HAVE_STK_H
if( m_stkDir == "" )
{
m_stkDir = "/usr/share/stk/rawwaves/";
@@ -360,14 +356,14 @@ void configManager::saveConfigFile( void )
setValue( "paths", "vstdir", m_vstDir );
setValue( "paths", "fldir", m_flDir );
setValue( "paths", "laddir", m_ladDir );
#ifdef HAVE_STK_H
#ifdef LMMS_HAVE_STK_H
setValue( "paths", "stkdir", m_stkDir );
#endif
QDomDocument doc( "lmms-config-file" );
QDomElement lmms_config = doc.createElement( "lmms" );
lmms_config.setAttribute( "version", VERSION );
lmms_config.setAttribute( "version", LMMS_VERSION );
doc.appendChild( lmms_config );
for( settingsMap::iterator it = m_settings.begin();

View File

@@ -238,7 +238,7 @@ void envelopeAndLFOParameters::resetLFO( void )
inline void FASTCALL envelopeAndLFOParameters::fillLFOLevel( float * _buf,
inline void envelopeAndLFOParameters::fillLFOLevel( float * _buf,
f_cnt_t _frame,
const fpp_t _frames )
{
@@ -272,9 +272,9 @@ inline void FASTCALL envelopeAndLFOParameters::fillLFOLevel( float * _buf,
void FASTCALL envelopeAndLFOParameters::fillLevel( float * _buf, f_cnt_t _frame,
const f_cnt_t _release_begin,
const fpp_t _frames )
void envelopeAndLFOParameters::fillLevel( float * _buf, f_cnt_t _frame,
const f_cnt_t _release_begin,
const fpp_t _frames )
{
if( _frame < 0 || _release_begin < 0 )
{

View File

@@ -162,7 +162,7 @@ void ladspaControl::setValue( LADSPA_Data _value )
void FASTCALL ladspaControl::saveSettings( QDomDocument & _doc,
void ladspaControl::saveSettings( QDomDocument & _doc,
QDomElement & _this,
const QString & _name )
{
@@ -190,7 +190,7 @@ void FASTCALL ladspaControl::saveSettings( QDomDocument & _doc,
void FASTCALL ladspaControl::loadSettings( const QDomElement & _this,
void ladspaControl::loadSettings( const QDomElement & _this,
const QString & _name )
{
if( m_link )
@@ -218,7 +218,7 @@ void FASTCALL ladspaControl::loadSettings( const QDomElement & _this,
void FASTCALL ladspaControl::linkControls( ladspaControl * _control )
void ladspaControl::linkControls( ladspaControl * _control )
{
switch( m_port->data_type )
{
@@ -270,7 +270,7 @@ void ladspaControl::tempoKnobChanged( void )
void FASTCALL ladspaControl::unlinkControls( ladspaControl * _control )
void ladspaControl::unlinkControls( ladspaControl * _control )
{
switch( m_port->data_type )
{
@@ -303,7 +303,7 @@ void ladspaControl::linkStateChanged( void )
void FASTCALL ladspaControl::setLink( bool _state )
void ladspaControl::setLink( bool _state )
{
m_linkEnabledModel.setValue( _state );
}

View File

@@ -41,7 +41,7 @@ ladspaManager::ladspaManager( void )
split( ':' );
ladspaDirectories += configManager::inst()->ladspaDir().split( ':' );
#ifndef BUILD_WIN32
#ifndef LMMS_BUILD_WIN32
ladspaDirectories.push_back( "/usr/lib/lmms/ladspa" );
ladspaDirectories.push_back( "/usr/local/lib/lmms/ladspa" );
ladspaDirectories.push_back( "/usr/lib/ladspa" );
@@ -58,7 +58,7 @@ ladspaManager::ladspaManager( void )
{
const QFileInfo & f = *file;
if( !f.isFile() ||
#ifdef BUILD_WIN32
#ifdef LMMS_BUILD_WIN32
f.fileName().right(3) != "dll"
#else
f.fileName().right(2) != "so"
@@ -124,7 +124,7 @@ ladspaManagerDescription * ladspaManager::getDescription(
void FASTCALL ladspaManager::addPlugins(
void ladspaManager::addPlugins(
LADSPA_Descriptor_Function _descriptor_func,
const QString & _file )
{
@@ -173,7 +173,7 @@ void FASTCALL ladspaManager::addPlugins(
Uint16 FASTCALL ladspaManager::getPluginInputs(
Uint16 ladspaManager::getPluginInputs(
const LADSPA_Descriptor * _descriptor )
{
Uint16 inputs = 0;
@@ -199,7 +199,7 @@ Uint16 FASTCALL ladspaManager::getPluginInputs(
Uint16 FASTCALL ladspaManager::getPluginOutputs(
Uint16 ladspaManager::getPluginOutputs(
const LADSPA_Descriptor * _descriptor )
{
Uint16 outputs = 0;
@@ -233,7 +233,7 @@ l_sortable_plugin_t ladspaManager::getSortedPlugins()
QString FASTCALL ladspaManager::getLabel( const ladspa_key_t & _plugin )
QString ladspaManager::getLabel( const ladspa_key_t & _plugin )
{
if( m_ladspaManagerMap.contains( _plugin ) )
{
@@ -253,7 +253,7 @@ QString FASTCALL ladspaManager::getLabel( const ladspa_key_t & _plugin )
bool FASTCALL ladspaManager::hasRealTimeDependency(
bool ladspaManager::hasRealTimeDependency(
const ladspa_key_t & _plugin )
{
if( m_ladspaManagerMap.contains( _plugin ) )
@@ -274,7 +274,7 @@ bool FASTCALL ladspaManager::hasRealTimeDependency(
bool FASTCALL ladspaManager::isInplaceBroken( const ladspa_key_t & _plugin )
bool ladspaManager::isInplaceBroken( const ladspa_key_t & _plugin )
{
if( m_ladspaManagerMap.contains( _plugin ) )
{
@@ -294,7 +294,7 @@ bool FASTCALL ladspaManager::isInplaceBroken( const ladspa_key_t & _plugin )
bool FASTCALL ladspaManager::isRealTimeCapable(
bool ladspaManager::isRealTimeCapable(
const ladspa_key_t & _plugin )
{
if( m_ladspaManagerMap.contains( _plugin ) )
@@ -315,7 +315,7 @@ bool FASTCALL ladspaManager::isRealTimeCapable(
QString FASTCALL ladspaManager::getName( const ladspa_key_t & _plugin )
QString ladspaManager::getName( const ladspa_key_t & _plugin )
{
if( m_ladspaManagerMap.contains( _plugin ) )
{
@@ -335,7 +335,7 @@ QString FASTCALL ladspaManager::getName( const ladspa_key_t & _plugin )
QString FASTCALL ladspaManager::getMaker( const ladspa_key_t & _plugin )
QString ladspaManager::getMaker( const ladspa_key_t & _plugin )
{
if( m_ladspaManagerMap.contains( _plugin ) )
{
@@ -355,7 +355,7 @@ QString FASTCALL ladspaManager::getMaker( const ladspa_key_t & _plugin )
QString FASTCALL ladspaManager::getCopyright( const ladspa_key_t & _plugin )
QString ladspaManager::getCopyright( const ladspa_key_t & _plugin )
{
if( m_ladspaManagerMap.contains( _plugin ) )
{
@@ -375,7 +375,7 @@ QString FASTCALL ladspaManager::getCopyright( const ladspa_key_t & _plugin )
Uint32 FASTCALL ladspaManager::getPortCount( const ladspa_key_t & _plugin )
Uint32 ladspaManager::getPortCount( const ladspa_key_t & _plugin )
{
if( m_ladspaManagerMap.contains( _plugin ) )
{
@@ -395,7 +395,7 @@ Uint32 FASTCALL ladspaManager::getPortCount( const ladspa_key_t & _plugin )
bool FASTCALL ladspaManager::isPortInput( const ladspa_key_t & _plugin,
bool ladspaManager::isPortInput( const ladspa_key_t & _plugin,
Uint32 _port )
{
if( m_ladspaManagerMap.contains( _plugin )
@@ -419,7 +419,7 @@ bool FASTCALL ladspaManager::isPortInput( const ladspa_key_t & _plugin,
bool FASTCALL ladspaManager::isPortOutput( const ladspa_key_t & _plugin,
bool ladspaManager::isPortOutput( const ladspa_key_t & _plugin,
Uint32 _port )
{
if( m_ladspaManagerMap.contains( _plugin )
@@ -443,7 +443,7 @@ bool FASTCALL ladspaManager::isPortOutput( const ladspa_key_t & _plugin,
bool FASTCALL ladspaManager::isPortAudio( const ladspa_key_t & _plugin,
bool ladspaManager::isPortAudio( const ladspa_key_t & _plugin,
Uint32 _port )
{
if( m_ladspaManagerMap.contains( _plugin )
@@ -467,7 +467,7 @@ bool FASTCALL ladspaManager::isPortAudio( const ladspa_key_t & _plugin,
bool FASTCALL ladspaManager::isPortControl( const ladspa_key_t & _plugin,
bool ladspaManager::isPortControl( const ladspa_key_t & _plugin,
Uint32 _port )
{
if( m_ladspaManagerMap.contains( _plugin )
@@ -491,7 +491,7 @@ bool FASTCALL ladspaManager::isPortControl( const ladspa_key_t & _plugin,
bool FASTCALL ladspaManager::areHintsSampleRateDependent(
bool ladspaManager::areHintsSampleRateDependent(
const ladspa_key_t & _plugin,
Uint32 _port )
{
@@ -516,7 +516,7 @@ bool FASTCALL ladspaManager::areHintsSampleRateDependent(
float FASTCALL ladspaManager::getLowerBound( const ladspa_key_t & _plugin,
float ladspaManager::getLowerBound( const ladspa_key_t & _plugin,
Uint32 _port )
{
if( m_ladspaManagerMap.contains( _plugin )
@@ -547,7 +547,7 @@ float FASTCALL ladspaManager::getLowerBound( const ladspa_key_t & _plugin,
float FASTCALL ladspaManager::getUpperBound( const ladspa_key_t & _plugin, Uint32 _port )
float ladspaManager::getUpperBound( const ladspa_key_t & _plugin, Uint32 _port )
{
if( m_ladspaManagerMap.contains( _plugin )
&& _port < getPortCount( _plugin ) )
@@ -577,7 +577,7 @@ float FASTCALL ladspaManager::getUpperBound( const ladspa_key_t & _plugin,
bool FASTCALL ladspaManager::isPortToggled( const ladspa_key_t & _plugin,
bool ladspaManager::isPortToggled( const ladspa_key_t & _plugin,
Uint32 _port )
{
if( m_ladspaManagerMap.contains( _plugin )
@@ -601,7 +601,7 @@ bool FASTCALL ladspaManager::isPortToggled( const ladspa_key_t & _plugin,
float FASTCALL ladspaManager::getDefaultSetting( const ladspa_key_t & _plugin,
float ladspaManager::getDefaultSetting( const ladspa_key_t & _plugin,
Uint32 _port )
{
if( m_ladspaManagerMap.contains( _plugin )
@@ -688,7 +688,7 @@ float FASTCALL ladspaManager::getDefaultSetting( const ladspa_key_t & _plugin,
bool FASTCALL ladspaManager::isLogarithmic( const ladspa_key_t & _plugin,
bool ladspaManager::isLogarithmic( const ladspa_key_t & _plugin,
Uint32 _port )
{
if( m_ladspaManagerMap.contains( _plugin )
@@ -712,7 +712,7 @@ bool FASTCALL ladspaManager::isLogarithmic( const ladspa_key_t & _plugin,
bool FASTCALL ladspaManager::isInteger( const ladspa_key_t & _plugin,
bool ladspaManager::isInteger( const ladspa_key_t & _plugin,
Uint32 _port )
{
if( m_ladspaManagerMap.contains( _plugin )
@@ -736,7 +736,7 @@ bool FASTCALL ladspaManager::isInteger( const ladspa_key_t & _plugin,
QString FASTCALL ladspaManager::getPortName( const ladspa_key_t & _plugin,
QString ladspaManager::getPortName( const ladspa_key_t & _plugin,
Uint32 _port )
{
if( m_ladspaManagerMap.contains( _plugin )
@@ -759,7 +759,7 @@ QString FASTCALL ladspaManager::getPortName( const ladspa_key_t & _plugin,
const void * FASTCALL ladspaManager::getImplementationData(
const void * ladspaManager::getImplementationData(
const ladspa_key_t & _plugin )
{
if( m_ladspaManagerMap.contains( _plugin ) )
@@ -780,7 +780,7 @@ const void * FASTCALL ladspaManager::getImplementationData(
const LADSPA_Descriptor * FASTCALL ladspaManager::getDescriptor(
const LADSPA_Descriptor * ladspaManager::getDescriptor(
const ladspa_key_t & _plugin )
{
if( m_ladspaManagerMap.contains( _plugin ) )
@@ -801,7 +801,7 @@ const LADSPA_Descriptor * FASTCALL ladspaManager::getDescriptor(
LADSPA_Handle FASTCALL ladspaManager::instantiate(
LADSPA_Handle ladspaManager::instantiate(
const ladspa_key_t & _plugin,
Uint32 _sample_rate )
{
@@ -824,7 +824,7 @@ LADSPA_Handle FASTCALL ladspaManager::instantiate(
bool FASTCALL ladspaManager::connectPort( const ladspa_key_t & _plugin,
bool ladspaManager::connectPort( const ladspa_key_t & _plugin,
LADSPA_Handle _instance,
Uint32 _port,
LADSPA_Data * _data_location )
@@ -850,7 +850,7 @@ bool FASTCALL ladspaManager::connectPort( const ladspa_key_t & _plugin,
bool FASTCALL ladspaManager::activate( const ladspa_key_t & _plugin,
bool ladspaManager::activate( const ladspa_key_t & _plugin,
LADSPA_Handle _instance )
{
if( m_ladspaManagerMap.contains( _plugin ) )
@@ -872,7 +872,7 @@ bool FASTCALL ladspaManager::activate( const ladspa_key_t & _plugin,
bool FASTCALL ladspaManager::run( const ladspa_key_t & _plugin,
bool ladspaManager::run( const ladspa_key_t & _plugin,
LADSPA_Handle _instance,
Uint32 _sample_count )
{
@@ -895,7 +895,7 @@ bool FASTCALL ladspaManager::run( const ladspa_key_t & _plugin,
bool FASTCALL ladspaManager::runAdding( const ladspa_key_t & _plugin,
bool ladspaManager::runAdding( const ladspa_key_t & _plugin,
LADSPA_Handle _instance,
Uint32 _sample_count )
{
@@ -919,7 +919,7 @@ bool FASTCALL ladspaManager::runAdding( const ladspa_key_t & _plugin,
bool FASTCALL ladspaManager::setRunAddingGain( const ladspa_key_t & _plugin,
bool ladspaManager::setRunAddingGain( const ladspa_key_t & _plugin,
LADSPA_Handle _instance,
LADSPA_Data _gain )
{
@@ -944,7 +944,7 @@ bool FASTCALL ladspaManager::setRunAddingGain( const ladspa_key_t & _plugin,
bool FASTCALL ladspaManager::deactivate( const ladspa_key_t & _plugin,
bool ladspaManager::deactivate( const ladspa_key_t & _plugin,
LADSPA_Handle _instance )
{
if( m_ladspaManagerMap.contains( _plugin ) )
@@ -966,7 +966,7 @@ bool FASTCALL ladspaManager::deactivate( const ladspa_key_t & _plugin,
bool FASTCALL ladspaManager::cleanup( const ladspa_key_t & _plugin,
bool ladspaManager::cleanup( const ladspa_key_t & _plugin,
LADSPA_Handle _instance )
{
if( m_ladspaManagerMap.contains( _plugin ) )

View File

@@ -35,7 +35,7 @@
#include <QtGui/QPainter>
#include <QtGui/QSplashScreen>
#ifdef HAVE_SCHED_H
#ifdef LMMS_HAVE_SCHED_H
#include <sched.h>
#endif
@@ -72,7 +72,7 @@ inline void loadTranslation( const QString & _tname,
int main( int argc, char * * argv )
{
#ifdef HAVE_SCHED_H
#ifdef LMMS_HAVE_SCHED_H
struct sched_param sparam;
sparam.sched_priority = ( sched_get_priority_max( SCHED_FIFO ) +
sched_get_priority_min( SCHED_FIFO ) ) / 2;
@@ -118,7 +118,7 @@ int main( int argc, char * * argv )
"modify it under the terms of the GNU General Public\n"
"License as published by the Free Software Foundation; either\n"
"version 2 of the License, or (at your option) any later version.\n\n"
"Try \"%s --help\" for more information.\n\n", PACKAGE_VERSION,
"Try \"%s --help\" for more information.\n\n", LMMS_PACKAGE_VERSION,
argv[0] );
return( EXIT_SUCCESS );
}
@@ -151,7 +151,7 @@ int main( int argc, char * * argv )
" default: 2\n"
"-v, --version show version information and exit.\n"
"-h, --help show this usage message and exit.\n\n",
PACKAGE_VERSION );
LMMS_PACKAGE_VERSION );
return( EXIT_SUCCESS );
}
else if( argc > i && ( QString( argv[i] ) == "--render" ||
@@ -293,7 +293,7 @@ int main( int argc, char * * argv )
QString pos = QLocale::system().name().left( 2 );
// load translation for Qt-widgets/-dialogs
loadTranslation( QString( "qt_" ) + pos,
QString( QT_TRANSLATIONS_DIR ) );
QString( LMMS_QT_TRANSLATIONS_DIR ) );
// load actual translation for LMMS
loadTranslation( pos );

View File

@@ -68,7 +68,7 @@ multimediaProject::multimediaProject( ProjectTypes _project_type ) :
root.setAttribute( "version", MMP_VERSION_STRING );
root.setAttribute( "type", typeName( _project_type ) );
root.setAttribute( "creator", "Linux MultiMedia Studio (LMMS)" );
root.setAttribute( "creatorversion", VERSION );
root.setAttribute( "creatorversion", LMMS_VERSION );
appendChild( root );
m_head = createElement( "head" );
@@ -172,7 +172,7 @@ multimediaProject::multimediaProject( const QString & _in_file_name,
}
if( _upgrade && root.hasAttribute( "creatorversion" )
&& root.attribute( "creatorversion" ) != VERSION )
&& root.attribute( "creatorversion" ) != LMMS_VERSION )
{
upgrade();
}

View File

@@ -147,7 +147,7 @@ void plugin::waitForWorkerThread( void )
void plugin::getDescriptorsOfAvailPlugins( QVector<descriptor> & _plugin_descs )
{
QDir directory( configManager::inst()->pluginDir() );
#ifdef BUILD_WIN32
#ifdef LMMS_BUILD_WIN32
QFileInfoList list = directory.entryInfoList(
QStringList( "*.dll" ) );
#else

View File

@@ -28,10 +28,6 @@
#include "sample_buffer.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <QtCore/QBuffer>
#include <QtCore/QFile>
#include <QtCore/QFileInfo>
@@ -42,23 +38,23 @@
#include <cstring>
#ifdef SDL_SDL_SOUND_H
#include SDL_SDL_SOUND_H
#ifdef LMMS_SDL_SDL_SOUND_H
#include LMMS_SDL_SDL_SOUND_H
#endif
#ifdef HAVE_SNDFILE_H
#ifdef LMMS_HAVE_SNDFILE_H
#include <sndfile.h>
#endif
#ifdef HAVE_VORBIS_VORBISFILE_H
#ifdef LMMS_HAVE_VORBIS_VORBISFILE_H
#include <vorbis/vorbisfile.h>
#endif
#ifdef HAVE_FLAC_STREAM_ENCODER_H
#ifdef LMMS_HAVE_FLAC_STREAM_ENCODER_H
#include <FLAC/stream_encoder.h>
#endif
#ifdef HAVE_FLAC_STREAM_DECODER_H
#ifdef LMMS_HAVE_FLAC_STREAM_DECODER_H
#include <FLAC/stream_decoder.h>
#endif
@@ -90,7 +86,7 @@ sampleBuffer::sampleBuffer( const QString & _audio_file,
m_frequency( BaseFreq ),
m_sampleRate( engine::getMixer()->baseSampleRate() )
{
#ifdef SDL_SDL_SOUND_H
#ifdef LMMS_SDL_SDL_SOUND_H
// init sound-file-system of SDL
Sound_Init();
#endif
@@ -125,7 +121,7 @@ sampleBuffer::sampleBuffer( const sampleFrame * _data, const f_cnt_t _frames ) :
memcpy( m_origData, _data, _frames * BYTES_PER_FRAME );
m_origFrames = _frames;
}
#ifdef SDL_SDL_SOUND_H
#ifdef LMMS_SDL_SDL_SOUND_H
// init sound-file-system of SDL
Sound_Init();
#endif
@@ -156,7 +152,7 @@ sampleBuffer::sampleBuffer( const f_cnt_t _frames ) :
memset( m_origData, 0, _frames * BYTES_PER_FRAME );
m_origFrames = _frames;
}
#ifdef SDL_SDL_SOUND_H
#ifdef LMMS_SDL_SDL_SOUND_H
// init sound-file-system of SDL
Sound_Init();
#endif
@@ -209,21 +205,21 @@ void sampleBuffer::update( bool _keep_settings )
m_frames = 0;
#ifdef HAVE_SNDFILE_H
#ifdef LMMS_HAVE_SNDFILE_H
if( m_frames == 0 )
{
m_frames = decodeSampleSF( f, buf, channels,
samplerate );
}
#endif
#ifdef HAVE_VORBIS_VORBISFILE_H
#ifdef LMMS_HAVE_VORBIS_VORBISFILE_H
if( m_frames == 0 )
{
m_frames = decodeSampleOGGVorbis( f, buf, channels,
samplerate );
}
#endif
#ifdef SDL_SDL_SOUND_H
#ifdef LMMS_SDL_SDL_SOUND_H
if( m_frames == 0 )
{
m_frames = decodeSampleSDL( f, buf, channels,
@@ -341,7 +337,7 @@ void sampleBuffer::normalizeSampleRate( const sample_rate_t _src_sr,
#ifdef SDL_SDL_SOUND_H
#ifdef LMMS_SDL_SDL_SOUND_H
f_cnt_t sampleBuffer::decodeSampleSDL( const char * _f,
int_sample_t * & _buf,
ch_cnt_t _channels,
@@ -376,7 +372,7 @@ f_cnt_t sampleBuffer::decodeSampleSDL( const char * _f,
#ifdef HAVE_SNDFILE_H
#ifdef LMMS_HAVE_SNDFILE_H
f_cnt_t sampleBuffer::decodeSampleSF( const char * _f,
int_sample_t * & _buf,
ch_cnt_t & _channels,
@@ -422,7 +418,7 @@ f_cnt_t sampleBuffer::decodeSampleSF( const char * _f,
#ifdef HAVE_VORBIS_VORBISFILE_H
#ifdef LMMS_HAVE_VORBIS_VORBISFILE_H
// callback-functions for reading ogg-file
@@ -576,7 +572,7 @@ f_cnt_t sampleBuffer::decodeSampleDS( const char * _f,
bool FASTCALL sampleBuffer::play( sampleFrame * _ab, handleState * _state,
bool sampleBuffer::play( sampleFrame * _ab, handleState * _state,
const fpp_t _frames,
const float _freq,
const bool _looped ) const
@@ -860,10 +856,10 @@ QString sampleBuffer::openAudioFile( void ) const
}
#undef HAVE_FLAC_STREAM_ENCODER_H /* not yet... */
#undef HAVE_FLAC_STREAM_DECODER_H
#undef LMMS_HAVE_FLAC_STREAM_ENCODER_H /* not yet... */
#undef LMMS_HAVE_FLAC_STREAM_DECODER_H
#ifdef HAVE_FLAC_STREAM_ENCODER_H
#ifdef LMMS_HAVE_FLAC_STREAM_ENCODER_H
FLAC__StreamEncoderWriteStatus flacStreamEncoderWriteCallback(
const FLAC__StreamEncoder *
/*_encoder*/,
@@ -900,7 +896,7 @@ void flacStreamEncoderMetadataCallback( const FLAC__StreamEncoder *,
QString & sampleBuffer::toBase64( QString & _dst ) const
{
#ifdef HAVE_FLAC_STREAM_ENCODER_H
#ifdef LMMS_HAVE_FLAC_STREAM_ENCODER_H
const f_cnt_t FRAMES_PER_BUF = 1152;
FLAC__StreamEncoder * flac_enc = FLAC__stream_encoder_new();
@@ -950,12 +946,12 @@ QString & sampleBuffer::toBase64( QString & _dst ) const
_dst );
#else /* HAVE_FLAC_STREAM_ENCODER_H */
#else /* LMMS_HAVE_FLAC_STREAM_ENCODER_H */
base64::encode( (const char *) m_data,
m_frames * sizeof( sampleFrame ), _dst );
#endif /* HAVE_FLAC_STREAM_ENCODER_H */
#endif /* LMMS_HAVE_FLAC_STREAM_ENCODER_H */
return( _dst );
}
@@ -1013,7 +1009,7 @@ void sampleBuffer::setAudioFile( const QString & _audio_file )
#ifdef HAVE_FLAC_STREAM_DECODER_H
#ifdef LMMS_HAVE_FLAC_STREAM_DECODER_H
struct flacStreamDecoderClientData
{
@@ -1112,7 +1108,7 @@ void sampleBuffer::loadFromBase64( const QString & _data )
int dsize = 0;
base64::decode( _data, &dst, &dsize );
#ifdef HAVE_FLAC_STREAM_DECODER_H
#ifdef LMMS_HAVE_FLAC_STREAM_DECODER_H
QByteArray orig_data = QByteArray::fromRawData( dst, dsize );
QBuffer ba_reader( &orig_data );
@@ -1152,7 +1148,7 @@ void sampleBuffer::loadFromBase64( const QString & _data )
m_origData = new sampleFrame[m_origFrames];
memcpy( m_origData, orig_data.data(), orig_data.size() );
#else /* HAVE_FLAC_STREAM_DECODER_H */
#else /* LMMS_HAVE_FLAC_STREAM_DECODER_H */
m_origFrames = dsize / sizeof( sampleFrame );
delete[] m_origData;

View File

@@ -25,22 +25,14 @@
*/
#include "song.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <math.h>
#include <QtCore/QFile>
#include <QtCore/QFileInfo>
#include <QtGui/QFileDialog>
#include <QtGui/QMessageBox>
#include <math.h>
#include "song.h"
#include "automation_track.h"
#include "automation_editor.h"
#include "bb_editor.h"

View File

@@ -32,11 +32,7 @@
#include <QtGui/QTextEdit>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "lmmsconfig.h"
#include "about_dialog.h"
#include "embed.h"
@@ -53,7 +49,7 @@ aboutDialog::aboutDialog() :
m_iconLbl->setGeometry( 10, 10, 64, 64 );
m_appNameLbl = new QLabel( tr( "Linux MultiMedia Studio %1"
).arg( VERSION ), this );
).arg( LMMS_VERSION ), this );
m_appNameLbl->setGeometry( 80, 30, 280, 20 );
m_aboutTabs = new QTabWidget( this );

View File

@@ -25,9 +25,6 @@
*/
#include "main_window.h"
#include <Qt/QtXml>
#include <QtGui/QApplication>
#include <QtGui/QCloseEvent>
@@ -39,12 +36,7 @@
#include <QtGui/QMessageBox>
#include <QtGui/QSplitter>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "main_window.h"
#include "bb_editor.h"
#include "song_editor.h"
#include "song.h"
@@ -499,7 +491,7 @@ void mainWindow::resetWindowTitle( void )
{
title += '*';
}
setWindowTitle( title + " - " + tr( "LMMS %1" ).arg( VERSION ) );
setWindowTitle( title + " - " + tr( "LMMS %1" ).arg( LMMS_VERSION ) );
}

View File

@@ -2746,7 +2746,7 @@ noteVector::const_iterator pianoRoll::noteIteratorUnderMouse( void )
#ifdef BUILD_LINUX
#ifdef LMMS_BUILD_LINUX
bool pianoRoll::x11Event( XEvent * _xe )
{
if( validPattern() )

View File

@@ -106,7 +106,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
m_artworkDir( configManager::inst()->artworkDir() ),
m_flDir( configManager::inst()->flDir() ),
m_ladDir( configManager::inst()->ladspaDir() ),
#ifdef HAVE_STK_H
#ifdef LMMS_HAVE_STK_H
m_stkDir( configManager::inst()->stkDir() ),
#endif
m_disableChActInd( configManager::inst()->value( "ui",
@@ -133,7 +133,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
m_tabBar->setFixedWidth( 72 );
QWidget * ws = new QWidget( settings );
#ifdef HAVE_STK_H
#ifdef LMMS_HAVE_STK_H
ws->setFixedSize( 360, 422 );
#else
ws->setFixedSize( 360, 366 );
@@ -260,7 +260,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
QWidget * directories = new QWidget( ws );
#ifdef HAVE_STK_H
#ifdef LMMS_HAVE_STK_H
directories->setFixedSize( 360, 372 );
#else
directories->setFixedSize( 360, 326 );
@@ -364,7 +364,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
connect( laddir_select_btn, SIGNAL( clicked() ), this,
SLOT( openLADSPADir() ) );
#ifdef HAVE_STK_H
#ifdef LMMS_HAVE_STK_H
// STK-dir
tabWidget * stk_tw = new tabWidget( tr(
"STK rawwave directory" ).toUpper(),
@@ -394,7 +394,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
dir_layout->addWidget( fl_tw );
dir_layout->addSpacing( 10 );
dir_layout->addWidget( lad_tw );
#ifdef HAVE_STK_H
#ifdef LMMS_HAVE_STK_H
dir_layout->addSpacing( 10 );
dir_layout->addWidget( stk_tw );
#endif
@@ -708,7 +708,7 @@ void setupDialog::accept( void )
configManager::inst()->setArtworkDir( m_artworkDir );
configManager::inst()->setFLDir( m_flDir );
configManager::inst()->setLADSPADir( m_ladDir );
#ifdef HAVE_STK_H
#ifdef LMMS_HAVE_STK_H
configManager::inst()->setSTKDir( m_stkDir );
#endif
@@ -982,7 +982,7 @@ void setupDialog::openLADSPADir( void )
void setupDialog::openSTKDir( void )
{
#ifdef HAVE_STK_H
#ifdef LMMS_HAVE_STK_H
QString new_dir = QFileDialog::getExistingDirectory( this,
tr( "Choose STK rawwave directory" ),
m_ladDir );
@@ -1014,7 +1014,7 @@ void setupDialog::setLADSPADir( const QString & _fd )
void setupDialog::setSTKDir( const QString & _fd )
{
#ifdef HAVE_STK_H
#ifdef LMMS_HAVE_STK_H
m_stkDir = _fd;
#endif
}

View File

@@ -25,16 +25,6 @@
*/
#include "song_editor.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <math.h>
#include <QtCore/QFile>
#include <QtCore/QFileInfo>
#include <QtGui/QAction>
@@ -48,7 +38,9 @@
#include <QtGui/QScrollBar>
#include <QtGui/QStatusBar>
#include <math.h>
#include "song_editor.h"
#include "automatable_slider.h"
#include "bb_editor.h"
#include "bb_track.h"

View File

@@ -506,7 +506,7 @@ QString instrumentTrack::displayName( void ) const
bool FASTCALL instrumentTrack::play( const midiTime & _start,
bool instrumentTrack::play( const midiTime & _start,
const fpp_t _frames,
const f_cnt_t _offset,
Sint16 _tco_num )