3rdparty/licenseReport: Add seperate LGPL checks
[haiku.git] / src / add-ons / media / media-add-ons / multi_audio / MultiAudioDevice.h
blobcdda452ef9beafb25bc61c265d61ac9be1d542a6
1 /*
2 * Copyright (c) 2002-2007, Jerome Duval (jerome.duval@free.fr)
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef MULTI_AUDIO_DEVICE_H
6 #define MULTI_AUDIO_DEVICE_H
9 #include "hmulti_audio.h"
12 #define MAX_CONTROLS 128
13 #define MAX_CHANNELS 32
14 #define MAX_BUFFERS 32
17 class MultiAudioDevice {
18 public:
19 MultiAudioDevice(const char* name, const char* path);
20 ~MultiAudioDevice();
22 status_t InitCheck() const;
24 const multi_description& Description() const { return fDescription; }
25 const multi_format_info& FormatInfo() const { return fFormatInfo; }
26 const multi_buffer_list& BufferList() const { return fBufferList; }
27 const multi_mix_control_info& MixControlInfo() const
28 { return fMixControlInfo; }
30 status_t BufferExchange(multi_buffer_info* bufferInfo);
31 status_t SetMix(multi_mix_value_info* mixValueInfo);
32 status_t GetMix(multi_mix_value_info* mixValueInfo);
34 status_t SetInputFrameRate(uint32 multiAudioRate);
35 status_t SetOutputFrameRate(uint32 multiAudioRate);
37 private:
38 status_t _InitDriver();
39 status_t _GetBuffers();
41 private:
42 status_t fInitStatus;
43 int fDevice;
44 char fPath[B_PATH_NAME_LENGTH];
46 multi_description fDescription;
47 multi_channel_info fChannelInfo[MAX_CHANNELS];
48 multi_format_info fFormatInfo;
49 multi_buffer_list fBufferList;
51 multi_mix_control_info fMixControlInfo;
52 multi_mix_control fMixControl[MAX_CONTROLS];
54 buffer_desc fPlayBufferList[MAX_BUFFERS * MAX_CHANNELS];
55 buffer_desc fRecordBufferList[MAX_BUFFERS * MAX_CHANNELS];
56 buffer_desc* fPlayBuffers[MAX_BUFFERS];
57 buffer_desc* fRecordBuffers[MAX_BUFFERS];
60 #endif // MULTI_AUDIO_DEVICE_H