comparison src/audio/nto/SDL_nto_audio.c @ 283:3d8b6b9f1e18

Date: Mon, 18 Feb 2002 16:46:59 +1200 From: Julian Kinraid <jkinraid@clear.net.nz> Subject: Patches for photon port of SDL Hi, A couple more patches for photon and the nto audio. Adds mouse grabbing support, fixed cursor images, unicode keyboard events (though no unicode data on kye release, is that a problem?), hopefully fixing some audio lag problems, and a few other fixes. Thanks, Julian Kinraid
author Sam Lantinga <slouken@libsdl.org>
date Wed, 20 Feb 2002 01:05:51 +0000
parents e8157fcb3114
children f6ffac90895c
comparison
equal deleted inserted replaced
282:b42d80e73896 283:3d8b6b9f1e18
53 /* default channel communication parameters */ 53 /* default channel communication parameters */
54 #define DEFAULT_CPARAMS_RATE 22050 54 #define DEFAULT_CPARAMS_RATE 22050
55 #define DEFAULT_CPARAMS_VOICES 1 55 #define DEFAULT_CPARAMS_VOICES 1
56 #define DEFAULT_CPARAMS_FRAG_SIZE 4096 //was 512 56 #define DEFAULT_CPARAMS_FRAG_SIZE 4096 //was 512
57 #define DEFAULT_CPARAMS_FRAGS_MIN 1 57 #define DEFAULT_CPARAMS_FRAGS_MIN 1
58 #define DEFAULT_CPARAMS_FRAGS_MAX -1 58 #define DEFAULT_CPARAMS_FRAGS_MAX 1
59 59
60 /* Open the audio device for playback, and don't block if busy */ 60 /* Open the audio device for playback, and don't block if busy */
61 #define OPEN_FLAGS SND_PCM_OPEN_PLAYBACK 61 #define OPEN_FLAGS SND_PCM_OPEN_PLAYBACK
62 62
63 /* Audio driver functions */ 63 /* Audio driver functions */
382 SDL_SetError("snd_pcm_nonblock_mode failed: %s\n", snd_strerror(rval)); 382 SDL_SetError("snd_pcm_nonblock_mode failed: %s\n", snd_strerror(rval));
383 return(-1); 383 return(-1);
384 } 384 }
385 385
386 /* enable count status parameter */ 386 /* enable count status parameter */
387 if ((rval = snd_plugin_set_disable(audio_handle, PLUGIN_DISABLE_MMAP))<0) 387 if ((rval = snd_pcm_plugin_set_disable(audio_handle, PLUGIN_DISABLE_MMAP))<0)
388 { 388 {
389 SDL_SetError("snd_plugin_set_disable failed: %s\n", snd_strerror(rval)); 389 SDL_SetError("snd_pcm_plugin_set_disable failed: %s\n", snd_strerror(rval));
390 return(-1); 390 return(-1);
391 } 391 }
392 392
393 393
394 /* Try for a closest match on audio format */ 394 /* Try for a closest match on audio format */