repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / cortex / addons / AudioAdapter / AudioAdapterNode.h
bloba2618bb8ec9bc1254b8819e337d67f3ec031d767
1 /*
2 * Copyright (c) 1999-2000, Eric Moon.
3 * All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions, and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions, and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
16 * 3. The name of the author may not be used to endorse or promote products
17 * derived from this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
20 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 * OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
23 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
27 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 // AudioAdapterNode.h
33 #ifndef AUDIO_ADAPTER_NODE_H
34 #define AUDIO_ADAPTER_NODE_H
37 #include "AudioFilterNode.h"
38 #include "AudioAdapterParams.h"
41 class _AudioAdapterNode : public AudioFilterNode {
42 typedef AudioFilterNode _inherited;
44 public: // ctor/dtor
45 virtual ~_AudioAdapterNode();
46 _AudioAdapterNode(const char* name, IAudioOpFactory* opFactory,
47 BMediaAddOn* addOn = 0);
49 public: // AudioFilterNode
50 status_t getRequiredInputFormat(media_format& ioFormat);
51 status_t getPreferredInputFormat(media_format& ioFormat);
52 status_t getRequiredOutputFormat(media_format& ioFormat);
54 status_t getPreferredOutputFormat(media_format& ioFormat);
56 status_t validateProposedInputFormat(
57 const media_format& preferredFormat,
58 media_format& ioProposedFormat);
60 status_t validateProposedOutputFormat(
61 const media_format& preferredFormat,
62 media_format& ioProposedFormat);
64 virtual void SetParameterValue(int32 id, bigtime_t changeTime,
65 const void* value, size_t size); //nyi
67 public: // BBufferProducer/Consumer
68 virtual status_t Connected(const media_source& source,
69 const media_destination& destination,
70 const media_format& format,
71 media_input* outInput);
73 virtual void Connect(status_t status, const media_source& source,
74 const media_destination& destination,
75 const media_format& format,
76 char* ioName);
78 private:
79 void _attemptInputFormatChange(
80 const media_multi_audio_format& format); //nyi
82 void _attemptOutputFormatChange(
83 const media_multi_audio_format& format); //nyi
85 void _broadcastInputFormatParams();
86 void _broadcastOutputFormatParams();
89 #endif // AUDIO_ADAPTER_NODE_H