test/testautomation_suites.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 07 Jul 2019 09:10:56 -0700
changeset 12928 3c4a4b1077cd
parent 8645 d69fdbefeecf
permissions -rw-r--r--
Fixed bug 4710 - audio/alsa: avoid configuring hardware parameters with only a single period

Anthony Pesch

The previous code first configured the period size using snd_pcm_hw_par-
ams_set_period_size_near. Then, it further narrowed the configuration
space by calling snd_pcm_hw_params_set_buffer_size_near using a buffer
size of 2 times the _requested_ period size in order to try and get a
configuration with only 2 periods. If the configured period size was
larger than the requested size, the second call could inadvertently
narrow the configuration space to contain only a single period.

Rather than fixing the call to snd_pcm_hw_params_set_buffer_size_near
to use a size of 2 times the configured period size, the code has been
changed to use snd_pcm_hw_params_set_periods_min in order to more
clearly explain the intent.
     1 /**
     2  * Reference to all test suites.
     3  *
     4  */
     5 
     6 #ifndef _testsuites_h
     7 #define _testsuites_h
     8 
     9 #include "SDL_test.h"
    10 
    11 /* Test collections */
    12 extern SDLTest_TestSuiteReference audioTestSuite;
    13 extern SDLTest_TestSuiteReference clipboardTestSuite;
    14 extern SDLTest_TestSuiteReference eventsTestSuite;
    15 extern SDLTest_TestSuiteReference keyboardTestSuite;
    16 extern SDLTest_TestSuiteReference mainTestSuite;
    17 extern SDLTest_TestSuiteReference mouseTestSuite;
    18 extern SDLTest_TestSuiteReference pixelsTestSuite;
    19 extern SDLTest_TestSuiteReference platformTestSuite;
    20 extern SDLTest_TestSuiteReference rectTestSuite;
    21 extern SDLTest_TestSuiteReference renderTestSuite;
    22 extern SDLTest_TestSuiteReference rwopsTestSuite;
    23 extern SDLTest_TestSuiteReference sdltestTestSuite;
    24 extern SDLTest_TestSuiteReference stdlibTestSuite;
    25 extern SDLTest_TestSuiteReference surfaceTestSuite;
    26 extern SDLTest_TestSuiteReference syswmTestSuite;
    27 extern SDLTest_TestSuiteReference timerTestSuite;
    28 extern SDLTest_TestSuiteReference videoTestSuite;
    29 extern SDLTest_TestSuiteReference hintsTestSuite;
    30 
    31 /* All test suites */
    32 SDLTest_TestSuiteReference *testSuites[] =  {
    33     &audioTestSuite,
    34     &clipboardTestSuite,
    35     &eventsTestSuite,
    36     &keyboardTestSuite,
    37     &mainTestSuite,
    38     &mouseTestSuite,
    39     &pixelsTestSuite,
    40     &platformTestSuite,
    41     &rectTestSuite,
    42     &renderTestSuite,
    43     &rwopsTestSuite,
    44     &sdltestTestSuite,
    45     &stdlibTestSuite,
    46     &surfaceTestSuite,
    47     &syswmTestSuite,
    48     &timerTestSuite,
    49     &videoTestSuite,
    50     &hintsTestSuite,
    51     NULL
    52 };
    53 
    54 #endif