Diff for /np2/x11/soundmng.c between versions 1.14 and 1.17

version 1.14, 2011/01/15 16:01:52 version 1.17, 2011/12/24 16:57:46
Line 1 Line 1
 /*      $Id$    */  
   
 /*  /*
  * Copyright (c) 2001-2003 NONAKA Kimihiro   * Copyright (c) 2001-2003 NONAKA Kimihiro
  * All rights reserved.   * All rights reserved.
Line 70  MIDIMOD vermouth_module = NULL; Line 68  MIDIMOD vermouth_module = NULL;
  * driver   * driver
  */   */
 static struct {  static struct {
         BOOL (*drvinit)(UINT rate, UINT samples);          BOOL (*drvinit)(UINT rate, UINT samples);
         BOOL (*drvterm)(void);          BOOL (*drvterm)(void);
         void (*drvlock)(void);          void (*drvlock)(void);
         void (*drvunlock)(void);          void (*drvunlock)(void);
   
         void (*sndplay)(void);          void (*sndplay)(void);
         void (*sndstop)(void);          void (*sndstop)(void);
   
         void *(*pcmload)(UINT num, const char *path);          void *(*pcmload)(UINT num, const char *path);
         void (*pcmdestroy)(void *chanp, UINT num);          void (*pcmdestroy)(void *chanp, UINT num);
Line 340  soundmng_setreverse(BOOL reverse) Line 338  soundmng_setreverse(BOOL reverse)
 /*  /*
  * PCM function   * PCM function
  */   */
 void  static void
 soundmng_pcminit(void)  soundmng_pcminit(void)
 {  {
         int i;          int i;
Line 350  soundmng_pcminit(void) Line 348  soundmng_pcminit(void)
         }          }
 }  }
   
 void  static void
 soundmng_pcmdestroy(void)  soundmng_pcmdestroy(void)
 {  {
         int i;          int i;
Line 421  buffer_init(void) Line 419  buffer_init(void)
                 }                  }
                 sound_buffer[i] = (char *)_MALLOC(opna_frame, "sound buffer");                  sound_buffer[i] = (char *)_MALLOC(opna_frame, "sound buffer");
                 if (sound_buffer[i] == NULL) {                  if (sound_buffer[i] == NULL) {
                         fprintf(stderr, "buffer_init: can't alloc memory\n");                          g_printerr("buffer_init: can't alloc memory\n");
                         sounddrv_unlock();                          sounddrv_unlock();
                         return FAILURE;                          return FAILURE;
                 }                  }
Line 787  sdlaudio_init(UINT rate, UINT samples) Line 785  sdlaudio_init(UINT rate, UINT samples)
   
         rv = SDL_InitSubSystem(SDL_INIT_AUDIO);          rv = SDL_InitSubSystem(SDL_INIT_AUDIO);
         if (rv < 0) {          if (rv < 0) {
                 fprintf(stderr, "sdlaudio_init: SDL_InitSubSystem\n");                  g_printerr("sdlmixer_init: SDL_InitSubSystem(): %s\n",
                       SDL_GetError());
                 return FAILURE;                  return FAILURE;
         }          }
   
         audio_fd = SDL_OpenAudio(&fmt, NULL);          audio_fd = SDL_OpenAudio(&fmt, NULL);
         if (audio_fd < 0) {          if (audio_fd < 0) {
                 fprintf(stderr, "sdlaudio_init: SDL_OpenAudio\n");                  g_printerr("sdlaudio_init: SDL_OpenAudio(): %s\n",
                       SDL_GetError());
                 SDL_QuitSubSystem(SDL_INIT_AUDIO);                  SDL_QuitSubSystem(SDL_INIT_AUDIO);
                 return FAILURE;                  return FAILURE;
         }          }
Line 841  sdlmixer_init(UINT rate, UINT samples) Line 841  sdlmixer_init(UINT rate, UINT samples)
   
         rv = SDL_InitSubSystem(SDL_INIT_AUDIO);          rv = SDL_InitSubSystem(SDL_INIT_AUDIO);
         if (rv < 0) {          if (rv < 0) {
                 fprintf(stderr, "sdlmixer_init: SDL_InitSubSystem(): %s\n",                  g_printerr("sdlmixer_init: SDL_InitSubSystem(): %s\n",
                     SDL_GetError());                      SDL_GetError());
                 goto failure;                  goto failure;
         }          }
   
         rv = Mix_OpenAudio(rate, AUDIO_S16SYS, 2, samples);          rv = Mix_OpenAudio(rate, AUDIO_S16SYS, 2, samples);
         if (rv < 0) {          if (rv < 0) {
                 fprintf(stderr, "sdlmixer_init: Mix_OpenAudio(): %s\n",                  g_printerr("sdlmixer_init: Mix_OpenAudio(): %s\n",
                     Mix_GetError());                      Mix_GetError());
                 goto failure1;                  goto failure1;
         }          }
   
         rv = Mix_AllocateChannels(SOUND_MAXPCM);          rv = Mix_AllocateChannels(SOUND_MAXPCM);
         if (rv < 0) {          if (rv < 0) {
                 fprintf(stderr, "sdlmixer_init: Mix_AllocateChannels(): %s\n",                  g_printerr("sdlmixer_init: Mix_AllocateChannels(): %s\n",
                     Mix_GetError());                      Mix_GetError());
                 goto failure1;                  goto failure1;
         }          }

Removed from v.1.14  
changed lines
  Added in v.1.17


RetroPC.NET-CVS <cvs@retropc.net>