mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-22 13:30:07 +00:00
fixed startup sound
This commit is contained in:
parent
ba89fc7a72
commit
420dc1d504
@ -369,8 +369,8 @@ static int play_startup(void *arg) {
|
||||
Uint8 *wav_buffer;
|
||||
Uint32 wav_length;
|
||||
if (SDL_LoadWAV("startup.wav", &wav_spec, &wav_buffer, &wav_length)) {
|
||||
SDL_AudioSpec desired = { .freq = 44100, .format = AUDIO_S16, .channels = 1 }, obtained;
|
||||
SDL_AudioDeviceID deviceId = SDL_OpenAudioDevice(NULL, 0, &desired, &obtained, 0);
|
||||
SDL_AudioSpec obtained;
|
||||
SDL_AudioDeviceID deviceId = SDL_OpenAudioDevice(NULL, 0, &wav_spec, &obtained, 0);
|
||||
if (deviceId) {
|
||||
SDL_QueueAudio(deviceId, wav_buffer, wav_length);
|
||||
SDL_PauseAudioDevice(deviceId, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user