Fix for new automake and 64 bit compatibility.
[platform/core/multimedia/avsystem.git] / include / avsys-audio-pasimple.h
1 /*
2  * avsystem
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Jonghyuk Choi <jhchoi.choi@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22 #ifndef __AVSYS_AUDIO_PASIMPLE_H__
23 #define __AVSYS_AUDIO_PASIMPLE_H__
24
25 #ifdef __cplusplus
26         extern "C" {
27 #endif
28 #include <avsys-audio-handle.h>
29 #include <pulse/simple.h>
30 #include <pulse/error.h>
31 #include <pulse/gccmacro.h>
32 #include <pulse/proplist.h>
33 #include <pulse/channelmap.h>
34
35 typedef struct {
36         void                            *pasimple_handle;
37         unsigned int            samplesize;
38         unsigned int            period_frames;
39         unsigned int            buffer_frames;
40         unsigned int            mode;
41         unsigned int            periods_per_buffer;
42 } avsys_audio_pasimple_handle_t;
43
44 int avsys_audio_pasimple_open_device(const int mode, const unsigned int format, const unsigned int channel, const unsigned int samplerate, avsys_audio_handle_t *handle,int policy);
45 int avsys_audio_pasimple_close_device(avsys_audio_handle_t *handle);
46 int avsys_audio_pasimple_write(avsys_audio_handle_t *handle, const void *buf, int size);
47 int avsys_audio_pasimple_read(avsys_audio_handle_t *handle, void *buf, int size);
48 int avsys_audio_pasimple_reset(avsys_audio_handle_t *handle);
49 int avsys_audio_pasimple_drain(avsys_audio_handle_t *handle);
50 int avsys_audio_pasimple_delay(avsys_audio_handle_t *handle, int *delay_frames);
51 int avsys_audio_pasimple_set_volume(avsys_audio_handle_t *handle, int volume);
52 int avsys_audio_pasimple_get_period_buffer_time(avsys_audio_handle_t *handle, unsigned int *period_time, unsigned int *buffer_time);
53 int avsys_audio_pasimple_cork(avsys_audio_handle_t *handle, int cork);
54 int avsys_audio_pasimple_is_corked(avsys_audio_handle_t *handle, int *is_corked);
55
56 #ifdef __cplusplus
57         }
58 #endif
59
60 #endif /* __AVSYS_AUDIO_PASIMPLE_H__ */