| 184 | } |
| 185 | |
| 186 | int WA2InputModule::Play(const char *fn) |
| 187 | { |
| 188 | int maxlatency; |
| 189 | |
| 190 | if(LoadFile(fn)==false) |
| 191 | return 1; |
| 192 | |
| 193 | rate = (*cf)["RATE"]; |
| 194 | bps = (*cf)["BPS"]; |
| 195 | nch = (*cf)["NCH"]; |
| 196 | |
| 197 | pl->SetPlayFreq(rate); |
| 198 | pl->SetChannels(nch); |
| 199 | //pl->Reset(); |
| 200 | |
| 201 | maxlatency = pMod->outMod->Open(rate,nch,bps, -1,-1); |
| 202 | if(maxlatency < 0) return 1; |
| 203 | |
| 204 | pMod->SetInfo(rate*bps*nch/1000, rate/1000, nch, 1); |
| 205 | pMod->SAVSAInit(maxlatency, rate); |
| 206 | pMod->VSASetInfo(rate,nch); |
| 207 | pMod->outMod->SetVolume(-666); |
| 208 | pMod->outMod->Flush(0); |
| 209 | pause_flag = false; |
| 210 | seek_flag = false; |
| 211 | reset_flag = true; |
| 212 | decode_pos = 0; |
| 213 | |
| 214 | StartPlayThread(); |
| 215 | return 0; |
| 216 | } |
| 217 | |
| 218 | void WA2InputModule::Pause() |
| 219 | { |
nothing calls this directly
no test coverage detected