Debian Codegraph @

include/engine/processor.h

raw symbols SCIP
1 /* fre:ac - free audio converter
2 * Copyright (C) 2001-2018 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 #ifndef H_FREAC_PROCESSOR
14 #define H_FREAC_PROCESSOR
15
16 #include "component.h"
17
18 namespace freac
19 {
20 class Processor : public Component
21 {
22 protected:
23 BoCA::Format format;
24
25 Array<BoCA::AS::DSPComponent *, Void *> dsps;
26 public:
27 Processor(const BoCA::Config *);
28 virtual ~Processor();
29
30 Bool Create(const BoCA::Track &);
31 Bool Destroy();
32
33 virtual Int Transform(Buffer<UnsignedByte> &);
34 virtual Int Finish(Buffer<UnsignedByte> &);
35 accessors:
36 const BoCA::Format &GetFormatInfo() const { return format; }
37 };
38
39 /* Special processor class for single file conversions.
40 *
41 * Ignores finish requests until FinishSingleFile is called.
42 */
43 class ProcessorSingleFile : public Processor
44 {
45 public:
46 ProcessorSingleFile(const BoCA::Config *config) : Processor(config) { }
47
48 Int Finish(Buffer<UnsignedByte> &buffer) { return 0; }
49 Int FinishSingleFile(Buffer<UnsignedByte> &buffer) { return Processor::Finish(buffer); }
50 };
51 };
52
53 #endif