summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore_audio.c
diff options
context:
space:
mode:
authorDaniel Willmann <d.willmann@samsung.com>2013-04-02 16:21:44 +0100
committerDaniel Willmann <d.willmann@samsung.com>2013-04-02 16:21:44 +0100
commit75aa9118d0900639380d0ec764c732eeafdb0876 (patch)
treec66a3dc1d7ea57db127d58cdd17abb5be3c9ba85 /src/tests/ecore/ecore_test_ecore_audio.c
parent35d203d9e7bbc50cefd3e5c88946be74da21eb62 (diff)
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>
Diffstat (limited to '')
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index 07b0bde..bcf4b22 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -185,7 +185,7 @@ START_TEST(ecore_test_ecore_audio_sndfile)
185 in = ecore_audio_input_add(ECORE_AUDIO_TYPE_SNDFILE); 185 in = ecore_audio_input_add(ECORE_AUDIO_TYPE_SNDFILE);
186 fail_if(!in); 186 fail_if(!in);
187 187
188 ecore_audio_input_userdata_set(in, &len); 188 ecore_audio_input_data_set(in, &len);
189 ecore_audio_input_name_set(in, "sms.ogg"); 189 ecore_audio_input_name_set(in, "sms.ogg");
190 ecore_audio_input_sndfile_filename_set(in, SOUNDS_DIR"sms.ogg"); 190 ecore_audio_input_sndfile_filename_set(in, SOUNDS_DIR"sms.ogg");
191 fail_if(ecore_audio_input_channels_get(in) != 2); 191 fail_if(ecore_audio_input_channels_get(in) != 2);
@@ -195,7 +195,7 @@ START_TEST(ecore_test_ecore_audio_sndfile)
195// fail_if(len != ecore_audio_input_remaining_get(in)); 195// fail_if(len != ecore_audio_input_remaining_get(in));
196 fail_if(strcmp("sms.ogg", ecore_audio_input_name_get(in))); 196 fail_if(strcmp("sms.ogg", ecore_audio_input_name_get(in)));
197 197
198 fail_if(ecore_audio_input_userdata_get(in) != &len); 198 fail_if(ecore_audio_input_data_get(in) != &len);
199 ecore_audio_input_del(in); 199 ecore_audio_input_del(in);
200} 200}
201END_TEST 201END_TEST
@@ -208,13 +208,13 @@ struct buffer {
208 208
209int _get_length(Ecore_Audio_Object *in) 209int _get_length(Ecore_Audio_Object *in)
210{ 210{
211 struct buffer *buf = ecore_audio_input_userdata_get(in); 211 struct buffer *buf = ecore_audio_input_data_get(in);
212 return buf->length; 212 return buf->length;
213} 213}
214 214
215int _seek(Ecore_Audio_Object *in, int offs, int whence) 215int _seek(Ecore_Audio_Object *in, int offs, int whence)
216{ 216{
217 struct buffer *buf = ecore_audio_input_userdata_get(in); 217 struct buffer *buf = ecore_audio_input_data_get(in);
218 218
219 switch (whence) { 219 switch (whence) {
220 case SEEK_SET: 220 case SEEK_SET:
@@ -232,13 +232,13 @@ int _seek(Ecore_Audio_Object *in, int offs, int whence)
232 232
233int _tell(Ecore_Audio_Object *in) 233int _tell(Ecore_Audio_Object *in)
234{ 234{
235 struct buffer *buf = ecore_audio_input_userdata_get(in); 235 struct buffer *buf = ecore_audio_input_data_get(in);
236 return buf->offset; 236 return buf->offset;
237} 237}
238 238
239int _read(Ecore_Audio_Object *in, void *buffer, int length) 239int _read(Ecore_Audio_Object *in, void *buffer, int length)
240{ 240{
241 struct buffer *buf = ecore_audio_input_userdata_get(in); 241 struct buffer *buf = ecore_audio_input_data_get(in);
242 242
243 if ((buf->offset + length) > buf->length) 243 if ((buf->offset + length) > buf->length)
244 length = buf->length - buf->offset; 244 length = buf->length - buf->offset;
@@ -251,7 +251,7 @@ int _read(Ecore_Audio_Object *in, void *buffer, int length)
251 251
252int _write(Ecore_Audio_Object *out, const void *buffer, int length) 252int _write(Ecore_Audio_Object *out, const void *buffer, int length)
253{ 253{
254 struct buffer *buf = ecore_audio_output_userdata_get(out); 254 struct buffer *buf = ecore_audio_output_data_get(out);
255 255
256 if ((buf->offset + length) > buf->length) 256 if ((buf->offset + length) > buf->length)
257 length = buf->length - buf->offset; 257 length = buf->length - buf->offset;
@@ -305,7 +305,7 @@ START_TEST(ecore_test_ecore_audio_sndfile_vio)
305 ecore_audio_input_name_set(in, "tmp"); 305 ecore_audio_input_name_set(in, "tmp");
306 ecore_audio_input_channels_set(in, 1); 306 ecore_audio_input_channels_set(in, 1);
307 ecore_audio_input_samplerate_set(in, 44100); 307 ecore_audio_input_samplerate_set(in, 44100);
308 ecore_audio_input_userdata_set(in, &indata); 308 ecore_audio_input_data_set(in, &indata);
309 ecore_audio_input_sndfile_format_set(in, SF_FORMAT_RAW | SF_FORMAT_PCM_U8); 309 ecore_audio_input_sndfile_format_set(in, SF_FORMAT_RAW | SF_FORMAT_PCM_U8);
310 310
311 ecore_audio_input_sndfile_vio_set(in, &vio); 311 ecore_audio_input_sndfile_vio_set(in, &vio);
@@ -314,7 +314,7 @@ START_TEST(ecore_test_ecore_audio_sndfile_vio)
314 fail_if(!out); 314 fail_if(!out);
315 ecore_audio_output_name_set(out, "tmp"); 315 ecore_audio_output_name_set(out, "tmp");
316 ecore_audio_output_sndfile_format_set(out, SF_FORMAT_RAW | SF_FORMAT_PCM_U8); 316 ecore_audio_output_sndfile_format_set(out, SF_FORMAT_RAW | SF_FORMAT_PCM_U8);
317 ecore_audio_output_userdata_set(out, &outdata); 317 ecore_audio_output_data_set(out, &outdata);
318 318
319 ecore_audio_output_sndfile_vio_set(out, &vio); 319 ecore_audio_output_sndfile_vio_set(out, &vio);
320 320