| 36 | } |
| 37 | |
| 38 | ProjectRate::ProjectRate(AudacityProject &project) |
| 39 | { |
| 40 | int intRate = 0; |
| 41 | bool wasDefined = QualitySettings::DefaultSampleRate.Read( &intRate ); |
| 42 | mRate = intRate; |
| 43 | if ( !wasDefined ) { |
| 44 | // The default given above can vary with host/devices. So unless there is |
| 45 | // an entry for the default sample rate in audacity.cfg, Audacity can open |
| 46 | // with a rate which is different from the rate with which it closed. |
| 47 | // See bug 1879. |
| 48 | QualitySettings::DefaultSampleRate.Write( mRate ); |
| 49 | gPrefs->Flush(); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | double ProjectRate::GetRate() const |
| 54 | { |