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