Debian Codegraph @

components/output/haiku/haiku.h

raw symbols SCIP
1 /* BoCA - BonkEnc Component Architecture
2 * Copyright (C) 2007-2017 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
15 BoCA_BEGIN_COMPONENT(OutputHaiku)
16
17 namespace BoCA
18 {
19 class OutputHaiku : public CS::OutputComponent
20 {
21 friend void PlayBuffer(void *, void *, size_t, const media_raw_audio_format &);
22
23 private:
24 BSoundPlayer *player;
25 Bool paused;
26
27 Buffer<UnsignedByte> samplesBuffer;
28
29 Threads::Mutex *samplesBufferMutex;
30 public:
31 static const String &GetComponentSpecs();
32
33 OutputHaiku();
34 ~OutputHaiku();
35
36 Bool Activate();
37 Bool Deactivate();
38
39 Int WriteData(Buffer<UnsignedByte> &);
40
41 Int CanWrite();
42
43 Int SetPause(Bool);
44 Bool IsPlaying();
45 };
46 };
47
48 BoCA_DEFINE_OUTPUT_COMPONENT(OutputHaiku)
49
50 BoCA_END_COMPONENT(OutputHaiku)