ssize_t len_read = 0;
const Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS);
- char *buf = va_arg(*list, char *);
+ void *buf = va_arg(*list, void *);
size_t len = va_arg(*list, size_t);
ssize_t *ret = va_arg(*list, ssize_t *);
*ret = len_read;
}
-static void _read_internal(Eo *eo_obj, void *_pd, va_list *list)
+static void _read_internal(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list)
{
- const Ecore_Audio_Input *obj = _pd;
ssize_t len_read = 0;
const Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS);
- char *buf = va_arg(*list, char *);
+ void *buf = va_arg(*list, void *);
size_t len = va_arg(*list, size_t);
ssize_t *ret = va_arg(*list, ssize_t *);
#define ecore_audio_obj_in_length_get(ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_LENGTH_GET), EO_TYPECHECK(double *, ret)
-#define ecore_audio_obj_in_read(buf, len, ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_READ), EO_TYPECHECK(char *, buf), EO_TYPECHECK(size_t, len), EO_TYPECHECK(ssize_t *, ret)
+#define ecore_audio_obj_in_read(buf, len, ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_READ), EO_TYPECHECK(void *, buf), EO_TYPECHECK(size_t, len), EO_TYPECHECK(ssize_t *, ret)
#define ecore_audio_obj_in_seek(offs, mode, ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_SEEK), EO_TYPECHECK(double, offs), EO_TYPECHECK(int, mode), EO_TYPECHECK(double *, ret)
/* End virtual IO wrapper functions */
-static void _read(Eo *eo_obj, void *_pd, va_list *list)
+static void _read(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
{
Ecore_Audio_Sndfile *obj = _pd;
int read;
void *data = va_arg(*list, void *);
- int len = va_arg(*list, int);
- int *ret = va_arg(*list, int *);
+ size_t len = va_arg(*list, size_t);
+ ssize_t *ret = va_arg(*list, ssize_t *);
read = sf_read_float(obj->handle, data, len/4)*4;
Ecore_Audio_Sndfile *obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS);
Ecore_Audio_Output *out_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_OUT_CLASS);
- int written, bread;
+ ssize_t written, bread;
float buf[1024];
/* TODO: Support mixing of multiple inputs */
#include "Ecore.h"
#include "Ecore_Audio.h"
-#define ecore_audio_obj_in_read_internal(buf, len, ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_READ_INTERNAL), EO_TYPECHECK(char *, buf), EO_TYPECHECK(int, len), EO_TYPECHECK(int *, ret)
+#define ecore_audio_obj_in_read_internal(buf, len, ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_READ_INTERNAL), EO_TYPECHECK(void *, buf), EO_TYPECHECK(size_t, len), EO_TYPECHECK(ssize_t *, ret)
#endif