[PlanetCCRMA] hydrogen patch
Anthony Green
green at redhat.com
Sat Jul 22 17:08:01 PDT 2006
Hi Fernando,
Hydrogen will crash if you load a song that requires missing samples.
Here's the patch I added to the FE submission just now. I'll report the
bug upstream as well.
AG
--- src/lib/Hydrogen.cpp~ 2006-01-06 06:15:50.000000000 -0800
+++ src/lib/Hydrogen.cpp 2006-07-22 16:41:44.000000000 -0700
@@ -2491,9 +2491,8 @@
Sample *pSample = Sample::load( sSampleFilename );
// pSample->setFilename( pNewSample->getFilename() ); // riuso il path del nuovo sample (perche' e' gia relativo al path del drumkit)
if (pSample == NULL) {
- errorLog( "[loadDrumkit] Error Loading drumkit: NULL sample, now using /emptySample.wav" );
- pSample->m_sFilename = string(DataPath::getDataPath() ).append( "/emptySample.wav" );
- pSample = Sample::load( pSample->m_sFilename );
+ errorLog( "[loadDrumkit] Error Loading drumkit: " + sSampleFilename + " sample, now using /emptySample.wav" );
+ pSample = Sample::load( string(DataPath::getDataPath() ).append( "/emptySample.wav" ));
}
InstrumentLayer *pLayer = new InstrumentLayer( pSample );
pLayer->m_fStartVelocity = pNewLayer->m_fStartVelocity;
More information about the PlanetCCRMA
mailing list