SDL_CloseAudio hanging under Pocket PC 2003 for ARM

Hello,

I have an application that runs on top of SDL under Windows 9x and 2000
just fine.

I compiled the application and SDL 1.2.8 for Pocket PC 2003 with an ARM
processor.

To my surprise, the application hung on exit while trying to free the
audio. I also tried SDL 1.2.6, but the result is the same.

I then wrote some test code (see below). The result is exactly the same:
the application hangs on SDL_CloseAudio().

Both the original application and the test code use the SDL windib video
and audio drivers.

Does anyone have any clues as to why this is happening on the PPC2003?

Here’s the sample code and a stack trace of the location where it hangs:

#include “stdafx.h”
#include <SDL.h>

void tst_callback(void *userdata, Uint8 *stream, int len)
{
}

int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
int r;

r = SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO);

SDL_Surface* pSurf = SDL_SetVideoMode(240, 320, 0, SDL_FULLSCREEN);

SDL_AudioSpec as, oas;

ZeroMemory(&as, sizeof(as));

as.freq = 44100;
as.format = AUDIO_S16SYS;
as.channels = 2;
as.samples = 2048;
as.callback = tst_callback;

r = SDL_OpenAudio(&as, &oas);

SDL_Delay(3000);

SDL_CloseAudio();

SDL_Quit();

return 0;
}

Stack trace:

SDL_SYS_WaitThread(SDL_Thread * 0x00053540) line 69
SDL_WaitThread(SDL_Thread * 0x00053540, int * 0x00000000) line 278
SDL_AudioQuit() line 580
SDL_QuitSubSystem(unsigned int 16) line 201
SDL_CloseAudio() line 569
WinMain(HINSTANCE__ * 0xd7048206, HINSTANCE__ * 0x00000000, unsigned
short * 0x3602fed8, int 5) line 39

I have done a couple of searches already and I found someone asking
about the same problem back in 2000, but I didn’t find any answer to the
original poster… :frowning:

I’d appreciate any clues you may provide.

Thank you,

Vasco

Hello,

I have an application that runs on top of SDL under Windows 9x and 2000
just fine.

I compiled the application and SDL 1.2.8 for Pocket PC 2003 with an ARM
processor.

To my surprise, the application hung on exit while trying to free the
audio. I also tried SDL 1.2.6, but the result is the same.

I then wrote some test code (see below). The result is exactly the same:
the application hangs on SDL_CloseAudio().

Both the original application and the test code use the SDL windib video
and audio drivers.

Does anyone have any clues as to why this is happening on the PPC2003?

Here’s the sample code and a stack trace of the location where it hangs:

#include “stdafx.h”
#include <SDL.h>

void tst_callback(void *userdata, Uint8 *stream, int len)
{
}

int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
int r;

r = SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO);

SDL_Surface* pSurf = SDL_SetVideoMode(240, 320, 0, SDL_FULLSCREEN);

SDL_AudioSpec as, oas;

ZeroMemory(&as, sizeof(as));

as.freq = 44100;
as.format = AUDIO_S16SYS;
as.channels = 2;
as.samples = 2048;
as.callback = tst_callback;

r = SDL_OpenAudio(&as, &oas);

SDL_Delay(3000);

SDL_CloseAudio();

SDL_Quit();

return 0;
}

Stack trace:

SDL_SYS_WaitThread(SDL_Thread * 0x00053540) line 69
SDL_WaitThread(SDL_Thread * 0x00053540, int * 0x00000000) line 278
SDL_AudioQuit() line 580
SDL_QuitSubSystem(unsigned int 16) line 201
SDL_CloseAudio() line 569
WinMain(HINSTANCE__ * 0xd7048206, HINSTANCE__ * 0x00000000, unsigned
short * 0x3602fed8, int 5) line 39

I have done a couple of searches already and I found someone asking
about the same problem back in 2000, but I didn’t find any answer to the
original poster… :frowning:

I’d appreciate any clues you may provide.

Thank you,

Vasco