408 |
#endif |
#endif |
409 |
|
|
410 |
// And clip... |
// And clip... |
411 |
if (iVolume > 100) |
if (iVolume < 0) |
|
iVolume = 100; |
|
|
else if (iVolume < 0) |
|
412 |
iVolume = 0; |
iVolume = 0; |
413 |
|
|
414 |
// Flag it here, to avoid infinite recursion. |
// Flag it here, to avoid infinite recursion. |
457 |
|
|
458 |
// Convert and clip. |
// Convert and clip. |
459 |
float fVolume = (float) iVolume / 100.0; |
float fVolume = (float) iVolume / 100.0; |
460 |
if (fVolume > 1.0) |
if (fVolume < 0.001) |
|
fVolume = 1.0; |
|
|
else if (fVolume < 0.0) |
|
461 |
fVolume = 0.0; |
fVolume = 0.0; |
462 |
|
|
463 |
// Update the GUI elements. |
// Update the GUI elements. |
504 |
} |
} |
505 |
|
|
506 |
|
|
507 |
|
// Maximum volume slider accessors. |
508 |
|
void qsamplerChannelStrip::setMaxVolume ( int iMaxVolume ) |
509 |
|
{ |
510 |
|
m_iDirtyChange++; |
511 |
|
VolumeSlider->setRange(0, iMaxVolume); |
512 |
|
VolumeSpinBox->setRange(0, iMaxVolume); |
513 |
|
m_iDirtyChange--; |
514 |
|
} |
515 |
|
|
516 |
|
|
517 |
// end of qsamplerChannelStrip.ui.h |
// end of qsamplerChannelStrip.ui.h |
518 |
|
|