int buffer_size;
audio_channel_e ch;
audio_sample_type_e type;
+ unsigned int seed = (unsigned int)time(NULL);
audio_in_h input = (audio_in_h)data;
- srand(time(NULL));
-
audio_in_prepare(input);
audio_in_get_buffer_size(input, &buffer_size);
buf = (char *)malloc(buffer_size);
}
for (i=0; i<TEST_COUNT; i++) {
- switch (rand() % 8) {
+ switch (rand_r(&seed) % 8) {
case 0:
audio_in_prepare(input);
break;
int buffer_size;
audio_channel_e ch;
audio_sample_type_e type;
+ unsigned int seed = (unsigned int)time(NULL);
audio_out_h output = (audio_out_h)data;
audio_out_prepare(output);
for (i = 0; i < TEST_COUNT; i++) {
- switch (rand() % 9) {
+ switch (rand_r(&seed) % 9) {
case 0:
audio_out_prepare(output);
break;