Lines Matching refs:wave
53 /* hResInfo = FindResource (hInst, lpName, "WAVE");
58 // Load the wave resource.
64 // Lock the wave resource and play it.
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)
241 // HANDLE hDoneEvent = wave.hDoneEvent =
246 // Open wave file
247 if (!wave->waveFile.Open(path)) {
257 mmres = waveOutOpen(&hwo, devId, wave->waveFile.GetWaveFormat(), 0, 0, CALLBACK_NULL);
260 wave->hwo = hwo;
271 mmres = waveOutGetVolume(hwo, &wave->dwOldVolume);
281 // Initialize wave header
282 ZeroMemory(&wave->whdr, sizeof(WAVEHDR));
283 wave->whdr.lpData = new char[wave->waveFile.GetLength()];
284 wave->whdr.dwBufferLength = wave->waveFile.GetLength();
285 wave->whdr.dwUser = 0;
286 wave->whdr.dwFlags = 0;
287 wave->whdr.dwLoops = 0;
288 wave->whdr.dwBytesRecorded = 0;
289 wave->whdr.lpNext = 0;
290 wave->whdr.reserved = 0;
293 wave->waveFile.Read(wave->whdr.lpData, wave->whdr.dwBufferLength);
295 mmres = waveOutPrepareHeader(hwo, &wave->whdr, sizeof(WAVEHDR));
300 mmres = waveOutWrite(hwo, &wave->whdr, sizeof(WAVEHDR));
307 void IdleWave(Wave& wave)
310 while (!(wave.whdr.dwFlags & WHDR_DONE)) {
311 WaitForSingleObject(wave.hDoneEvent, INFINITE);
316 MMRESULT EndWave(SkOSSoundWave* wave)
318 HWAVEOUT hwo = wave->hwo;
321 mmres = waveOutUnprepareHeader(hwo, &wave->whdr, sizeof(WAVEHDR));
326 waveOutSetVolume(hwo, wave->dwOldVolume);
336 delete [] wave->whdr.lpData;
337 wave->waveFile.Close();