File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -313,10 +313,15 @@ int audio_open (struct audio_s *pa)
313
313
314
314
/* Does config file have a number? */
315
315
/* If so, it is an index into list of devices. */
316
+ /* Originally only a single digit was recognized. */
317
+ /* v 1.5 also recognizes two digits. (Issue 116) */
316
318
317
319
if (strlen (pa -> adev [a ].adevice_in ) == 1 && isdigit (pa -> adev [a ].adevice_in [0 ])) {
318
320
in_dev_no [a ] = atoi (pa -> adev [a ].adevice_in );
319
321
}
322
+ else if (strlen (pa -> adev [a ].adevice_in ) == 2 && isdigit (pa -> adev [a ].adevice_in [0 ]) && isdigit (pa -> adev [a ].adevice_in [1 ])) {
323
+ in_dev_no [a ] = atoi (pa -> adev [a ].adevice_in );
324
+ }
320
325
321
326
/* Otherwise, does it have search string? */
322
327
@@ -344,6 +349,9 @@ int audio_open (struct audio_s *pa)
344
349
if (strlen (pa -> adev [a ].adevice_out ) == 1 && isdigit (pa -> adev [a ].adevice_out [0 ])) {
345
350
out_dev_no [a ] = atoi (pa -> adev [a ].adevice_out );
346
351
}
352
+ else if (strlen (pa -> adev [a ].adevice_out ) == 2 && isdigit (pa -> adev [a ].adevice_out [0 ]) && isdigit (pa -> adev [a ].adevice_out [1 ])) {
353
+ out_dev_no [a ] = atoi (pa -> adev [a ].adevice_out );
354
+ }
347
355
348
356
if ((UINT )(out_dev_no [a ]) == WAVE_MAPPER && strlen (pa -> adev [a ].adevice_out ) >= 1 ) {
349
357
num_devices = waveOutGetNumDevs ();
You can’t perform that action at this time.
0 commit comments