[Mplayer-cvslog] CVS: main/libao2 ao_sdl.c,1.4,1.5
Felix Buenemann
atmosfear at users.sourceforge.net
Mon Jun 4 02:27:57 CEST 2001
Update of /cvsroot/mplayer/main/libao2
In directory usw-pr-cvs1:/tmp/cvs-serv22921
Modified Files:
ao_sdl.c
Log Message:
Several small changes (like driver selection).
Index: ao_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_sdl.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** ao_sdl.c 2001/06/03 21:33:03 1.4
--- ao_sdl.c 2001/06/04 00:27:55 1.5
***************
*** 36,39 ****
--- 36,43 ----
// ao_buffersize
+ extern int verbose;
+ /* audio driver to be used by SDLlib */
+ char *sdl_adriver;
+
// Samplesize used by the SDLlib AudioSpec struct
#define SAMPLESIZE 512
***************
*** 122,128 ****
int i;
/* Allocate ring-buffer memory */
! for(i=0;i<NUM_BUFS;i++) buffer[i]=malloc(BUFFSIZE);
printf("SDL: Samplerate: %iHz Channels: %s Format %iBit\n", rate, (channels > 1) ? "Stereo" : "Mono", format);
/* The desired audio frequency in samples-per-second. */
--- 126,138 ----
int i;
/* Allocate ring-buffer memory */
! for(i=0;i<NUM_BUFS;i++) buffer[i]=(unsigned char *) malloc(BUFFSIZE);
printf("SDL: Samplerate: %iHz Channels: %s Format %iBit\n", rate, (channels > 1) ? "Stereo" : "Mono", format);
+
+ if(sdl_adriver) {
+ setenv("SDL_AUDIODRIVER", sdl_adriver, 1);
+ printf("SDL: using %s audio driver\n", sdl_adriver);
+ }
+
/* The desired audio frequency in samples-per-second. */
***************
*** 157,161 ****
}
! printf("SDL buf size = %d\n",aspec.size);
if(ao_buffersize==-1) ao_buffersize=aspec.size;
--- 167,171 ----
}
! if(verbose) printf("SDL: buf size = %d\n",aspec.size);
if(ao_buffersize==-1) ao_buffersize=aspec.size;
***************
*** 168,171 ****
--- 178,182 ----
// close audio device
static void uninit(){
+ if(verbose) printf("SDL: Audio Subsystem shutting down!\n");
SDL_CloseAudio();
SDL_QuitSubSystem(SDL_INIT_AUDIO);
***************
*** 196,200 ****
static int play(void* data,int len,int flags){
! #if 0
int ret;
--- 207,211 ----
static int play(void* data,int len,int flags){
! #if 1
int ret;
_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog
More information about the MPlayer-cvslog
mailing list