forked from enlightenment/efl
ecore_audio: Rename ecore_audio_*_userdata_{get,set} userdata -> data
As mentioned by Cedric *_data_set is used in other places of EFL already. Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
This commit is contained in:
parent
35d203d9e7
commit
75aa9118d0
|
@ -166,7 +166,7 @@ EAPI void ecore_audio_output_del(Ecore_Audio_Object *output);
|
||||||
*
|
*
|
||||||
* @since 1.8
|
* @since 1.8
|
||||||
*/
|
*/
|
||||||
EAPI void ecore_audio_output_userdata_set(Ecore_Audio_Object *output, void *data);
|
EAPI void ecore_audio_output_data_set(Ecore_Audio_Object *output, void *data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the user data pointer
|
* @brief Get the user data pointer
|
||||||
|
@ -177,7 +177,7 @@ EAPI void ecore_audio_output_userdata_set(Ecore_Audio_Object *output, void *data
|
||||||
*
|
*
|
||||||
* @since 1.8
|
* @since 1.8
|
||||||
*/
|
*/
|
||||||
EAPI void *ecore_audio_output_userdata_get(Ecore_Audio_Object *output);
|
EAPI void *ecore_audio_output_data_get(Ecore_Audio_Object *output);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the volume of the output
|
* @brief Set the volume of the output
|
||||||
|
@ -321,7 +321,7 @@ EAPI void ecore_audio_input_del(Ecore_Audio_Object *input);
|
||||||
*
|
*
|
||||||
* @since 1.8
|
* @since 1.8
|
||||||
*/
|
*/
|
||||||
EAPI void ecore_audio_input_userdata_set(Ecore_Audio_Object *input, void *data);
|
EAPI void ecore_audio_input_data_set(Ecore_Audio_Object *input, void *data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the user data pointer
|
* @brief Get the user data pointer
|
||||||
|
@ -332,7 +332,7 @@ EAPI void ecore_audio_input_userdata_set(Ecore_Audio_Object *input, void *data);
|
||||||
*
|
*
|
||||||
* @since 1.8
|
* @since 1.8
|
||||||
*/
|
*/
|
||||||
EAPI void *ecore_audio_input_userdata_get(Ecore_Audio_Object *input);
|
EAPI void *ecore_audio_input_data_get(Ecore_Audio_Object *input);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the sample rate of the input
|
* @brief Get the sample rate of the input
|
||||||
|
|
|
@ -190,13 +190,13 @@ ecore_audio_output_del(Ecore_Audio_Object *output)
|
||||||
free(output);
|
free(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void ecore_audio_output_userdata_set(Ecore_Audio_Object *output, void *data)
|
EAPI void ecore_audio_output_data_set(Ecore_Audio_Object *output, void *data)
|
||||||
{
|
{
|
||||||
Ecore_Audio_Output *out = (Ecore_Audio_Output *)output;
|
Ecore_Audio_Output *out = (Ecore_Audio_Output *)output;
|
||||||
out->user_data = data;
|
out->user_data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *ecore_audio_output_userdata_get(Ecore_Audio_Object *output)
|
EAPI void *ecore_audio_output_data_get(Ecore_Audio_Object *output)
|
||||||
{
|
{
|
||||||
Ecore_Audio_Output *out = (Ecore_Audio_Output *)output;
|
Ecore_Audio_Output *out = (Ecore_Audio_Output *)output;
|
||||||
return out->user_data;
|
return out->user_data;
|
||||||
|
@ -371,13 +371,13 @@ ecore_audio_input_del(Ecore_Audio_Object *input)
|
||||||
free(in);
|
free(in);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void ecore_audio_input_userdata_set(Ecore_Audio_Object *input, void *data)
|
EAPI void ecore_audio_input_data_set(Ecore_Audio_Object *input, void *data)
|
||||||
{
|
{
|
||||||
Ecore_Audio_Input *in = (Ecore_Audio_Input *)input;
|
Ecore_Audio_Input *in = (Ecore_Audio_Input *)input;
|
||||||
in->user_data = data;
|
in->user_data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void *ecore_audio_input_userdata_get(Ecore_Audio_Object *input)
|
EAPI void *ecore_audio_input_data_get(Ecore_Audio_Object *input)
|
||||||
{
|
{
|
||||||
Ecore_Audio_Input *in = (Ecore_Audio_Input *)input;
|
Ecore_Audio_Input *in = (Ecore_Audio_Input *)input;
|
||||||
return in->user_data;
|
return in->user_data;
|
||||||
|
|
|
@ -23,14 +23,14 @@ struct _edje_multisense_eet_data
|
||||||
static int
|
static int
|
||||||
eet_snd_file_get_length(Ecore_Audio_Object *in)
|
eet_snd_file_get_length(Ecore_Audio_Object *in)
|
||||||
{
|
{
|
||||||
struct _edje_multisense_eet_data *vf = ecore_audio_input_userdata_get(in);
|
struct _edje_multisense_eet_data *vf = ecore_audio_input_data_get(in);
|
||||||
return vf->length;
|
return vf->length;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
eet_snd_file_seek(Ecore_Audio_Object *in, int offset, int whence)
|
eet_snd_file_seek(Ecore_Audio_Object *in, int offset, int whence)
|
||||||
{
|
{
|
||||||
struct _edje_multisense_eet_data *vf = ecore_audio_input_userdata_get(in);
|
struct _edje_multisense_eet_data *vf = ecore_audio_input_data_get(in);
|
||||||
|
|
||||||
switch (whence)
|
switch (whence)
|
||||||
{
|
{
|
||||||
|
@ -52,7 +52,7 @@ eet_snd_file_seek(Ecore_Audio_Object *in, int offset, int whence)
|
||||||
static int
|
static int
|
||||||
eet_snd_file_read(Ecore_Audio_Object *in, void *buffer, int count)
|
eet_snd_file_read(Ecore_Audio_Object *in, void *buffer, int count)
|
||||||
{
|
{
|
||||||
struct _edje_multisense_eet_data *vf = ecore_audio_input_userdata_get(in);
|
struct _edje_multisense_eet_data *vf = ecore_audio_input_data_get(in);
|
||||||
|
|
||||||
if ((vf->offset + count) > vf->length)
|
if ((vf->offset + count) > vf->length)
|
||||||
count = vf->length - vf->offset;
|
count = vf->length - vf->offset;
|
||||||
|
@ -64,7 +64,7 @@ eet_snd_file_read(Ecore_Audio_Object *in, void *buffer, int count)
|
||||||
static int
|
static int
|
||||||
eet_snd_file_tell(Ecore_Audio_Object *in)
|
eet_snd_file_tell(Ecore_Audio_Object *in)
|
||||||
{
|
{
|
||||||
struct _edje_multisense_eet_data *vf = ecore_audio_input_userdata_get(in);
|
struct _edje_multisense_eet_data *vf = ecore_audio_input_data_get(in);
|
||||||
|
|
||||||
return vf->offset;
|
return vf->offset;
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
|
||||||
|
|
||||||
eet_data->offset = 0;
|
eet_data->offset = 0;
|
||||||
|
|
||||||
ecore_audio_input_userdata_set(in, eet_data);
|
ecore_audio_input_data_set(in, eet_data);
|
||||||
ecore_audio_input_sndfile_vio_set(in, &eet_data->vio);
|
ecore_audio_input_sndfile_vio_set(in, &eet_data->vio);
|
||||||
|
|
||||||
if (!out)
|
if (!out)
|
||||||
|
|
|
@ -185,7 +185,7 @@ START_TEST(ecore_test_ecore_audio_sndfile)
|
||||||
in = ecore_audio_input_add(ECORE_AUDIO_TYPE_SNDFILE);
|
in = ecore_audio_input_add(ECORE_AUDIO_TYPE_SNDFILE);
|
||||||
fail_if(!in);
|
fail_if(!in);
|
||||||
|
|
||||||
ecore_audio_input_userdata_set(in, &len);
|
ecore_audio_input_data_set(in, &len);
|
||||||
ecore_audio_input_name_set(in, "sms.ogg");
|
ecore_audio_input_name_set(in, "sms.ogg");
|
||||||
ecore_audio_input_sndfile_filename_set(in, SOUNDS_DIR"sms.ogg");
|
ecore_audio_input_sndfile_filename_set(in, SOUNDS_DIR"sms.ogg");
|
||||||
fail_if(ecore_audio_input_channels_get(in) != 2);
|
fail_if(ecore_audio_input_channels_get(in) != 2);
|
||||||
|
@ -195,7 +195,7 @@ START_TEST(ecore_test_ecore_audio_sndfile)
|
||||||
// fail_if(len != ecore_audio_input_remaining_get(in));
|
// fail_if(len != ecore_audio_input_remaining_get(in));
|
||||||
fail_if(strcmp("sms.ogg", ecore_audio_input_name_get(in)));
|
fail_if(strcmp("sms.ogg", ecore_audio_input_name_get(in)));
|
||||||
|
|
||||||
fail_if(ecore_audio_input_userdata_get(in) != &len);
|
fail_if(ecore_audio_input_data_get(in) != &len);
|
||||||
ecore_audio_input_del(in);
|
ecore_audio_input_del(in);
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
@ -208,13 +208,13 @@ struct buffer {
|
||||||
|
|
||||||
int _get_length(Ecore_Audio_Object *in)
|
int _get_length(Ecore_Audio_Object *in)
|
||||||
{
|
{
|
||||||
struct buffer *buf = ecore_audio_input_userdata_get(in);
|
struct buffer *buf = ecore_audio_input_data_get(in);
|
||||||
return buf->length;
|
return buf->length;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _seek(Ecore_Audio_Object *in, int offs, int whence)
|
int _seek(Ecore_Audio_Object *in, int offs, int whence)
|
||||||
{
|
{
|
||||||
struct buffer *buf = ecore_audio_input_userdata_get(in);
|
struct buffer *buf = ecore_audio_input_data_get(in);
|
||||||
|
|
||||||
switch (whence) {
|
switch (whence) {
|
||||||
case SEEK_SET:
|
case SEEK_SET:
|
||||||
|
@ -232,13 +232,13 @@ int _seek(Ecore_Audio_Object *in, int offs, int whence)
|
||||||
|
|
||||||
int _tell(Ecore_Audio_Object *in)
|
int _tell(Ecore_Audio_Object *in)
|
||||||
{
|
{
|
||||||
struct buffer *buf = ecore_audio_input_userdata_get(in);
|
struct buffer *buf = ecore_audio_input_data_get(in);
|
||||||
return buf->offset;
|
return buf->offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _read(Ecore_Audio_Object *in, void *buffer, int length)
|
int _read(Ecore_Audio_Object *in, void *buffer, int length)
|
||||||
{
|
{
|
||||||
struct buffer *buf = ecore_audio_input_userdata_get(in);
|
struct buffer *buf = ecore_audio_input_data_get(in);
|
||||||
|
|
||||||
if ((buf->offset + length) > buf->length)
|
if ((buf->offset + length) > buf->length)
|
||||||
length = buf->length - buf->offset;
|
length = buf->length - buf->offset;
|
||||||
|
@ -251,7 +251,7 @@ int _read(Ecore_Audio_Object *in, void *buffer, int length)
|
||||||
|
|
||||||
int _write(Ecore_Audio_Object *out, const void *buffer, int length)
|
int _write(Ecore_Audio_Object *out, const void *buffer, int length)
|
||||||
{
|
{
|
||||||
struct buffer *buf = ecore_audio_output_userdata_get(out);
|
struct buffer *buf = ecore_audio_output_data_get(out);
|
||||||
|
|
||||||
if ((buf->offset + length) > buf->length)
|
if ((buf->offset + length) > buf->length)
|
||||||
length = buf->length - buf->offset;
|
length = buf->length - buf->offset;
|
||||||
|
@ -305,7 +305,7 @@ START_TEST(ecore_test_ecore_audio_sndfile_vio)
|
||||||
ecore_audio_input_name_set(in, "tmp");
|
ecore_audio_input_name_set(in, "tmp");
|
||||||
ecore_audio_input_channels_set(in, 1);
|
ecore_audio_input_channels_set(in, 1);
|
||||||
ecore_audio_input_samplerate_set(in, 44100);
|
ecore_audio_input_samplerate_set(in, 44100);
|
||||||
ecore_audio_input_userdata_set(in, &indata);
|
ecore_audio_input_data_set(in, &indata);
|
||||||
ecore_audio_input_sndfile_format_set(in, SF_FORMAT_RAW | SF_FORMAT_PCM_U8);
|
ecore_audio_input_sndfile_format_set(in, SF_FORMAT_RAW | SF_FORMAT_PCM_U8);
|
||||||
|
|
||||||
ecore_audio_input_sndfile_vio_set(in, &vio);
|
ecore_audio_input_sndfile_vio_set(in, &vio);
|
||||||
|
@ -314,7 +314,7 @@ START_TEST(ecore_test_ecore_audio_sndfile_vio)
|
||||||
fail_if(!out);
|
fail_if(!out);
|
||||||
ecore_audio_output_name_set(out, "tmp");
|
ecore_audio_output_name_set(out, "tmp");
|
||||||
ecore_audio_output_sndfile_format_set(out, SF_FORMAT_RAW | SF_FORMAT_PCM_U8);
|
ecore_audio_output_sndfile_format_set(out, SF_FORMAT_RAW | SF_FORMAT_PCM_U8);
|
||||||
ecore_audio_output_userdata_set(out, &outdata);
|
ecore_audio_output_data_set(out, &outdata);
|
||||||
|
|
||||||
ecore_audio_output_sndfile_vio_set(out, &vio);
|
ecore_audio_output_sndfile_vio_set(out, &vio);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue