MCPcopy Create free account
hub / github.com/bbbradsmith/nsfplay / Play

Method Play

win/plugin/winamp2/in_module.cpp:186–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186int 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
218void WA2InputModule::Pause()
219{

Callers

nothing calls this directly

Calls 6

SetPlayFreqMethod · 0.80
SetChannelsMethod · 0.80
SetInfoMethod · 0.80
OpenMethod · 0.45
SetVolumeMethod · 0.45
FlushMethod · 0.45

Tested by

no test coverage detected