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

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

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

revision 32 by schoenebeck, Sun Jan 18 20:31:31 2004 UTC revision 33 by schoenebeck, Mon Feb 16 19:30:42 2004 UTC
# Line 28  AlsaIO::AlsaIO() : AudioIO(), Thread(tru Line 28  AlsaIO::AlsaIO() : AudioIO(), Thread(tru
28      stream        = SND_PCM_STREAM_PLAYBACK;      stream        = SND_PCM_STREAM_PLAYBACK;
29  }  }
30    
31  int AlsaIO::Initialize(uint Channels, uint Samplerate, uint Fragments, uint FragmentSize) {  int AlsaIO::Initialize(uint Channels, uint Samplerate, uint Fragments, uint FragmentSize, String Card) {
32      this->uiChannels           = Channels;      this->uiChannels           = Channels;
33      this->uiSamplerate         = Samplerate;      this->uiSamplerate         = Samplerate;
34      this->uiMaxSamplesPerCycle = FragmentSize;      this->uiMaxSamplesPerCycle = FragmentSize;
35      this->bInterleaved         = true;      this->bInterleaved         = true;
36    
37      if (HardwareParametersSupported(Channels, Samplerate, Fragments, FragmentSize)) {      if (HardwareParametersSupported(Channels, Samplerate, Fragments, FragmentSize)) {
38          pcm_name = "hw:0,0";          pcm_name = "hw:" + Card;
39      }      }
40      else {      else {
41          printf("Warning: your soundcard doesn't support chosen hardware parameters; ");          printf("Warning: your soundcard doesn't support chosen hardware parameters; ");
42          printf("trying to compensate support lack with plughw...");          printf("trying to compensate support lack with plughw...");
43          fflush(stdout);          fflush(stdout);
44          pcm_name = "plughw:0,0";          pcm_name = "plughw:" + Card;
45      }      }
46    
47      int err;      int err;

Legend:
Removed from v.32  
changed lines
  Added in v.33

  ViewVC Help
Powered by ViewVC