]> gitweb @ CieloNegro.org - bindings-EsounD.git/blob - Bindings/EsounD.hsc
fix build-depends
[bindings-EsounD.git] / Bindings / EsounD.hsc
1 #include <bindings.dsl.h>
2 #include <esd.h>
3
4 module Bindings.EsounD where
5 #strict_import
6 import Bindings.AudioFile
7
8 #globalarray ESD_UNIX_SOCKET_DIR , CChar
9 #globalarray ESD_UNIX_SOCKET_NAME, CChar
10
11 #num ESD_BUF_SIZE
12 #num ESD_MAX_WRITE_SIZE
13 #num ESD_KEY_LEN
14 #num ESD_DEFAULT_PORT
15 #num ESD_DEFAULT_RATE
16 #num ESD_NAME_MAX
17 #num ESD_ENDIAN_KEY
18 #num ESD_VOLUME_BASE
19
20 #num ESD_PROTO_CONNECT
21 #num ESD_PROTO_LOCK
22 #num ESD_PROTO_UNLOCK
23 #num ESD_PROTO_STREAM_PLAY
24 #num ESD_PROTO_STREAM_REC
25 #num ESD_PROTO_STREAM_MON
26 #num ESD_PROTO_SAMPLE_CACHE
27 #num ESD_PROTO_SAMPLE_FREE
28 #num ESD_PROTO_SAMPLE_PLAY
29 #num ESD_PROTO_SAMPLE_LOOP
30 #num ESD_PROTO_SAMPLE_STOP
31 #num ESD_PROTO_SAMPLE_KILL
32 #num ESD_PROTO_STANDBY
33 #num ESD_PROTO_RESUME
34 #num ESD_PROTO_SAMPLE_GETID
35 #num ESD_PROTO_STREAM_FILT
36 #num ESD_PROTO_SERVER_INFO
37 #num ESD_PROTO_ALL_INFO
38 #num ESD_PROTO_SUBSCRIBE
39 #num ESD_PROTO_UNSUBSCRIBE
40 #num ESD_PROTO_STREAM_PAN
41 #num ESD_PROTO_SAMPLE_PAN
42 #num ESD_PROTO_STANDBY_MODE
43 #num ESD_PROTO_LATENCY
44 #num ESD_PROTO_MAX
45
46 #num ESD_MASK_BITS
47 #num ESD_BITS8
48 #num ESD_BITS16
49
50 #num ESD_MASK_CHAN
51 #num ESD_MONO
52 #num ESD_STEREO
53
54 #num ESD_MASK_MODE
55 #num ESD_STREAM
56 #num ESD_SAMPLE
57 #num ESD_ADPCM
58
59 #num ESD_MASK_FUNC
60 #num ESD_PLAY
61 #num ESD_MONITOR
62 #num ESD_RECORD
63 #num ESD_STOP
64 #num ESD_LOOP
65
66 #integral_t esd_format_t
67 #integral_t esd_proto_t
68
69 #integral_t octet
70
71 #ccall esd_open_sound, Ptr CChar -> IO CInt
72 #ccall esd_send_auth , CInt -> IO CInt
73 #ccall esd_lock      , CInt -> IO CInt
74 #ccall esd_unlock    , CInt -> IO CInt
75 #ccall esd_standby   , CInt -> IO CInt
76 #ccall esd_resume    , CInt -> IO CInt
77
78 #ccall esd_play_stream           , <esd_format_t> -> CInt -> Ptr CChar -> Ptr CChar -> IO CInt
79 #ccall esd_play_stream_fallback  , <esd_format_t> -> CInt -> Ptr CChar -> Ptr CChar -> IO CInt
80 #ccall esd_monitor_stream        , <esd_format_t> -> CInt -> Ptr CChar -> Ptr CChar -> IO CInt
81 #ccall esd_record_stream         , <esd_format_t> -> CInt -> Ptr CChar -> Ptr CChar -> IO CInt
82 #ccall esd_record_stream_fallback, <esd_format_t> -> CInt -> Ptr CChar -> Ptr CChar -> IO CInt
83 #ccall esd_filter_stream         , <esd_format_t> -> CInt -> Ptr CChar -> Ptr CChar -> IO CInt
84 #ccall esd_sample_cache          , CInt -> <esd_format_t> -> CInt -> CInt -> Ptr CChar -> IO CInt
85 #ccall esd_confirm_sample_cache  , CInt -> IO CInt
86 #ccall esd_sample_getid          , CInt -> Ptr CChar -> IO CInt
87 #ccall esd_sample_free           , CInt -> CInt -> IO CInt
88 #ccall esd_sample_play           , CInt -> CInt -> IO CInt
89 #ccall esd_sample_loop           , CInt -> CInt -> IO CInt
90 #ccall esd_sample_stop           , CInt -> CInt -> IO CInt
91 #ccall esd_sample_kill           , CInt -> CInt -> IO CInt
92 #ccall esd_close                 , CInt -> IO CInt
93 #ccall esd_get_latency           , CInt -> IO CInt
94
95 #starttype struct esd_server_info
96 #  field version, CInt
97 #  field format , <esd_format_t>
98 #  field rate   , CInt
99 #stoptype
100 #synonym_t esd_server_info_t, <esd_server_info>
101
102 #starttype struct esd_player_info
103 #  field next           , Ptr <esd_player_info>
104 #  field server         , Ptr <esd_server_info_t>
105 #  field source_id      , CInt
106 #  array_field name     , CChar
107 #  field rate           , CInt
108 #  field left_vol_scale , CInt
109 #  field right_vol_scale, CInt
110 #  field format         , <esd_format_t>
111 #stoptype
112 #synonym_t esd_player_info_t, <esd_player_info>
113
114 #starttype struct esd_sample_info
115 #  field next           , Ptr <esd_sample_info>
116 #  field server         , Ptr <esd_server_info_t>
117 #  field sample_id      , CInt
118 #  array_field name     , CChar
119 #  field rate           , CInt
120 #  field left_vol_scale , CInt
121 #  field right_vol_scale, CInt
122 #  field format         , <esd_format_t>
123 #  field length         , CInt
124 #stoptype
125 #synonym_t esd_sample_info_t, <esd_sample_info>
126
127 #starttype struct esd_info
128 #  field server     , Ptr <esd_server_info_t>
129 #  field player_list, Ptr <esd_player_info_t>
130 #  field sample_list, Ptr <esd_sample_info_t>
131 #stoptype
132 #synonym_t esd_info_t, <esd_info>
133
134 #num ESM_ERROR
135 #num ESM_ON_STANDBY
136 #num ESM_ON_AUTOSTANDBY
137 #num ESM_RUNNING
138 #integral_t esd_standby_mode_t
139
140 #callback esd_new_player_callback_t, Ptr <esd_player_info_t> -> IO CInt
141 #callback esd_old_player_callback_t, Ptr <esd_player_info_t> -> IO CInt
142 #callback esd_new_sample_callback_t, Ptr <esd_sample_info_t> -> IO CInt
143 #callback esd_old_sample_callback_t, Ptr <esd_sample_info_t> -> IO CInt
144
145 #starttype struct esd_update_info_callbacks
146 #  field esd_new_player_callback, Ptr <esd_new_player_callback_t>
147 #  field esd_old_player_callback, Ptr <esd_old_player_callback_t>
148 #  field esd_new_sample_callback, Ptr <esd_new_sample_callback_t>
149 #  field esd_old_sample_callback, Ptr <esd_old_sample_callback_t>
150 #stoptype
151 #synonym_t esd_update_info_callbacks_t, <esd_update_info_callbacks>
152
153 #ccall esd_print_server_info     , Ptr <esd_server_info_t> -> IO ()
154 #ccall esd_print_player_info     , Ptr <esd_player_info_t> -> IO ()
155 #ccall esd_print_sample_info     , Ptr <esd_sample_info_t> -> IO ()
156 #ccall esd_print_all_info        , Ptr <esd_info_t> -> IO ()
157 #ccall esd_get_server_info       , CInt -> IO (Ptr <esd_server_info_t>)
158 #ccall esd_free_server_info      , Ptr <esd_server_info_t> -> IO ()
159 #ccall esd_get_all_info          , CInt -> IO (Ptr <esd_info_t>)
160 #ccall esd_subscribe_all_info    , CInt -> IO (Ptr <esd_info_t>)
161 #ccall esd_update_info           , CInt -> Ptr <esd_info_t> -> Ptr <esd_update_info_callbacks_t> -> IO (Ptr <esd_info_t>)
162 #ccall esd_unsubscribe_info      , CInt -> IO (Ptr <esd_info_t>)
163 #ccall esd_free_all_info         , Ptr <esd_info_t> -> IO ()
164 #ccall esd_set_stream_pan        , CInt -> CInt -> CInt -> CInt -> IO CInt
165 #ccall esd_set_default_sample_pan, CInt -> CInt -> CInt -> CInt -> IO CInt
166 #ccall esd_get_standby_mode      , CInt -> IO <esd_standby_mode_t>
167
168 #ccall esd_send_file , CInt -> <AFfilehandle> -> CInt -> IO CInt
169 #ccall esd_play_file , Ptr CChar -> Ptr CChar -> CInt -> IO CInt
170 #ccall esd_file_cache, CInt -> Ptr CChar -> Ptr CChar -> IO CInt
171
172 #globalvar esd_audio_format, <esd_format_t>
173 #globalvar esd_audio_rate  , CInt
174 #globalvar esd_audio_device, Ptr CChar
175
176 #ccall esd_audio_devices, IO (Ptr CChar)
177 #ccall esd_audio_open   , IO CInt
178 #ccall esd_audio_close  , IO ()
179 #ccall esd_audio_pause  , IO ()
180 #ccall esd_audio_write  , Ptr () -> CInt -> IO CInt
181 #ccall esd_audio_read   , Ptr () -> CInt -> IO CInt
182 #ccall esd_audio_flush  , IO ()
183
184 #ccall esd_get_socket_dirname, IO (Ptr CChar)
185 #ccall esd_get_socket_name   , IO (Ptr CChar)
186
187 #ccall have_ipv6, IO CInt