[Bug] Win x64 audio static (and other win x64 observations)

https://bugzilla.libsdl.org/show_bug.cgi?id=154

If I had more time, I’d try and track down where exactly it happened, but it happened amidts the SDL_config.h period where it was uncompilable for me for over a week. I was able to compile 2/27/06 and the static was present, and I know audio was normal before the SDL_config.h changes. The problem is specific to Windows x64, 32bit versions are fine.

Side note to Sam: /Wp64 in VC2005 is over zealous while in win32 mode as I’m sure you’ve noticed (after fixing some casts and such, I can compile with /Wp64 in x64 with 0/0 errors/warnings and it still leaves 0/8 in win32). There are a few things you have missed (casts mostly) and I’ll have a win64 patch soon (since _WIN32 is defined in win64, do you want config stuff to go in SDL_config_win32.h in a #if defined(WIN64) block or create a seperate SDL_config_win64.h file to be included after the win32?), but I’d like to figure out this audio problem first.

On a further tangent, will there be non-in-line asm replacements for the functions made to replace LIBC? As of current, x64 needs HAVE_LIBC 1 and #undef SDL_ASSEMBLY_ROUTINES, so msvcrt is still needed.

–William

I forgot to mention, sound card and channel detection seems to work (its finding 1, 2, and 6 channel audio for me), it is just the output that appears to be the culprit in this problem.

–William----- Original Message -----
From: William Weilep
To: A list for developers using the SDL library. (includesSDL-announce)
Sent: Friday, March 03, 2006 6:39 PM
Subject: [SDL] [Bug] Win x64 audio static (and other win x64 observations)

https://bugzilla.libsdl.org/show_bug.cgi?id=154

If I had more time, I’d try and track down where exactly it happened, but it happened amidts the SDL_config.h period where it was uncompilable for me for over a week. I was able to compile 2/27/06 and the static was present, and I know audio was normal before the SDL_config.h changes. The problem is specific to Windows x64, 32bit versions are fine.

Side note to Sam: /Wp64 in VC2005 is over zealous while in win32 mode as I’m sure you’ve noticed (after fixing some casts and such, I can compile with /Wp64 in x64 with 0/0 errors/warnings and it still leaves 0/8 in win32). There are a few things you have missed (casts mostly) and I’ll have a win64 patch soon (since _WIN32 is defined in win64, do you want config stuff to go in SDL_config_win32.h in a #if defined(WIN64) block or create a seperate SDL_config_win64.h file to be included after the win32?), but I’d like to figure out this audio problem first.

On a further tangent, will there be non-in-line asm replacements for the functions made to replace LIBC? As of current, x64 needs HAVE_LIBC 1 and #undef SDL_ASSEMBLY_ROUTINES, so msvcrt is still needed.

–William



SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

If I had more time, I’d try and track down where exactly it happened, but it happened amidts the SDL_config.h period where it was uncompilable for me for over a week. I was able to compile 2/27/06 and the static was present, and I know audio was normal before the SDL_config.h changes. The problem is specific to Windows x64, 32bit versions are fine.

Here’s the related diff, but I don’t see where it would be a problem:
http://www.libsdl.org/cgi/cvsweb.cgi/SDL12/src/audio/windib/SDL_dibaudio.c.diff?r1=1.14&r2=1.15

I assume this is waveout audio, right?

Side note to Sam: /Wp64 in VC2005 is over zealous while in win32 mode as I’m sure you’ve noticed (after fixing some casts and such, I can compile with /Wp64 in x64 with 0/0 errors/warnings and it still leaves 0/8 in win32). There are a few things you have missed (casts mostly) and I’ll have a win64 patch soon (since _WIN32 is defined in win64, do you want config stuff to go in SDL_config_win32.h in a #if defined(WIN64) block or create a seperate SDL_config_win64.h file to be included after the win32?), but I’d like to figure out this audio problem first.

I’d like to see your patch first. I’m leaving casts on data exposed in the
API to be fixed in 1.3, where we can break binary compatibility. The rest of
the fixes might apply cleanly to both win32 and win64.

I’m generally leaving WIN32 to refer to windows (should we change it to
WINDOWS?) and then _WIN32_WCE and _WIN64 are variants on that platform.

On a further tangent, will there be non-in-line asm replacements for the functions made to replace LIBC? As of current, x64 needs HAVE_LIBC 1 and #undef SDL_ASSEMBLY_ROUTINES, so msvcrt is still needed.

If somebody writes them. :slight_smile: I don’t have an x64 system, so I can’t tell
what needs to be done or test any changes made.

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment