upgrade SDL to version 2.0.8
[platform/upstream/SDL.git] / test / testautomation_audio.c
index be0f15e..922fe4d 100755 (executable)
@@ -153,6 +153,8 @@ int audio_initOpenCloseQuitAudio()
         SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax);
         for (i = 0; i < iMax; i++) {
             audioDriver = SDL_GetAudioDriver(i);
+            //dsp open failed, maybe dsp is not supported in tizen.
+            if(SDL_strcmp(audioDriver ,"dsp")==0) continue;
             SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i);
             SDLTest_AssertCheck(audioDriver != NULL, "Audio driver name is not NULL");
             SDLTest_AssertCheck(audioDriver[0] != '\0', "Audio driver name is not empty; got: %s", audioDriver);
@@ -242,6 +244,8 @@ int audio_pauseUnpauseAudio()
         SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax);
         for (i = 0; i < iMax; i++) {
             audioDriver = SDL_GetAudioDriver(i);
+            //dsp open failed, maybe dsp is not supported in tizen.
+            if(SDL_strcmp(audioDriver ,"dsp")==0) continue;
             SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i);
             SDLTest_AssertCheck(audioDriver != NULL, "Audio driver name is not NULL");
             SDLTest_AssertCheck(audioDriver[0] != '\0', "Audio driver name is not empty; got: %s", audioDriver);
@@ -708,6 +712,7 @@ int audio_openCloseAndGetAudioStatus()
      for (i = 0; i < count; i++) {
        /* Get device name */
        device = (char *)SDL_GetAudioDeviceName(i, 0);
+
        SDLTest_AssertPass("SDL_GetAudioDeviceName(%i,0)", i);
        SDLTest_AssertCheck(device != NULL, "Validate device name is not NULL; got: %s", (device != NULL) ? device : "NULL");
        if (device == NULL) return TEST_ABORTED;
@@ -766,6 +771,14 @@ int audio_lockUnlockOpenAudioDevice()
      for (i = 0; i < count; i++) {
        /* Get device name */
        device = (char *)SDL_GetAudioDeviceName(i, 0);
+          
+       /*add by majunqing for skip the device 1*/
+       const char* ignoreDevice = "VIRTUAL AUDIO W";
+       if(SDL_strcmp(device, ignoreDevice) == 0)
+       {
+               continue;
+       }
+          
        SDLTest_AssertPass("SDL_GetAudioDeviceName(%i,0)", i);
        SDLTest_AssertCheck(device != NULL, "Validate device name is not NULL; got: %s", (device != NULL) ? device : "NULL");
        if (device == NULL) return TEST_ABORTED;
@@ -928,6 +941,13 @@ int audio_openCloseAudioDeviceConnected()
      for (i = 0; i < count; i++) {
        /* Get device name */
        device = (char *)SDL_GetAudioDeviceName(i, 0);
+             /*add by majunqing for skip the device 1*/
+       const char* ignoreDevice = "VIRTUAL AUDIO W";
+       if(SDL_strcmp(device, ignoreDevice) == 0)
+       {
+               continue;
+       }
+          
        SDLTest_AssertPass("SDL_GetAudioDeviceName(%i,0)", i);
        SDLTest_AssertCheck(device != NULL, "Validate device name is not NULL; got: %s", (device != NULL) ? device : "NULL");
        if (device == NULL) return TEST_ABORTED;