int main(int argc, char * argv[]) { #ifdef CUBEB_GECKO_BUILD ScopedXPCOM xpcom("test_sanity"); #endif test_init_destroy_context(); test_init_destroy_multiple_contexts(); test_context_variables(); test_init_destroy_stream(); test_init_destroy_multiple_streams(); test_configure_stream(); test_basic_stream_operations(); test_stream_position(); /* Sometimes, when using WASAPI on windows 7 (vista and 8 are okay), and * calling Activate a lot on an AudioClient, 0x800700b7 is returned. This is * the HRESULT value for "Cannot create a file when that file already exists", * and is not documented as a possible return value for this call. Hence, we * try to limit the number of streams we create in this test. */ if (!is_windows_7()) { test_init_destroy_multiple_contexts_and_streams(); delay_callback = 0; test_init_start_stop_destroy_multiple_streams(0, 0); test_init_start_stop_destroy_multiple_streams(1, 0); test_init_start_stop_destroy_multiple_streams(0, 150); test_init_start_stop_destroy_multiple_streams(1, 150); delay_callback = 1; test_init_start_stop_destroy_multiple_streams(0, 0); test_init_start_stop_destroy_multiple_streams(1, 0); test_init_start_stop_destroy_multiple_streams(0, 150); test_init_start_stop_destroy_multiple_streams(1, 150); } delay_callback = 0; test_drain(); /* to implement: test_eos_during_prefill(); test_stream_destroy_pending_drain(); */ printf("\n"); return 0; }
TEST(cubeb, init_start_stop_destroy_multiple_streams) { /* Sometimes, when using WASAPI on windows 7 (vista and 8 are okay), and * calling Activate a lot on an AudioClient, 0x800700b7 is returned. This is * the HRESULT value for "Cannot create a file when that file already exists", * and is not documented as a possible return value for this call. Hence, we * try to limit the number of streams we create in this test. */ if (!is_windows_7()) { delay_callback = 0; test_init_start_stop_destroy_multiple_streams(0, 0); test_init_start_stop_destroy_multiple_streams(1, 0); test_init_start_stop_destroy_multiple_streams(0, 150); test_init_start_stop_destroy_multiple_streams(1, 150); delay_callback = 1; test_init_start_stop_destroy_multiple_streams(0, 0); test_init_start_stop_destroy_multiple_streams(1, 0); test_init_start_stop_destroy_multiple_streams(0, 150); test_init_start_stop_destroy_multiple_streams(1, 150); } }