comparison core/RTAudio.cpp @ 210:e23c304d264f

Fixed analogChannels count check (allows them to be 0).
author Giulio Moro <giuliomoro@yahoo.it>
date Mon, 08 Feb 2016 23:23:34 +0000
parents a156a694864d
children 18d03901f866
comparison
equal deleted inserted replaced
209:5f53b838b742 210:e23c304d264f
162 gContext.analogChannels = 0; 162 gContext.analogChannels = 0;
163 gContext.analogSampleRate = 0; 163 gContext.analogSampleRate = 0;
164 } 164 }
165 165
166 // Sanity check the combination of channels and period size 166 // Sanity check the combination of channels and period size
167 if( (gContext.analogChannels <= 4 && gContext.analogFrames < 2) || 167 if( gContext.analogChannels != 0 && ((gContext.analogChannels <= 4 && gContext.analogFrames < 2) ||
168 (gContext.analogChannels <= 2 && gContext.analogFrames < 4)) 168 (gContext.analogChannels <= 2 && gContext.analogFrames < 4)) )
169 { 169 {
170 cout << "Error: " << gContext.analogChannels << " channels and period size of " << gContext.analogFrames << " not supported.\n"; 170 cout << "Error: " << gContext.analogChannels << " channels and period size of " << gContext.analogFrames << " not supported.\n";
171 return 1; 171 return 1;
172 } 172 }
173 173