Debian Codegraph @

components/output/directsound/directsound.h

raw symbols SCIP
1 /* BoCA - BonkEnc Component Architecture
2 * Copyright (C) 2007-2019 Robert Kausch <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation, either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
10 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
11 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
12
13 #include <boca.h>
14 #include <dsound.h>
15
16 BoCA_BEGIN_COMPONENT(OutputDirectSound)
17
18 namespace BoCA
19 {
20 class OutputDirectSound : public CS::OutputComponent
21 {
22 private:
23 IDirectSound8 *directSound;
24
25 IDirectSoundBuffer *primaryBuffer;
26 IDirectSoundBuffer *workBuffer;
27
28 UnsignedInt bufferSize;
29 UnsignedInt bufferPos;
30
31 Bool firstBlock;
32 public:
33 static const String &GetComponentSpecs();
34
35 static Void Initialize();
36 static Void Cleanup();
37
38 OutputDirectSound();
39 ~OutputDirectSound();
40
41 Bool Activate();
42 Bool Deactivate();
43
44 Int WriteData(Buffer<UnsignedByte> &);
45 Bool Finish();
46
47 Int CanWrite();
48
49 Int SetPause(Bool);
50 Bool IsPlaying();
51 };
52 };
53
54 BoCA_DEFINE_OUTPUT_COMPONENT(OutputDirectSound)
55
56 BoCA_END_COMPONENT(OutputDirectSound)