source: trunk/src/winmm/waveoutdaud.h@ 6502

Last change on this file since 6502 was 5643, checked in by sandervl, 24 years ago

DirectAudio interface updates

File size: 1.5 KB
Line 
1/* $Id: waveoutdaud.h,v 1.4 2001-04-30 21:06:56 sandervl Exp $ */
2
3/*
4 * Wave playback class (DirectAudio)
5 *
6 * Copyright 2001 Sander van Leeuwen (sandervl@xs4all.nl)
7 *
8 * Project Odin Software License can be found in LICENSE.TXT
9 */
10#ifndef __DWAVEOUTEX_H__
11#define __DWAVEOUTEX_H__
12
13#include "waveoutbase.h"
14#include <daudio.h>
15
16#ifdef _OS2WIN_H
17typedef DWORD HEV;
18#endif
19
20#define SECTION_WINMM "WINMM"
21#define KEY_DIRECTAUDIO "DirectAudio"
22
23class DAudioWaveOut : public WaveOut
24{
25public:
26 DAudioWaveOut(LPWAVEFORMATEX pwfx, ULONG fdwOpen, ULONG nCallback, ULONG dwInstance);
27 virtual ~DAudioWaveOut();
28
29 virtual MMRESULT write(LPWAVEHDR pwh, UINT cbwh);
30 virtual MMRESULT pause();
31 virtual MMRESULT stop();
32 virtual MMRESULT restart();
33 virtual MMRESULT setVolume(ULONG ulVol);
34 virtual MMRESULT reset();
35 virtual ULONG getPosition();
36
37 static BOOL queryFormat(ULONG formatTag, ULONG nChannels,
38 ULONG nSamplesPerSec, ULONG sampleSize);
39
40
41 static BOOL isDirectAudioAvailable();
42
43protected:
44
45private:
46 MMRESULT resume();
47 BOOL handler();
48 MMRESULT sendIOCTL(ULONG cmd, DAUDIO_CMD *pDataPacket);
49
50 HEV hSem;
51
52 ULONG bytesPlayed, bytesReturned;
53 int queuedbuffers;
54
55 BOOL fUnderrun;
56 HANDLE hThread;
57 DWORD dwThreadID;
58
59 HFILE hDAudioDrv;
60
61 friend DWORD WIN32API DAudioThreadHandler(LPVOID pUserData);
62};
63
64#endif
Note: See TracBrowser for help on using the repository browser.