Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
softvolume.h
Go to the documentation of this file.
1 #ifndef __SOUNDSERVER_SOFT_VOLUME__
2 #define __SOUNDSERVER_SOFT_VOLUME__
3 
4 typedef enum
5 {
11 
12 //newvolume: normalized volume (multiplier in [0,inf), 1=no change)
13 //time: total change time (in seconds)
14 //shape: transition shape (see enumeration)
15 //
16 //Gradually changes volume
17 extern void Mix_SoftVolume_Change( int chan, double newvolume, double time, Mix_SoftVolume_Shape shape );
18 
19 //newvolume: normalized volume (multiplier in [0,inf), 1=no change)
20 //
21 //Makes the volume change instantaneous - useful for initialization
22 extern void Mix_SoftVolume_Force( int chan, double newvolume );
23 
24 //newvolume: normalized volume (multiplier in [0,inf), 1=no change)
25 //
26 //Makes the volume change instantaneous - useful for initialization
27 extern double Mix_SoftVolume_GetCurrentVolume( int chan );
28 
29 //Enables autostop: when volume reaches 0 as a consequence of
30 //Mix_SoftVolume_Change, it will automatically halt the music.
31 //
32 //NOTE: Gets reset upon Mix_SoftVolume_Change, so call this
33 //AFTER Change() - but doesn't get reset by Force().
34 extern void Mix_SoftVolume_AutoStopMusic( int chan, int enable = 1 );
35 
36 #endif //__SOUNDSERVER_SOFT_VOLUME__
37