* Add existing files.
[matthijs/ABM2.git] / ABM2 / Engine / SoundTask.cpp
1 // SoundTask.cpp: implementation of the CSoundTask class.\r
2 //\r
3 //////////////////////////////////////////////////////////////////////\r
4 \r
5 #include "engine.h"\r
6 \r
7 //////////////////////////////////////////////////////////////////////\r
8 // Construction/Destruction\r
9 //////////////////////////////////////////////////////////////////////\r
10 \r
11 CSoundTask::CSoundTask()\r
12 {\r
13 \r
14 }\r
15 \r
16 CSoundTask::~CSoundTask()\r
17 {\r
18 \r
19 }\r
20 \r
21 bool CSoundTask::Start()\r
22 {\r
23 //      if(FALSE==FSOUND_Init(44100, 32, 0))return false;\r
24         return true;\r
25 }\r
26 \r
27 void CSoundTask::OnSuspend()\r
28 {\r
29 /*      //pause all channels, storing the pause state in the isPaused array\r
30         //once the states are stored we can use FSOUND_ALL to pause all channels the easy way\r
31         int chCount=FSOUND_GetMaxChannels();\r
32         isPaused=new CMMDynamicBlob<bool>(chCount);\r
33         for(int i=0;i<chCount;i++)\r
34         {\r
35                 if(FSOUND_IsPlaying(i))\r
36                 {       \r
37                         isPaused[i]=true;\r
38                 }else{\r
39                         isPaused[i]=false;\r
40                 }\r
41         }\r
42         FSOUND_SetPaused(FSOUND_ALL,TRUE);\r
43 */}\r
44 \r
45 void CSoundTask::Update()\r
46 {\r
47         //we don't need to do anything, FMOD does it all for us :)\r
48 }\r
49 \r
50 void CSoundTask::OnResume()\r
51 {\r
52 /*      //unpause all the flagged channels\r
53         if(isPaused)\r
54         {\r
55                 int chCount=FSOUND_GetMaxChannels();\r
56                 for(int i=0;i<chCount;i++)\r
57                 {\r
58                         if(isPaused[i])FSOUND_SetPaused(i,FALSE);\r
59                 }\r
60                 isPaused=0;\r
61         }\r
62 */}\r
63 \r
64 void CSoundTask::Stop()\r
65 {\r
66 //      FSOUND_Close();\r
67 }