diff options
| author | Christoph Berg <christoph.berg@credativ.de> | 2022-08-23 10:23:16 +0200 |
|---|---|---|
| committer | Christoph Berg <christoph.berg@credativ.de> | 2022-08-23 10:23:16 +0200 |
| commit | 2d1068e60bce7ae1fff11623454900e8cee956b1 (patch) | |
| tree | acebe276e30466ef0ab91bc3da5e379bec0d7dc5 /map65/paInputDevice.c | |
| parent | 43bebfbad6e7ba026bd3d55720c7d9e12a7ef8ef (diff) | |
New upstream version 2.6.0~rc3+repackupstream/2.6.0_rc3+repack
Diffstat (limited to 'map65/paInputDevice.c')
| -rwxr-xr-x | map65/paInputDevice.c | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/map65/paInputDevice.c b/map65/paInputDevice.c index bad4973f..1dc156df 100755 --- a/map65/paInputDevice.c +++ b/map65/paInputDevice.c @@ -1,56 +1,56 @@ -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -void paInputDevice(int id, char* hostAPI_DeviceName, int* minChan, - int* maxChan, int* minSpeed, int* maxSpeed) -{ - int i; - char pa_device_name[128]; - char pa_device_hostapi[128]; - double pa_device_max_speed; - double pa_device_min_speed; - int pa_device_max_bytes; - int pa_device_min_bytes; - int pa_device_max_channels; - int pa_device_min_channels; - char p2[256]; - char *p,*p1; - static int iret, valid_dev_cnt; - - iret=pa_get_device_info (id, - &pa_device_name, - &pa_device_hostapi, - &pa_device_max_speed, - &pa_device_min_speed, - &pa_device_max_bytes, - &pa_device_min_bytes, - &pa_device_max_channels, - &pa_device_min_channels); - - if (iret >= 0 ) { - valid_dev_cnt++; - - p1=""; - p=strstr(pa_device_hostapi,"MME"); - if(p!=NULL) p1="MME"; - p=strstr(pa_device_hostapi,"Direct"); - if(p!=NULL) p1="DirectX"; - p=strstr(pa_device_hostapi,"WASAPI"); - if(p!=NULL) p1="WASAPI"; - p=strstr(pa_device_hostapi,"ASIO"); - if(p!=NULL) p1="ASIO"; - p=strstr(pa_device_hostapi,"WDM-KS"); - if(p!=NULL) p1="WDM-KS"; - - sprintf(p2,"%-8s %-39s",p1,pa_device_name); - for(i=0; i<50; i++) { - hostAPI_DeviceName[i]=p2[i]; - if(p2[i]==0) break; - } - *minChan=pa_device_min_channels; - *maxChan=pa_device_max_channels; - *minSpeed=(int)pa_device_min_speed; - *maxSpeed=(int)pa_device_max_speed; - } -} +#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+void paInputDevice(int id, char* hostAPI_DeviceName, int* minChan,
+ int* maxChan, int* minSpeed, int* maxSpeed)
+{
+ int i;
+ char pa_device_name[128];
+ char pa_device_hostapi[128];
+ double pa_device_max_speed;
+ double pa_device_min_speed;
+ int pa_device_max_bytes;
+ int pa_device_min_bytes;
+ int pa_device_max_channels;
+ int pa_device_min_channels;
+ char p2[256];
+ char *p,*p1;
+ static int iret, valid_dev_cnt;
+
+ iret=pa_get_device_info (id,
+ &pa_device_name,
+ &pa_device_hostapi,
+ &pa_device_max_speed,
+ &pa_device_min_speed,
+ &pa_device_max_bytes,
+ &pa_device_min_bytes,
+ &pa_device_max_channels,
+ &pa_device_min_channels);
+
+ if (iret >= 0 ) {
+ valid_dev_cnt++;
+
+ p1="";
+ p=strstr(pa_device_hostapi,"MME");
+ if(p!=NULL) p1="MME";
+ p=strstr(pa_device_hostapi,"Direct");
+ if(p!=NULL) p1="DirectX";
+ p=strstr(pa_device_hostapi,"WASAPI");
+ if(p!=NULL) p1="WASAPI";
+ p=strstr(pa_device_hostapi,"ASIO");
+ if(p!=NULL) p1="ASIO";
+ p=strstr(pa_device_hostapi,"WDM-KS");
+ if(p!=NULL) p1="WDM-KS";
+
+ sprintf(p2,"%-8s %-39s",p1,pa_device_name);
+ for(i=0; i<50; i++) {
+ hostAPI_DeviceName[i]=p2[i];
+ if(p2[i]==0) break;
+ }
+ *minChan=pa_device_min_channels;
+ *maxChan=pa_device_max_channels;
+ *minSpeed=(int)pa_device_min_speed;
+ *maxSpeed=(int)pa_device_max_speed;
+ }
+}
|
