/[svn]/linuxsampler/trunk/src/audioio.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/audioio.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 27 by schoenebeck, Sun Dec 7 05:03:43 2003 UTC revision 28 by schoenebeck, Fri Jan 2 00:02:56 2004 UTC
# Line 79  int AudioIO::Initialize(uint channels, u Line 79  int AudioIO::Initialize(uint channels, u
79      }      }
80    
81      /* Set sample format */      /* Set sample format */
82        #if WORDS_BIGENDIAN
83        if ((err = snd_pcm_hw_params_set_format(pcm_handle, hwparams, SND_PCM_FORMAT_S16_BE)) < 0) {
84        #else // little endian
85      if ((err = snd_pcm_hw_params_set_format(pcm_handle, hwparams, SND_PCM_FORMAT_S16_LE)) < 0) {      if ((err = snd_pcm_hw_params_set_format(pcm_handle, hwparams, SND_PCM_FORMAT_S16_LE)) < 0) {
86        #endif
87          fprintf(stderr, "Error setting sample format. : %s\n", snd_strerror(err));          fprintf(stderr, "Error setting sample format. : %s\n", snd_strerror(err));
88          return EXIT_FAILURE;          return EXIT_FAILURE;
89      }      }
# Line 172  bool AudioIO::HardwareParametersSupporte Line 176  bool AudioIO::HardwareParametersSupporte
176          snd_pcm_close(pcm_handle);          snd_pcm_close(pcm_handle);
177          return false;          return false;
178      }      }
179        #if WORDS_BIGENDIAN
180        if (snd_pcm_hw_params_test_format(pcm_handle, hwparams, SND_PCM_FORMAT_S16_BE) < 0) {
181        #else // little endian
182      if (snd_pcm_hw_params_test_format(pcm_handle, hwparams, SND_PCM_FORMAT_S16_LE) < 0) {      if (snd_pcm_hw_params_test_format(pcm_handle, hwparams, SND_PCM_FORMAT_S16_LE) < 0) {
183        #endif
184          snd_pcm_close(pcm_handle);          snd_pcm_close(pcm_handle);
185          return false;          return false;
186      }      }

Legend:
Removed from v.27  
changed lines
  Added in v.28

  ViewVC Help
Powered by ViewVC