Changeset 487

Show
Ignore:
Timestamp:
09/16/08 23:32:42 (5 years ago)
Author:
wolke
Message:

correct seconds display

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/audiofilebrowser/gui/src/AudioFileBrowser/AudioFileBrowser.cpp

    r484 r487  
    115115        pathLineEdit->setText(path); 
    116116        filelineedit->setText(path); 
     117        m_pSampleWaveDisplay->updateDisplay( NULL ); 
    117118         
    118119        if ( model->isDir(index)) 
     
    148149                        Sample *pNewSample = Sample::load( path2 ); 
    149150                        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 ) ); 
    151152                                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" ) ); 
    153157 
    154158                                //second part of check prevent left sample objects into memory 
     
    171175                        m_pSamplerateLable->setText( trUtf8( "Samplerate:" ) ); 
    172176                        m_pLengthLable->setText( trUtf8( "Samplelength:" ) ); 
     177                        m_pSampleWaveDisplay->updateDisplay( NULL ); 
    173178                        m_pPlayBtn->setEnabled( false ); 
    174179                        openBTN->setEnabled( false );