2 * Copyright (c) 2002-2007, Jerome Duval (jerome.duval@free.fr)
3 * Distributed under the terms of the MIT License.
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
{
19 MultiAudioDevice(const char* name
, const char* path
);
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
);
38 status_t
_InitDriver();
39 status_t
_GetBuffers();
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