ret = sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA, _sound_stream_focus_state_changed_cb, NULL, &stream_info);
assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
ret = tone_player_start_with_stream_info(TONE_TYPE_DEFAULT, stream_info, DURATION, NULL);
assert_eq(ret, TONE_PLAYER_ERROR_NONE);
+ ret = sound_manager_destroy_stream_information(stream_info);
+ assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
return 0;
}
ret = sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA, _sound_stream_focus_state_changed_cb, NULL, &stream_info);
assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
ret = tone_player_start_with_stream_info(-1, stream_info, DURATION, NULL);
assert_eq(ret, TONE_PLAYER_ERROR_INVALID_PARAMETER);
+ ret = sound_manager_destroy_stream_information(stream_info);
+ assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
return 0;
}
ret = sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA, _sound_stream_focus_state_changed_cb, NULL, &stream_info);
assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
ret = tone_player_start_with_stream_info(TONE_TYPE_DEFAULT, stream_info, DURATION, &id);
assert_eq(ret, TONE_PLAYER_ERROR_NONE);
+
ret = tone_player_stop(id);
assert_eq(ret, TONE_PLAYER_ERROR_NONE);
+
+ ret = sound_manager_destroy_stream_information(stream_info);
+ assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
return 0;
}
ret = sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA, _sound_stream_focus_state_changed_cb, NULL, &stream_info);
assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
ret = wav_player_start_with_stream_info(TESTFILE, stream_info, NULL, NULL, NULL);
assert_eq(WAV_PLAYER_ERROR_NONE, ret);
+
+ ret = sound_manager_destroy_stream_information(stream_info);
+ assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
return 0;
}
ret = sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA, _sound_stream_focus_state_changed_cb, NULL, &stream_info);
assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
ret = wav_player_start_with_stream_info(NULL, stream_info, NULL, NULL, NULL);
assert_eq(WAV_PLAYER_ERROR_INVALID_PARAMETER, ret);
+
+ ret = sound_manager_destroy_stream_information(stream_info);
+ assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
return 0;
}
*/
int utc_wav_player_stop_p2(void)
{
- int ret = WAV_PLAYER_ERROR_INVALID_PARAMETER, id = 0;
+ int ret = WAV_PLAYER_ERROR_INVALID_PARAMETER;
+ int id = 0;
sound_stream_info_h stream_info;
ret = sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA, _sound_stream_focus_state_changed_cb, NULL, &stream_info);
assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
ret = wav_player_start_with_stream_info(TESTFILE, stream_info, NULL, NULL, &id);
assert_eq(WAV_PLAYER_ERROR_NONE, ret);
+
ret = wav_player_stop(id);
assert_eq(WAV_PLAYER_ERROR_NONE, ret);
+ ret = sound_manager_destroy_stream_information(stream_info);
+ assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
return 0;
}
assert_eq(cb_ret, 1);
+ ret = sound_manager_destroy_stream_information(stream_info);
+ assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
return 0;
}