Changeset 637
- Timestamp:
- 11/07/08 15:45:55 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/new_fx_rack_and_sample_fun/gui/src/SampleEditor/DetailWaveDisplay.cpp
r616 r637 90 90 painter.drawLine( x, (-m_pPeakDatal[startpos -1] *m_pzoomFactor) +VCenterl, x, (-m_pPeakDatal[startpos ] *m_pzoomFactor)+VCenterl ); 91 91 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) ) 93 93 } 94 94 else … … 128 128 if ( pNewSample ) { 129 129 130 int nSampleLenght = pNewSample->get_n_frames();130 int m_pSampleLenght = pNewSample->get_n_frames(); 131 131 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 } 134 139 135 140 float fGain = height() / 4.0 * 1.0; … … 139 144 int nSamplePos =0; 140 145 // int nVall; 141 for ( int i = 0; i < nSampleLenght; i++ ){146 for ( int i = 0; i < m_pSampleLenght; i++ ){ 142 147 m_pPeakDatal[ i ] = (int)( pSampleDatal[ i ] * fGain ); 143 148 } … … 148 153 // int nValr; 149 154 150 for ( int i = 0; i < nSampleLenght; i++ ){155 for ( int i = 0; i < m_pSampleLenght; i++ ){ 151 156 m_pPeakDatar[ i ] = (int)( pSampleDatar[ i ] * fGain ); 152 157 } branches/new_fx_rack_and_sample_fun/gui/src/SampleEditor/DetailWaveDisplay.h
r613 r637 53 53 int m_pnormalimagedetailframes; 54 54 float m_pzoomFactor; 55 int m_pSampleLenght; 55 56 QString m_ptype; 56 57 }; branches/new_fx_rack_and_sample_fun/gui/src/SampleEditor/SampleEditor.cpp
r632 r637 161 161 m_fade_out_type = pSample->get_fade_out_type(); 162 162 163 163 164 if (m_sample_is_modified) { 164 165 m_end_frame = pSample->get_end_frame(); … … 175 176 EndFrameSpinBox->setValue( m_end_frame ); 176 177 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() ); 179 181 180 182 m_pMainSampleWaveDisplay->m_pStartFramePosition = m_start_frame / m_divider + 25 ;
