1 #include <bindings.dsl.h>
4 module Bindings.EsounD where
6 import Bindings.AudioFile
8 #globalarray ESD_UNIX_SOCKET_DIR , CChar
9 #globalarray ESD_UNIX_SOCKET_NAME, CChar
12 #num ESD_MAX_WRITE_SIZE
20 #num ESD_PROTO_CONNECT
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
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
66 #integral_t esd_format_t
67 #integral_t esd_proto_t
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
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
95 #starttype struct esd_server_info
97 # field format , <esd_format_t>
100 #synonym_t esd_server_info_t, <esd_server_info>
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
108 # field left_vol_scale , CInt
109 # field right_vol_scale, CInt
110 # field format , <esd_format_t>
112 #synonym_t esd_player_info_t, <esd_player_info>
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
120 # field left_vol_scale , CInt
121 # field right_vol_scale, CInt
122 # field format , <esd_format_t>
123 # field length , CInt
125 #synonym_t esd_sample_info_t, <esd_sample_info>
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>
132 #synonym_t esd_info_t, <esd_info>
136 #num ESM_ON_AUTOSTANDBY
138 #integral_t esd_standby_mode_t
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
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>
151 #synonym_t esd_update_info_callbacks_t, <esd_update_info_callbacks>
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>
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
172 #globalvar esd_audio_format, <esd_format_t>
173 #globalvar esd_audio_rate , CInt
174 #globalvar esd_audio_device, Ptr CChar
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 ()
184 #ccall esd_get_socket_dirname, IO (Ptr CChar)
185 #ccall esd_get_socket_name , IO (Ptr CChar)
187 #ccall have_ipv6, IO CInt