Commit b509b548 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dsound/tests: Avoid ARRAY_SIZE-like macros.

parent 3a728361
......@@ -549,7 +549,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
"should have 0\n",ref);
}
for (f=0;f<NB_FORMATS;f++) {
for (f = 0; f < ARRAY_SIZE(formats); f++) {
dscbo=NULL;
init_format(&wfx,WAVE_FORMAT_PCM,formats[f][0],formats[f][1],
formats[f][2]);
......
......@@ -571,8 +571,8 @@ static HRESULT test_primary_secondary(LPGUID lpGuid)
"IDirectSound_CreateSoundBuffer() failed to create a primary buffer %08x\n",rc);
if (rc==DS_OK && primary!=NULL) {
for (f=0;f<NB_FORMATS;f++) {
for (tag=0;tag<NB_TAGS;tag++) {
for (f = 0; f < ARRAY_SIZE(formats); f++) {
for (tag = 0; tag < ARRAY_SIZE(format_tags); tag++) {
/* if float, we only want to test 32-bit */
if ((format_tags[tag] == WAVE_FORMAT_IEEE_FLOAT) && (formats[f][1] != 32))
continue;
......@@ -718,8 +718,8 @@ static HRESULT test_secondary(LPGUID lpGuid)
if (rc!=DS_OK)
goto EXIT1;
for (f=0;f<NB_FORMATS;f++) {
for (tag=0;tag<NB_TAGS;tag++) {
for (f = 0; f < ARRAY_SIZE(formats); f++) {
for (tag = 0; tag < ARRAY_SIZE(format_tags); tag++) {
WAVEFORMATEXTENSIBLE wfxe;
/* if float, we only want to test 32-bit */
......
......@@ -581,8 +581,8 @@ static HRESULT test_primary_secondary8(LPGUID lpGuid)
"%08x\n",rc);
if (rc==DS_OK && primary!=NULL) {
for (f=0;f<NB_FORMATS;f++) {
for (tag=0;tag<NB_TAGS;tag++) {
for (f = 0; f < ARRAY_SIZE(formats); f++) {
for (tag = 0; tag < ARRAY_SIZE(format_tags); tag++) {
/* if float, we only want to test 32-bit */
if ((format_tags[tag] == WAVE_FORMAT_IEEE_FLOAT) && (formats[f][1] != 32))
continue;
......@@ -727,8 +727,8 @@ static HRESULT test_secondary8(LPGUID lpGuid)
if (rc!=DS_OK)
goto EXIT1;
for (f=0;f<NB_FORMATS;f++) {
for (tag=0;tag<NB_TAGS;tag++) {
for (f = 0; f < ARRAY_SIZE(formats); f++) {
for (tag = 0; tag < ARRAY_SIZE(format_tags); tag++) {
WAVEFORMATEXTENSIBLE wfxe;
/* if float, we only want to test 32-bit */
......
......@@ -71,10 +71,8 @@ static const unsigned int formats[][4]={
{96000, 32, 1, 0 },
{96000, 32, 2, 0 }
};
#define NB_FORMATS (sizeof(formats)/sizeof(*formats))
static const unsigned int format_tags[] = {WAVE_FORMAT_PCM, WAVE_FORMAT_IEEE_FLOAT};
#define NB_TAGS (sizeof(format_tags)/sizeof(*format_tags))
/* The time slice determines how often we will service the buffer */
#define TIME_SLICE 31
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment