- Timestamp:
- 09/16/08 23:32:42 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/audiofilebrowser/gui/src/AudioFileBrowser/AudioFileBrowser.cpp
r484 r487 115 115 pathLineEdit->setText(path); 116 116 filelineedit->setText(path); 117 m_pSampleWaveDisplay->updateDisplay( NULL ); 117 118 118 119 if ( model->isDir(index)) … … 148 149 Sample *pNewSample = Sample::load( path2 ); 149 150 if (pNewSample) { 150 m_pNBytesLable->setText( trUtf8( "Size: %1 bytes" ).arg( pNewSample->get_size() ) );151 m_pNBytesLable->setText( trUtf8( "Size: %1 bytes" ).arg( pNewSample->get_size() / 2 ) ); 151 152 m_pSamplerateLable->setText( trUtf8( "Samplerate: %1" ).arg( pNewSample->get_sample_rate() ) ); 152 m_pLengthLable->setText( trUtf8( "Samplelength: %1 s" ).arg( pNewSample->get_n_frames() / pNewSample->get_sample_rate() ) ); 153 float sec = (float)(pNewSample->get_n_frames() / (float)pNewSample->get_sample_rate()); 154 QString qsec = ""; 155 qsec.sprintf("%2.2f",sec); 156 m_pLengthLable->setText( trUtf8( "Samplelength: " ) + qsec + trUtf8( " s" ) ); 153 157 154 158 //second part of check prevent left sample objects into memory … … 171 175 m_pSamplerateLable->setText( trUtf8( "Samplerate:" ) ); 172 176 m_pLengthLable->setText( trUtf8( "Samplelength:" ) ); 177 m_pSampleWaveDisplay->updateDisplay( NULL ); 173 178 m_pPlayBtn->setEnabled( false ); 174 179 openBTN->setEnabled( false );