Compare commits
2 commits
158dfe412f
...
326db7e312
Author | SHA1 | Date | |
---|---|---|---|
326db7e312 | |||
5ddc95b4e9 |
2 changed files with 7 additions and 4 deletions
|
@ -131,7 +131,7 @@ inline void spawn_doom(ControllerContext &ctx)
|
|||
ZeroMemory(&pi, sizeof(pi));
|
||||
|
||||
char cmdLine[256];
|
||||
snprintf(cmdLine, sizeof(cmdLine), "%s", DOOM_EXECUTABLE);
|
||||
snprintf(cmdLine, sizeof(cmdLine), "%s -nosound", DOOM_EXECUTABLE);
|
||||
|
||||
// Start the child process.
|
||||
if (!CreateProcess(NULL, // No module name (use command line)
|
||||
|
@ -239,7 +239,7 @@ void check_on_dooms(ControllerContext &ctx)
|
|||
}
|
||||
} while (pid > 0);
|
||||
#else
|
||||
#warning "pid checking not implemented for Windows"
|
||||
//#warning "pid checking not implemented for Windows"
|
||||
#endif
|
||||
|
||||
// Find dooms that are in Endoom state and remove them. This works for
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "../ib_sound.h"
|
||||
#include "../m_argv.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <dp_common.h>
|
||||
|
@ -24,6 +25,8 @@ static void Callback(void *user_data, Uint8 *output_buffer, int bytes_to_do)
|
|||
|
||||
int IB_StartupSound(void (*initial_callback)(unsigned int output_sample_rate, void *user_data), void (*_audio_callback)(short* output_buffer, size_t frames_to_do, void *user_data), void *user_data)
|
||||
{
|
||||
const int nosound = M_CheckParm("-nosound");
|
||||
|
||||
SDL_AudioSpec desired_audio_specification;
|
||||
SDL_AudioSpec obtained_audio_specification;
|
||||
|
||||
|
@ -36,9 +39,9 @@ int IB_StartupSound(void (*initial_callback)(unsigned int output_sample_rate, vo
|
|||
desired_audio_specification.callback = Callback;
|
||||
desired_audio_specification.userdata = user_data;
|
||||
|
||||
if (SDL_Init(SDL_INIT_AUDIO))
|
||||
if (nosound || SDL_Init(SDL_INIT_AUDIO))
|
||||
{
|
||||
dp_sdl_error("IB_StartupSound: SDL_INIT_AUDIO failed, using hacks");
|
||||
//dp_sdl_error("IB_StartupSound: SDL_INIT_AUDIO failed, using hacks");
|
||||
initial_callback(desired_audio_specification.freq, user_data);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue