pcm_volume: added constant PCM_VOLUME_1

It may be desirable to change the range of integer volume levels
(e.g. to 1024, which may utilize shifts instead of expensive integer
divisions).  Introduce the constant PCM_VOLUME_1 which describes the
integer value for "100% volume".  This is currently 1000.
This commit is contained in:
Max Kellermann
2008-11-11 16:32:32 +01:00
parent ad77a3e0ac
commit edcd45df94
4 changed files with 27 additions and 14 deletions
+1 -1
View File
@@ -480,7 +480,7 @@ static int changeSoftwareVolume(int change, int rel)
/*new = 100.0*(exp(new/50.0)-1)/(M_E*M_E-1)+0.5; */
if (new >= 100)
new = 1000;
new = PCM_VOLUME_1;
else if (new <= 0)
new = 0;
else