i have remove the direct dependence's to libflac. now, hydrogen is able to load
all file formats via the sndfile library.
this means that i have remove the hydrogen own flac-file class. also i have
rename some methods. for example load_wav() is now load_sndfile().
i have include a sndfile versions-check in sconstruct. if libsndfile < 1.0.18
we interrupt the build process and print an corresponding error message.
next step is to add ogg support. to get ogg support we only have to include the
ogg extension into the qfile dialog extension filter. very easy!!
most newer distributions use libsndfile <= 1.0.18.
i know one important distrubutions (ubuntu hardy lts) use 1.0.17. but if you
love the stability from your old hardy lts system than you will not install
newer software. i think in this case you use the stable 0.9.3 version.
imo, for the new 0.9.5 release we can do this step. last year i talk about this
and we decide to wait. but now it is time for it!!!
here is the patch which remove the old h2 flac loader. if nobody have anything
against this enhancement i will commit it to trunk in some days.
Index: gui/gui.pro
===================================================================
--- gui/gui.pro (Revision 1953)
+++ gui/gui.pro (Arbeitskopie)
@@ -26,7 +26,6 @@
INCLUDEPATH += ../3rdparty/install/include
#INCLUDEPATH += ../3rdparty/install/libs/libpthread
#INCLUDEPATH += ../3rdparty/install/libs/libsndfile
- #INCLUDEPATH += ../3rdparty/install/libs/flac
#INCLUDEPATH += ../3rdparty/install/libs/portaudio
#INCLUDEPATH += ../3rdparty/install/libs/portmidi
INCLUDEPATH += ../../../source/pthreads-w32-2-8-0-release
@@ -38,8 +37,6 @@
}
#old windows libs..
-#LIBS += ../libflac++.lib ../libflac++_dynamic.lib ../libflac++_static.lib ../libflac.lib winmm.lib
-#LIBS += ../libflac++_static.lib ../libflac_static.lib winmm.lib
#LIBS += ../optarg.lib
#LIBS += ../ogg_static.lib
#LIBS += ../pm_dll.lib
Index: gui/src/InstrumentEditor/InstrumentEditor.cpp
===================================================================
--- gui/src/InstrumentEditor/InstrumentEditor.cpp (Revision 1953)
+++ gui/src/InstrumentEditor/InstrumentEditor.cpp (Arbeitskopie)
@@ -884,16 +884,16 @@
pEngine->m_pan.push_back( panvector );
}
- Sample *newSample = Sample::load_edit_wave( filename,
- startframe,
- loopframe,
- endframe,
- loops,
- mode,
- userubber,
- rd,
- csettings,
- rpitch);
+ Sample *newSample = Sample::load_edit_sndfile( filename,
+ startframe,
+ loopframe,
+ endframe,
+ loops,
+ mode,
+ userubber,
+ rd,
+ csettings,
+ rpitch);
if( !newSample ){
continue;
Index: gui/src/SampleEditor/SampleEditor.cpp
===================================================================
--- gui/src/SampleEditor/SampleEditor.cpp (Revision 1953)
+++ gui/src/SampleEditor/SampleEditor.cpp (Arbeitskopie)
@@ -374,16 +374,16 @@
if ( !m_pSampleEditorStatus ){
- Sample *editSample = Sample::load_edit_wave( m_samplename,
- m_start_frame,
- m_loop_frame,
- m_end_frame,
- m_repeats,
- m_sample_mode,
- m_pUseRubber,
- m_pRubberDivider,
- m_pRubberbandCsettings,
- m_ppitch);
+ Sample *editSample = Sample::load_edit_sndfile( m_samplename,
+ m_start_frame,
+ m_loop_frame,
+ m_end_frame,
+ m_repeats,
+ m_sample_mode,
+ m_pUseRubber,
+ m_pRubberDivider,
+ m_pRubberbandCsettings,
+ m_ppitch);
if( editSample == NULL ){
return;
Index: libs/hydrogen/include/hydrogen/sample.h
===================================================================
--- libs/hydrogen/include/hydrogen/sample.h (Revision 1953)
+++ libs/hydrogen/include/hydrogen/sample.h (Arbeitskopie)
@@ -121,7 +121,7 @@
static Sample* load( const QString& filename );
/// Loads an modified sample
- static Sample* load_edit_wave( const QString& filename,
+ static Sample* load_edit_sndfile( const QString& filename,
const unsigned startframe,
const unsigned loppframe,
const unsigned endframe,
@@ -239,12 +239,9 @@
//static int __total_used_bytes;
- /// loads a wave file
- static Sample* load_wave( const QString& filename );
+ /// loads a file
+ static Sample* load_sndfile( const QString& filename );
- /// loads a FLAC file
- static Sample* load_flac( const QString& filename );
- Sample *tempsample;
};
Index: libs/hydrogen/src/song.cpp
===================================================================
--- libs/hydrogen/src/song.cpp (Revision 1953)
+++ libs/hydrogen/src/song.cpp (Arbeitskopie)
@@ -520,16 +520,16 @@
panNode = panNode.nextSiblingElement( "pan" );
}
- pSample = Sample::load_edit_wave( sFilename,
- sStartframe,
- sLoopFrame,
- sEndframe,
- sLoops,
- sMode,
- sUseRubber,
- sRubberDivider,
- sRubberCsettings,
- sRubberPitch);
+ pSample = Sample::load_edit_sndfile( sFilename,
+ sStartframe,
+ sLoopFrame,
+ sEndframe,
+ sLoops,
+ sMode,
+ sUseRubber,
+ sRubberDivider,
+ sRubberCsettings,
+ sRubberPitch);
}
if ( pSample == NULL ) {
ERRORLOG( "Error loading sample: " + sFilename + " not found" );
Index: libs/hydrogen/src/flac_file.h
===================================================================
--- libs/hydrogen/src/flac_file.h (Revision 1953)
+++ libs/hydrogen/src/flac_file.h (Arbeitskopie)
@@ -1,48 +0,0 @@
-/*
- * Hydrogen
- * Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
- *
- * http://www.hydrogen-music.org
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-#ifndef FLAC_FILE_H
-#define FLAC_FILE_H
-
-#include <hydrogen/Object.h>
-#include <string>
-
-namespace H2Core
-{
-
-class Sample;
-
-/// \todo: impostare il samplerate in load()
-/// Class for FLAC file handling
-class FLACFile : public Object
-{
-public:
- FLACFile();
- ~FLACFile();
-
- Sample* load( const QString& sFilename );
-};
-
-};
-
-#endif
-
Index: libs/hydrogen/src/flac_file.cpp
===================================================================
--- libs/hydrogen/src/flac_file.cpp (Revision 1953)
+++ libs/hydrogen/src/flac_file.cpp (Arbeitskopie)
@@ -1,247 +0,0 @@
-/*
- * Hydrogen
- * Copyright(c) 2002-2008 by Alex >Comix< Cominu [[email protected]]
- *
- * http://www.hydrogen-music.org
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-#include "flac_file.h"
-#include <hydrogen/sample.h>
-
-#include <vector>
-#include <fstream>
-
-#ifdef FLAC_SUPPORT
-
-//#include "FLAC/file_decoder.h"
-#include <FLAC++/all.h>
-
-namespace H2Core
-{
-
-
-#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8
-#define LEGACY_FLAC
-#else
-#undef LEGACY_FLAC
-#endif
-
-
-
-
-/// Reads a FLAC file...not optimized yet
-class FLACFile_real : public FLAC::Decoder::File, public Object
-{
-public:
- FLACFile_real();
- ~FLACFile_real();
-
- void load( const QString& filename );
- Sample* getSample();
-
-protected:
- virtual ::FLAC__StreamDecoderWriteStatus write_callback( const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[] );
- virtual void metadata_callback( const ::FLAC__StreamMetadata *metadata );
- virtual void error_callback( ::FLAC__StreamDecoderErrorStatus status );
-
-private:
- std::vector<float> m_audioVect_L;
- std::vector<float> m_audioVect_R;
- QString m_sFilename;
-};
-
-
-
-FLACFile_real::FLACFile_real()
- : Object( "FLACFile_real" )
-{
-// infoLog( "INIT" );
-}
-
-
-
-FLACFile_real::~FLACFile_real()
-{
-// infoLog( "DESTROY" );
-}
-
-
-
-::FLAC__StreamDecoderWriteStatus FLACFile_real::write_callback( const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[] )
-{
- int nChannelCount = get_channels();
- int nBits = get_bits_per_sample();
-
- if ( ( nChannelCount != 1 ) && ( nChannelCount != 2 ) ) {
- ERRORLOG( QString( "wrong number of channels. nChannelCount=%1" ).arg( nChannelCount ) );
- return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
- }
-
- unsigned nFrames = frame->header.blocksize;
-
- if ( nBits == 16 ) {
- if ( nChannelCount == 1 ) { // mono
- const FLAC__int32* data = buffer[0];
-
- for ( unsigned i = 0; i < nFrames; i++ ) {
- m_audioVect_L.push_back( data[i] / 32768.0 );
- m_audioVect_R.push_back( data[i] / 32768.0 );
- }
- } else { // stereo
- const FLAC__int32* data_L = buffer[0];
- const FLAC__int32* data_R = buffer[1];
-
- for ( unsigned i = 0; i < nFrames; i++ ) {
- m_audioVect_L.push_back( ( float )data_L[i] / 32768.0 );
- m_audioVect_R.push_back( ( float )data_R[i] / 32768.0 );
- }
- }
- } else if ( nBits == 24 ) {
- if ( nChannelCount == 1 ) { // mono
- const FLAC__int32* data = buffer[0];
-
- for ( unsigned i = 0; i < nFrames; i++ ) {
- m_audioVect_L.push_back( ( float )data[i] / 8388608.0 );
- m_audioVect_R.push_back( ( float )data[i] / 8388608.0 );
- }
- } else { // stereo
- const FLAC__int32* data_L = buffer[0];
- const FLAC__int32* data_R = buffer[1];
-
- for ( unsigned i = 0; i < nFrames; i++ ) {
- m_audioVect_L.push_back( ( float )data_L[i] / 8388608.0 );
- m_audioVect_R.push_back( ( float )data_R[i] / 8388608.0 );
- }
- }
- } else {
- ERRORLOG( QString( "[write_callback] FLAC format error. nBits=%1" ).arg( nBits ) );
- }
-
- return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
-}
-
-
-
-void FLACFile_real::metadata_callback( const ::FLAC__StreamMetadata *metadata )
-{
- UNUSED( metadata );
-}
-
-
-
-void FLACFile_real::error_callback( ::FLAC__StreamDecoderErrorStatus status )
-{
- UNUSED( status );
- ERRORLOG( "[error_callback]" );
-}
-
-
-
-void FLACFile_real::load( const QString& sFilename )
-{
- m_sFilename = sFilename;
-
- // file exists?
- QFile check( sFilename );
- if ( !check.exists() ) {
- ERRORLOG( QString( "file %1 not found" ).arg( sFilename ) );
- return;
- } else {
- /// \todo: devo chiudere il file?
- }
-
- set_metadata_ignore_all();
-
-#ifdef LEGACY_FLAC
- set_filename( sFilename.toLocal8Bit() );
-
- State s=init();
- if ( s != FLAC__FILE_DECODER_OK ) {
-#else
- FLAC__StreamDecoderInitStatus s = init( sFilename.toLocal8Bit() );
- if ( s!=FLAC__STREAM_DECODER_INIT_STATUS_OK ) {
-#endif
- ERRORLOG( "Error in init()" );
- }
-
-#ifdef LEGACY_FLAC
- if ( process_until_end_of_file() == false ) {
- ERRORLOG( "Error in process_until_end_of_file(). Filename: " + m_sFilename );
- }
-#else
- if ( process_until_end_of_stream() == false ) {
- ERRORLOG( "[load] Error in process_until_end_of_stream()" );
- }
-#endif
-}
-
-
-
-Sample* FLACFile_real::getSample() {
- //infoLog( "[getSample]" );
- Sample *pSample = NULL;
-
- if ( m_audioVect_L.size() == 0 ) {
- // there were errors loading the file
- return NULL;
- }
-
-
- int nFrames = m_audioVect_L.size();
- float *data_L = new float[nFrames];
- float *data_R = new float[nFrames];
-
- memcpy( data_L, &m_audioVect_L[ 0 ], nFrames * sizeof( float ) );
- memcpy( data_R, &m_audioVect_R[ 0 ], nFrames * sizeof( float ) );
- pSample = new Sample( nFrames, m_sFilename, get_sample_rate(), data_L, data_R );
-
- return pSample;
-}
-
-// :::::::::::::::::::::::::::::
-
-
-
-
-FLACFile::FLACFile()
- : Object( "FLACFile" ) {
- //infoLog( "INIT" );
-}
-
-
-FLACFile::~FLACFile() {
- //infoLog( "DESTROY" );
-}
-
-
-
-Sample* FLACFile::load( const QString& sFilename ) {
- //infoLog( "[load] " + sFilename );
-
- FLACFile_real *pFile = new FLACFile_real();
- pFile->load( sFilename );
- Sample *pSample = pFile->getSample();
- delete pFile;
-
- return pSample;
-}
-
-};
-
-#endif // FLAC_SUPPORT
-
Index: libs/hydrogen/src/sample.cpp
===================================================================
--- libs/hydrogen/src/sample.cpp (Revision 1953)
+++ libs/hydrogen/src/sample.cpp (Arbeitskopie)
@@ -24,8 +24,6 @@
#include <hydrogen/hydrogen.h>
#include <hydrogen/Preferences.h>
-#include "flac_file.h"
-
#include <sndfile.h>
#include <iostream>
#include <fstream>
@@ -91,31 +89,13 @@
Sample* Sample::load( const QString& filename )
{
- // is it a flac file?
- if ( ( filename.endsWith( "flac") ) || ( filename.endsWith( "FLAC" )) ) {
- return load_flac( filename );
- } else {
- return load_wave( filename );
- }
-}
+ return load_sndfile( filename );
-
-/// load a FLAC file
-Sample* Sample::load_flac( const QString& filename )
-{
-#ifdef FLAC_SUPPORT
- FLACFile file;
- return file.load( filename );
-#else
- _ERRORLOG("[loadFLAC] FLAC support was disabled during compilation");
- return NULL;
-#endif
}
-
-Sample* Sample::load_wave( const QString& filename )
+Sample* Sample::load_sndfile( const QString& filename )
{
// file exists?
if ( QFile( filename ).exists() == false ) {
@@ -160,16 +140,16 @@
}
-Sample* Sample::load_edit_wave( const QString& filename,
- const unsigned startframe,
- const unsigned loppframe,
- const unsigned endframe,
- const int loops,
- const QString loopmode,
- bool use_rubberband,
- float rubber_divider,
- int rubberbandCsettings,
- float rubber_pitch)
+Sample* Sample::load_edit_sndfile( const QString& filename,
+ const unsigned startframe,
+ const unsigned loopframe,
+ const unsigned endframe,
+ const int loops,
+ const QString loopmode,
+ bool use_rubberband,
+ float rubber_divider,
+ int rubberbandCsettings,
+ float rubber_pitch)
{
//set the path to rubberband-cli
QString program = Preferences::get_instance()->m_rubberBandCLIexecutable;
@@ -191,11 +171,11 @@
SF_INFO soundInfo;
SNDFILE* file = sf_open( filename.toLocal8Bit(), SFM_READ, &soundInfo );
if ( !file ) {
- _INFOLOG( QString( "[Sample::load] File not found or flacfile %1" ).arg( filename ) );
+ _INFOLOG( QString( "[Sample::load] File not: %1" ).arg( filename ) );
}
unsigned onesamplelength = endframe - startframe;
- unsigned looplength = endframe - loppframe;
+ unsigned looplength = endframe - loopframe;
unsigned repeatslength = looplength * loops;
unsigned newlength = 0;
if (onesamplelength == looplength){
@@ -208,54 +188,39 @@
float *origdata_l;
float *origdata_r;
- bool isflac = false;
- unsigned samplerate = 0;
- if ( ( filename.endsWith( "flac") ) || ( filename.endsWith( "FLAC" ) ) ){
- Sample *tmpSample = load_flac( filename );
- _INFOLOG( QString( "File is flac" ) );
- unsigned nframes = tmpSample->get_n_frames();
- origdata_l = new float[ nframes ];
- origdata_r = new float[ nframes ];
- for ( unsigned i = 0; i < nframes; i++ ) {
- origdata_l[i] = tmpSample->__data_l[i];
- origdata_r[i] = tmpSample->__data_r[i];
- }
- samplerate = tmpSample->__sample_rate;
- isflac = true;
- delete tmpSample;
- }else{
- float *pTmpBuffer = new float[ soundInfo.frames * soundInfo.channels ];
+ unsigned samplerate = 0;
+ float *pTmpBuffer = new float[ soundInfo.frames * soundInfo.channels ];
- //int res = sf_read_float( file, pTmpBuffer, soundInfo.frames * soundInfo.channels );
- sf_read_float( file, pTmpBuffer, soundInfo.frames * soundInfo.channels );
- sf_close( file );
- samplerate = soundInfo.samplerate;
- origdata_l = new float[ soundInfo.frames ];
- origdata_r = new float[ soundInfo.frames ];
+ //int res = sf_read_float( file, pTmpBuffer, soundInfo.frames * soundInfo.channels );
+ sf_read_float( file, pTmpBuffer, soundInfo.frames * soundInfo.channels );
+ sf_close( file );
+ samplerate = soundInfo.samplerate;
+ origdata_l = new float[ soundInfo.frames ];
+ origdata_r = new float[ soundInfo.frames ];
- if ( soundInfo.channels == 1 ) { // MONO sample
- for ( long int i = 0; i < soundInfo.frames; i++ ) {
- origdata_l[i] = pTmpBuffer[i];
- origdata_r[i] = pTmpBuffer[i];
- }
- } else if ( soundInfo.channels == 2 ) { // STEREO sample
- for ( long int i = 0; i < soundInfo.frames; i++ ) {
- origdata_l[i] = pTmpBuffer[i * 2];
- origdata_r[i] = pTmpBuffer[i * 2 + 1];
- }
- }
- delete[] pTmpBuffer;
- }
+ if ( soundInfo.channels == 1 ) { // MONO sample
+ for ( long int i = 0; i < soundInfo.frames; i++ ) {
+ origdata_l[i] = pTmpBuffer[i];
+ origdata_r[i] = pTmpBuffer[i];
+ }
+ } else if ( soundInfo.channels == 2 ) { // STEREO sample
+ for ( long int i = 0; i < soundInfo.frames; i++ ) {
+ origdata_l[i] = pTmpBuffer[i * 2];
+ origdata_r[i] = pTmpBuffer[i * 2 + 1];
+ }
+ }
+ delete[] pTmpBuffer;
+
float *tempdata_l = new float[ newlength ];
float *tempdata_r = new float[ newlength ];
float *looptempdata_l = new float[ looplength ];
float *looptempdata_r = new float[ looplength ];
- long int z = loppframe;
+ long int z = loopframe;
long int y = startframe;
for ( unsigned i = 0; i < newlength; i++){ //first vector
@@ -282,12 +247,12 @@
reverse(looptempdata_r, looptempdata_r + looplength);
}
- if ( loopmode == "reverse" && loops > 0 && startframe == loppframe ){
+ if ( loopmode == "reverse" && loops > 0 && startframe == loopframe ){
reverse( tempdata_l, tempdata_l + onesamplelength );
reverse( tempdata_r, tempdata_r + onesamplelength );
}
- if ( loopmode == "pingpong" && startframe == loppframe){
+ if ( loopmode == "pingpong" && startframe == loopframe){
reverse(looptempdata_l, looptempdata_l + looplength);
reverse(looptempdata_r, looptempdata_r + looplength);
}
@@ -295,7 +260,7 @@
for ( int i = 0; i< loops ;i++){
unsigned tempdataend = onesamplelength + ( looplength * i );
- if ( startframe == loppframe ){
+ if ( startframe == loopframe ){
copy( looptempdata_l, looptempdata_l+looplength ,tempdata_l+tempdataend );
copy( looptempdata_r, looptempdata_r+looplength ,tempdata_r+tempdataend );
}
@@ -303,7 +268,7 @@
reverse(looptempdata_l, looptempdata_l + looplength);
reverse(looptempdata_r, looptempdata_r + looplength);
}
- if ( startframe != loppframe ){
+ if ( startframe != loopframe ){
copy( looptempdata_l, looptempdata_l+looplength ,tempdata_l+tempdataend );
copy( looptempdata_r, looptempdata_r+looplength ,tempdata_r+tempdataend );
}
@@ -311,8 +276,8 @@
}
if ( loops == 0 && loopmode == "reverse" ){
- reverse( tempdata_l + loppframe, tempdata_l + newlength);
- reverse( tempdata_r + loppframe, tempdata_r + newlength);
+ reverse( tempdata_l + loopframe, tempdata_l + newlength);
+ reverse( tempdata_r + loopframe, tempdata_r + newlength);
}
//create new sample
@@ -525,7 +490,7 @@
pSample->__sample_is_modified = true;
pSample->__sample_mode = loopmode;
pSample->__start_frame = startframe;
- pSample->__loop_frame = loppframe;
+ pSample->__loop_frame = loopframe;
pSample->__end_frame = endframe;
pSample->__repeats = loops;
pSample->__use_rubber = true;
@@ -548,7 +513,7 @@
pSample->__sample_is_modified = true;
pSample->__sample_mode = loopmode;
pSample->__start_frame = startframe;
- pSample->__loop_frame = loppframe;
+ pSample->__loop_frame = loopframe;
pSample->__end_frame = endframe;
pSample->__repeats = loops;
Index: libs/hydrogen/hydrogen.pro
===================================================================
--- libs/hydrogen/hydrogen.pro (Revision 1953)
+++ libs/hydrogen/hydrogen.pro (Arbeitskopie)
@@ -1,147 +1,146 @@
-######################################################################
-# Automatically generated by qmake (2.01a) ke 25. helmi 19:42:59 2009
-######################################################################
-include (../../features.pri)
-TEMPLATE = lib
-TARGET = libhydrogen
-
-
-QMAKE_CXXFLAGS_RELEASE += -g -Wall
-QMAKE_CXXFLAGS_DEBUG += -g -Wall
-
-QT += xml
-CONFIG += qt warn_on thread staticlib precompile_header
-DESTDIR = ..
-
-INCLUDEPATH += ../.. include
-INCLUDEPATH += ../../portaudio/include
-
-OBJECTS_DIR = objs
-win32 {
- INCLUDEPATH +=
- INCLUDEPATH += ../../3rdparty/libsndfile-1_0_17
- INCLUDEPATH += "C:/Program Files/GnuWin32/include"
- LIBS += "C:\Program Files\GnuWin32\lib\libarchive.lib"
- LIBS += "C:\Program Files\Mega-Nerd\libsndfile\libsndfile-1.lib"
- LIBS += "C:\MinGW\bin\pthread.dll"
- LIBS += ../../portaudio/portaudio_x86.dll
-}
-DEFINES += $$H2DEFINES
-
-DEPENDPATH += . \
- src \
- include\hydrogen \
- src\fx \
- src\IO \
- src\lash \
- src\sampler \
- src\sequencer \
- src\smf \
- src\synth \
- src\table \
- src\xml \
- include\hydrogen\fx \
- include\hydrogen\IO \
- include\hydrogen\sampler \
- include\hydrogen\smf \
- include\hydrogen\synth
-
-INCLUDEPATH += .
-PRECOMPILED_HEADER = src/precompiled.h
-# Input
-HEADERS += src/flac_file.h \
- src/Precompiled.h \
- include/hydrogen/action.h \
- include/hydrogen/adsr.h \
- include/hydrogen/audio_engine.h \
- include/hydrogen/data_path.h \
- include/hydrogen/event_queue.h \
- include/hydrogen/globals.h \
- include/hydrogen/h2_exception.h \
- include/hydrogen/hydrogen.h \
- include/hydrogen/instrument.h \
- include/hydrogen/LashClient.h \
- include/hydrogen/LocalFileMng.h \
- include/hydrogen/midiMap.h \
- include/hydrogen/note.h \
- include/hydrogen/Object.h \
- include/hydrogen/Pattern.h \
- include/hydrogen/playlist.h \
- include/hydrogen/Preferences.h \
- include/hydrogen/sample.h \
- include/hydrogen/Song.h \
- include/hydrogen/SoundLibrary.h \
- include/hydrogen/timehelper.h \
- include/hydrogen/util.h \
- src/IO/AlsaAudioDriver.h \
- src/IO/AlsaMidiDriver.h \
- src/IO/CoreAudioDriver.h \
- src/IO/DiskWriterDriver.h \
- src/IO/FakeDriver.h \
- src/IO/OssDriver.h \
- src/IO/PortAudioDriver.h \
- src/IO/PortMidiDriver.h \
- src/table/getTableValue.h \
- src/table/TableExponential.h \
- src/xml/tinystr.h \
- src/xml/tinyxml.h \
- include/hydrogen/fx/Effects.h \
- include/hydrogen/fx/ladspa.h \
- include/hydrogen/fx/LadspaFX.h \
- include/hydrogen/IO/AudioOutput.h \
- include/hydrogen/IO/CoreMidiDriver.h \
- include/hydrogen/IO/JackOutput.h \
- include/hydrogen/IO/MidiInput.h \
- include/hydrogen/IO/MidiOutput.h \
- include/hydrogen/IO/MidiCommon.h \
- include/hydrogen/IO/NullDriver.h \
- include/hydrogen/IO/TransportInfo.h \
- include/hydrogen/sampler/Sampler.h \
- include/hydrogen/smf/SMF.h \
- include/hydrogen/smf/SMFEvent.h \
- include/hydrogen/synth/Synth.h
-SOURCES += src/action.cpp \
- src/adsr.cpp \
- src/audio_engine.cpp \
- src/data_path.cpp \
- src/event_queue.cpp \
- src/flac_file.cpp \
- src/hydrogen.cpp \
- src/instrument.cpp \
- src/local_file_mgr.cpp \
- src/midiMap.cpp \
- src/note.cpp \
- src/object.cpp \
- src/pattern.cpp \
- src/playlist.cpp \
- src/preferences.cpp \
- src/sample.cpp \
- src/song.cpp \
- src/sound_library.cpp \
- src/timehelper.cpp \
- src/util.cpp \
- src/fx/effects.cpp \
- src/fx/ladspa_fx.cpp \
- src/IO/alsa_audio_driver.cpp \
- src/IO/alsa_midi_driver.cpp \
- src/IO/coreaudio_driver.cpp \
- src/IO/coremidi_driver.cpp \
- src/IO/disk_writer_driver.cpp \
- src/IO/fake_driver.cpp \
- src/IO/jack_output.cpp \
- src/IO/midi_input.cpp \
- src/IO/midi_output.cpp \
- src/IO/null_driver.cpp \
- src/IO/oss_driver.cpp \
- src/IO/portaudio_driver.cpp \
- src/IO/portmidi_driver.cpp \
- src/IO/transport_info.cpp \
- src/lash/LashClient.cpp \
- src/sampler/sampler.cpp \
- src/smf/smf.cpp \
- src/smf/smf_event.cpp \
- src/synth/synth.cpp \
- src/xml/tinystr.cpp \
- src/xml/tinyxml.cpp \
- src/xml/tinyxmlerror.cpp \
- src/xml/tinyxmlparser.cpp
+# #####################################################################
+# Automatically generated by qmake (2.01a) ke 25. helmi 19:42:59 2009
+# #####################################################################
+include (../../features.pri)
+TEMPLATE = lib
+TARGET = libhydrogen
+QMAKE_CXXFLAGS_RELEASE += -g \
+ -Wall
+QMAKE_CXXFLAGS_DEBUG += -g \
+ -Wall
+QT += xml
+CONFIG += qt \
+ warn_on \
+ thread \
+ staticlib \
+ precompile_header
+DESTDIR = ..
+INCLUDEPATH += ../.. \
+ include
+INCLUDEPATH += ../../portaudio/include
+OBJECTS_DIR = objs
+win32 {
+ INCLUDEPATH +=
+ INCLUDEPATH += ../../3rdparty/libsndfile-1_0_17
+ INCLUDEPATH += "C:/Program Files/GnuWin32/include"
+ LIBS += "C:\Program Files\GnuWin32\lib\libarchive.lib"
+ LIBS += "C:\Program Files\Mega-Nerd\libsndfile\libsndfile-1.lib"
+ LIBS += "C:\MinGW\bin\pthread.dll"
+ LIBS += ../../portaudio/portaudio_x86.dll
+}
+DEFINES += $$H2DEFINES
+DEPENDPATH += . \
+ src \
+ include\hydrogen \
+ src\fx \
+ src\IO \
+ src\lash \
+ src\sampler \
+ src\sequencer \
+ src\smf \
+ src\synth \
+ src\table \
+ src\xml \
+ include\hydrogen\fx \
+ include\hydrogen\IO \
+ include\hydrogen\sampler \
+ include\hydrogen\smf \
+ include\hydrogen\synth
+INCLUDEPATH += .
+PRECOMPILED_HEADER = src/precompiled.h
+
+# Input
+HEADERS += src/Precompiled.h \
+ include/hydrogen/action.h \
+ include/hydrogen/adsr.h \
+ include/hydrogen/audio_engine.h \
+ include/hydrogen/data_path.h \
+ include/hydrogen/event_queue.h \
+ include/hydrogen/globals.h \
+ include/hydrogen/h2_exception.h \
+ include/hydrogen/hydrogen.h \
+ include/hydrogen/instrument.h \
+ include/hydrogen/LashClient.h \
+ include/hydrogen/LocalFileMng.h \
+ include/hydrogen/midiMap.h \
+ include/hydrogen/note.h \
+ include/hydrogen/Object.h \
+ include/hydrogen/Pattern.h \
+ include/hydrogen/playlist.h \
+ include/hydrogen/Preferences.h \
+ include/hydrogen/sample.h \
+ include/hydrogen/Song.h \
+ include/hydrogen/SoundLibrary.h \
+ include/hydrogen/timehelper.h \
+ include/hydrogen/util.h \
+ src/IO/AlsaAudioDriver.h \
+ src/IO/AlsaMidiDriver.h \
+ src/IO/CoreAudioDriver.h \
+ src/IO/DiskWriterDriver.h \
+ src/IO/FakeDriver.h \
+ src/IO/OssDriver.h \
+ src/IO/PortAudioDriver.h \
+ src/IO/PortMidiDriver.h \
+ src/table/getTableValue.h \
+ src/table/TableExponential.h \
+ src/xml/tinystr.h \
+ src/xml/tinyxml.h \
+ include/hydrogen/fx/Effects.h \
+ include/hydrogen/fx/ladspa.h \
+ include/hydrogen/fx/LadspaFX.h \
+ include/hydrogen/IO/AudioOutput.h \
+ include/hydrogen/IO/CoreMidiDriver.h \
+ include/hydrogen/IO/JackOutput.h \
+ include/hydrogen/IO/MidiInput.h \
+ include/hydrogen/IO/MidiOutput.h \
+ include/hydrogen/IO/MidiCommon.h \
+ include/hydrogen/IO/NullDriver.h \
+ include/hydrogen/IO/TransportInfo.h \
+ include/hydrogen/sampler/Sampler.h \
+ include/hydrogen/smf/SMF.h \
+ include/hydrogen/smf/SMFEvent.h \
+ include/hydrogen/synth/Synth.h
+SOURCES += src/action.cpp \
+ src/adsr.cpp \
+ src/audio_engine.cpp \
+ src/data_path.cpp \
+ src/event_queue.cpp \
+ src/hydrogen.cpp \
+ src/instrument.cpp \
+ src/local_file_mgr.cpp \
+ src/midiMap.cpp \
+ src/note.cpp \
+ src/object.cpp \
+ src/pattern.cpp \
+ src/playlist.cpp \
+ src/preferences.cpp \
+ src/sample.cpp \
+ src/song.cpp \
+ src/sound_library.cpp \
+ src/timehelper.cpp \
+ src/util.cpp \
+ src/fx/effects.cpp \
+ src/fx/ladspa_fx.cpp \
+ src/IO/alsa_audio_driver.cpp \
+ src/IO/alsa_midi_driver.cpp \
+ src/IO/coreaudio_driver.cpp \
+ src/IO/coremidi_driver.cpp \
+ src/IO/disk_writer_driver.cpp \
+ src/IO/fake_driver.cpp \
+ src/IO/jack_output.cpp \
+ src/IO/midi_input.cpp \
+ src/IO/midi_output.cpp \
+ src/IO/null_driver.cpp \
+ src/IO/oss_driver.cpp \
+ src/IO/portaudio_driver.cpp \
+ src/IO/portmidi_driver.cpp \
+ src/IO/transport_info.cpp \
+ src/lash/LashClient.cpp \
+ src/sampler/sampler.cpp \
+ src/smf/smf.cpp \
+ src/smf/smf_event.cpp \
+ src/synth/synth.cpp \
+ src/xml/tinystr.cpp \
+ src/xml/tinyxml.cpp \
+ src/xml/tinyxmlerror.cpp \
+ src/xml/tinyxmlparser.cpp
Index: Sconstruct
===================================================================
--- Sconstruct (Revision 1953)
+++ Sconstruct (Arbeitskopie)
@@ -65,8 +65,7 @@
if str(env['lash']) == "1": cppflags.append('-DLASH_SUPPORT')
if str(env['lrdf']) == "1": cppflags.append('-DLRDF_SUPPORT')
if str(env['portaudio']) == "1": cppflags.append('-DPORTAUDIO_SUPPORT')
- if str(env['portmidi']) == "1": cppflags.append('-DPORTMIDI_SUPPORT')
- if str(env['flac']) == "1": cppflags.append('-DFLAC_SUPPORT')
+ if str(env['portmidi']) == "1": cppflags.append('-DPORTMIDI_SUPPORT')
#OSX related stuff..
@@ -140,18 +139,18 @@
if not os.path.exists( "3rdparty/libsndfile.tar.gz" ) and not os.path.exists("3rdparty/libsndfile.zip"):
if sys.platform != "win32":
print " * Downloading libsndfile.tar.gz"
- urllib.urlretrieve("http://www.mega-nerd.com/libsndfile/libsndfile-1.0.17.tar.gz", "3rdparty/libsndfile.tar.gz")
+ urllib.urlretrieve("http://www.mega-nerd.com/libsndfile/libsndfile-1.0.22.tar.gz", "3rdparty/libsndfile.tar.gz")
else:
print " * Downloading libsndfile.zip"
- urllib.urlretrieve("http://www.mega-nerd.com/libsndfile/libsndfile-1_0_17.zip", "3rdparty/libsndfile.zip")
+ urllib.urlretrieve("http://www.mega-nerd.com/libsndfile/libsndfile-1_0_22.zip", "3rdparty/libsndfile.zip")
if sys.platform != "win32":
#unix commands
if not os.path.exists( "3rdparty/install/lib/libsndfile.a" ):
Execute( "cd 3rdparty; tar xzf libsndfile.tar.gz" )
- Execute( "cd 3rdparty/libsndfile-1.0.17; ./configure --disable-flac --prefix=%s %s" % (prefix, compile_flags) )
- res = Execute( "cd 3rdparty/libsndfile-1.0.17; make -j2; make install" )
+ Execute( "cd 3rdparty/libsndfile-1.0.22; ./configure --prefix=%s %s" % (prefix, compile_flags) )
+ res = Execute( "cd 3rdparty/libsndfile-1.0.22; make -j2; make install" )
if res != 0:
raise Exception( "Error compiling 3rdparty libraries" )
else:
@@ -268,8 +267,7 @@
env.Append( LIBPATH = 'C:\Program Files\GnuWin32\lib' )
env.Append( LIBS = [ "pthread" ] )
- if str(env['lrdf']) == "1": env.Append( LIBS = ["lrdf"] )
- if str(env['flac']) == "1": env.Append( LIBS = ["FLAC","FLAC++"] )
+ if str(env['lrdf']) == "1": env.Append( LIBS = ["lrdf"] )
if str(env['jack']) == "1": env.Append( LIBS = ["jack"])
if str(env['alsa']) == "1": env.Append( LIBS = ["asound"])
if str(env['libarchive']) == "1": env.Append( LIBS = ["archive"])
@@ -352,8 +350,7 @@
opts.Add('portaudio', 'Set to 1 to enable portaudio',0)
opts.Add('oss', 'Set to 1 to enable oss',0)
opts.Add('alsa', 'Set to 1 to enable alsa',0)
- opts.Add('jack', 'Set to 1 to enable jack',0)
- opts.Add('flac', 'Set to 1 to enable flac',1)
+ opts.Add('jack', 'Set to 1 to enable jack',0)
opts.Add('lash', 'Set to 1 to enable lash',0)
opts.Add('lrdf', 'Set to 1 to enable lrdf',0)
@@ -364,8 +361,7 @@
opts.Add('lash', 'Set to 1 to enable lash',0)
opts.Add('alsa', 'Set to 1 to enable alsa',1)
opts.Add('jack', 'Set to 1 to enable jack',1)
- opts.Add('lrdf', 'Set to 1 to enable lrdf',1)
- opts.Add('flac', 'Set to 1 to enable flac',1)
+ opts.Add('lrdf', 'Set to 1 to enable lrdf',1)
else:
#alsa, lash,oss and jack are not available on windows
opts.Add('portmidi', 'Set to 1 to enable portmidi',1)
@@ -374,8 +370,7 @@
opts.Add('lash', 'Set to 1 to enable lash',0)
opts.Add('alsa', 'Set to 1 to enable alsa',0)
opts.Add('jack', 'Set to 1 to enable jack',0)
- opts.Add('lrdf', 'Set to 1 to enable lrdf',0)
- opts.Add('flac', 'Set to 1 to enable flac',0)
+ opts.Add('lrdf', 'Set to 1 to enable lrdf',0)
@@ -410,14 +405,10 @@
print 'libsndfile must be installed!'
Exit(1)
+if not conf.CheckPKG('sndfile >= 1.0.18 '):
+ print 'a libsndfile version >= 1.0.18 is reqired!'
+ Exit(1)
-
-# it seems that conf.CheckCHeader dislikes like the "++" in filenames
-#if not conf.CheckCHeader('FLAC++/all.h'):
-# print 'FLAC++ must be installed!'
-# Exit(1)
-
-
# these libraries are optional (can be enabled/disabled, see 'scons -h')
if str(env['portaudio']) == "1" and not conf.CheckCHeader('portaudio.h'):
@@ -461,12 +452,7 @@
print 'lrdf must be installed!'
Exit(1)
-#flac: support for flac samples
-if str(env['flac']) == "1" and not conf.CheckCHeader('FLAC/all.h'):
- print 'FLAC must be installed!'
- Exit(1)
-
print ""
print "================================================================="
print " Hydrogen build script"
Index: features.pri
===================================================================
--- features.pri (Revision 1953)
+++ features.pri (Arbeitskopie)
@@ -9,14 +9,11 @@
LIBS += -framework AudioUnit -framework AudioToolbox \
-framework CoreServices -framework CoreAudio -framework CoreMidi
- H2DEFINES += LADSPA_SUPPORT
- H2DEFINES += FLAC_SUPPORT
+ H2DEFINES += LADSPA_SUPPORT
H2DEFINES += JACK_SUPPORT
H2DEFINES += COREAUDIO_SUPPORT
H2DEFINES += COREMIDI_SUPPORT
- LIBS += /opt/local/lib/libFLAC.dylib
- LIBS += /opt/local/lib/libFLAC++.dylib
LIBS += /usr/local/lib/libjack.dylib
LIBS += /opt/local/lib/libtar.dylib
LIBS += /opt/local/lib/libpng.dylib
@@ -29,8 +26,7 @@
linux-g++ {
H2DEFINES += ALSA_SUPPORT
H2DEFINES += JACK_SUPPORT
- H2DEFINES += LASH_SUPPORT
- H2DEFINES += FLAC_SUPPORT
+ H2DEFINES += LASH_SUPPORT
H2DEFINES += LADSPA_SUPPORT
H2DEFINES += LRDF_SUPPORT
H2DEFINES += OSS_SUPPORT
@@ -39,15 +35,13 @@
linux-g++-64 {
H2DEFINES += ALSA_SUPPORT
H2DEFINES += JACK_SUPPORT
- H2DEFINES += LASH_SUPPORT
- H2DEFINES += FLAC_SUPPORT
+ H2DEFINES += LASH_SUPPORT
H2DEFINES += LADSPA_SUPPORT
H2DEFINES += LRDF_SUPPORT
H2DEFINES += OSS_SUPPORT
}
win32 {
- #H2DEFINES += FLAC_SUPPORT
#H2DEFINES += LADSPA_SUPPORT
#H2DEFINES += PORTMIDI_SUPPOR
H2DEFINES += PORTAUDIO_SUPPORT
------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel