Changeset 637

Show
Ignore:
Timestamp:
11/07/08 15:45:55 (2 months ago)
Author:
wolke
Message:

small fix on wave display

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/new_fx_rack_and_sample_fun/gui/src/SampleEditor/DetailWaveDisplay.cpp

    r616 r637  
    9090                        painter.drawLine( x, (-m_pPeakDatal[startpos -1] *m_pzoomFactor) +VCenterl, x, (-m_pPeakDatal[startpos ] *m_pzoomFactor)+VCenterl ); 
    9191                        painter.drawLine( x, (-m_pPeakDatar[startpos -1] *m_pzoomFactor) +VCenterr, x, (-m_pPeakDatar[startpos ] *m_pzoomFactor)+VCenterr ); 
    92                         //ERRORLOG( QString("startpos: %1").arg(startpos) ); 
     92                        //ERRORLOG( QString("startpos: %1").arg(startpos) ) 
    9393                } 
    9494                else 
     
    128128        if ( pNewSample ) { 
    129129 
    130                 int nSampleLenght = pNewSample->get_n_frames(); 
     130                int m_pSampleLenght = pNewSample->get_n_frames(); 
    131131 
    132                 m_pPeakDatal = new int[ nSampleLenght ]; 
    133                 m_pPeakDatar = new int[ nSampleLenght ]; 
     132                m_pPeakDatal = new int[ m_pSampleLenght + m_pnormalimagedetailframes /2 ]; 
     133                m_pPeakDatar = new int[ m_pSampleLenght + m_pnormalimagedetailframes /2 ]; 
     134 
     135                for ( int i = 0 ; i < m_pSampleLenght + m_pnormalimagedetailframes /2 ; i++){ 
     136                        m_pPeakDatal[ i ] = 0; 
     137                        m_pPeakDatar[ i ] = 0; 
     138                } 
    134139 
    135140                float fGain = height() / 4.0 * 1.0; 
     
    139144                int nSamplePos =0; 
    140145//              int nVall; 
    141                 for ( int i = 0; i < nSampleLenght; i++ ){ 
     146                for ( int i = 0; i < m_pSampleLenght; i++ ){ 
    142147                        m_pPeakDatal[ i ] = (int)( pSampleDatal[ i ] * fGain ); 
    143148                } 
     
    148153//              int nValr; 
    149154 
    150                 for ( int i = 0; i < nSampleLenght; i++ ){ 
     155                for ( int i = 0; i < m_pSampleLenght; i++ ){ 
    151156                        m_pPeakDatar[ i ] = (int)( pSampleDatar[ i ] * fGain ); 
    152157                } 
  • branches/new_fx_rack_and_sample_fun/gui/src/SampleEditor/DetailWaveDisplay.h

    r613 r637  
    5353                int m_pnormalimagedetailframes; 
    5454                float m_pzoomFactor; 
     55                int m_pSampleLenght; 
    5556                QString m_ptype; 
    5657}; 
  • branches/new_fx_rack_and_sample_fun/gui/src/SampleEditor/SampleEditor.cpp

    r632 r637  
    161161        m_fade_out_type = pSample->get_fade_out_type(); 
    162162 
     163 
    163164        if (m_sample_is_modified) { 
    164165                m_end_frame = pSample->get_end_frame(); 
     
    175176                EndFrameSpinBox->setValue( m_end_frame ); 
    176177                LoopCountSpinBox->setValue( m_repeats ); 
    177                 FadeOutFrameSpinBox->setValue( m_fade_out_startframe ); 
    178                 FadeOutTypeComboBox->setCurrentIndex( m_fade_out_type ); 
     178 
     179                FadeOutFrameSpinBox->setValue( pSample->get_fade_out_startframe() ); 
     180                FadeOutTypeComboBox->setCurrentIndex( pSample->get_fade_out_type() ); 
    179181 
    180182                m_pMainSampleWaveDisplay->m_pStartFramePosition = m_start_frame / m_divider + 25 ;