• Home
  • Raw
  • Download

Lines Matching refs:wave

129 MMRESULT StartWave(const char path[], SkOSSoundWave* wave, U32 vol);
130 MMRESULT EndWave(SkOSSoundWave* wave);
235 MMRESULT StartWave(const char path[], SkOSSoundWave* wave, U32 vol) in StartWave() argument
247 if (!wave->waveFile.Open(path)) { in StartWave()
257 mmres = waveOutOpen(&hwo, devId, wave->waveFile.GetWaveFormat(), 0, 0, CALLBACK_NULL); in StartWave()
260 wave->hwo = hwo; in StartWave()
271 mmres = waveOutGetVolume(hwo, &wave->dwOldVolume); in StartWave()
282 ZeroMemory(&wave->whdr, sizeof(WAVEHDR)); in StartWave()
283 wave->whdr.lpData = new char[wave->waveFile.GetLength()]; in StartWave()
284 wave->whdr.dwBufferLength = wave->waveFile.GetLength(); in StartWave()
285 wave->whdr.dwUser = 0; in StartWave()
286 wave->whdr.dwFlags = 0; in StartWave()
287 wave->whdr.dwLoops = 0; in StartWave()
288 wave->whdr.dwBytesRecorded = 0; in StartWave()
289 wave->whdr.lpNext = 0; in StartWave()
290 wave->whdr.reserved = 0; in StartWave()
293 wave->waveFile.Read(wave->whdr.lpData, wave->whdr.dwBufferLength); in StartWave()
295 mmres = waveOutPrepareHeader(hwo, &wave->whdr, sizeof(WAVEHDR)); in StartWave()
300 mmres = waveOutWrite(hwo, &wave->whdr, sizeof(WAVEHDR)); in StartWave()
307 void IdleWave(Wave& wave)
310 while (!(wave.whdr.dwFlags & WHDR_DONE)) {
311 WaitForSingleObject(wave.hDoneEvent, INFINITE);
316 MMRESULT EndWave(SkOSSoundWave* wave) in EndWave() argument
318 HWAVEOUT hwo = wave->hwo; in EndWave()
321 mmres = waveOutUnprepareHeader(hwo, &wave->whdr, sizeof(WAVEHDR)); in EndWave()
326 waveOutSetVolume(hwo, wave->dwOldVolume); in EndWave()
336 delete [] wave->whdr.lpData; in EndWave()
337 wave->waveFile.Close(); in EndWave()