Browse Source

cmAudioPortAlsa.c : Included new snd_pcm_state value SND_PCM_STATE_PRIVATE1 in switch statements to eliminate warning.

master
kevin 4 years ago
parent
commit
29196253a7
1 changed files with 20 additions and 12 deletions
  1. 20
    12
      linux/cmAudioPortAlsa.c

+ 20
- 12
linux/cmAudioPortAlsa.c View File

340
 {
340
 {
341
   switch( state )
341
   switch( state )
342
   {
342
   {
343
-  case SND_PCM_STATE_OPEN:         return "open";
344
-  case SND_PCM_STATE_SETUP:        return "setup";
345
-  case SND_PCM_STATE_PREPARED:     return "prepared";
346
-  case SND_PCM_STATE_RUNNING:      return "running";
347
-  case SND_PCM_STATE_XRUN:         return "xrun";
348
-  case SND_PCM_STATE_DRAINING:     return "draining";
349
-  case SND_PCM_STATE_PAUSED:       return "paused";
350
-  case SND_PCM_STATE_SUSPENDED:    return "suspended";
351
-  case SND_PCM_STATE_DISCONNECTED: return "disconnected";
343
+    case SND_PCM_STATE_OPEN:         return "open";
344
+    case SND_PCM_STATE_SETUP:        return "setup";
345
+    case SND_PCM_STATE_PREPARED:     return "prepared";
346
+    case SND_PCM_STATE_RUNNING:      return "running";
347
+    case SND_PCM_STATE_XRUN:         return "xrun";
348
+    case SND_PCM_STATE_DRAINING:     return "draining";
349
+    case SND_PCM_STATE_PAUSED:       return "paused";
350
+    case SND_PCM_STATE_SUSPENDED:    return "suspended";
351
+    case SND_PCM_STATE_DISCONNECTED: return "disconnected";
352
+    case SND_PCM_STATE_PRIVATE1:   return "private1";
352
 
353
 
353
   }
354
   }
354
   return "<invalid>";
355
   return "<invalid>";
680
     case SND_PCM_STATE_DRAINING:
681
     case SND_PCM_STATE_DRAINING:
681
     case SND_PCM_STATE_PAUSED:
682
     case SND_PCM_STATE_PAUSED:
682
     case SND_PCM_STATE_DISCONNECTED:
683
     case SND_PCM_STATE_DISCONNECTED:
684
+    case SND_PCM_STATE_PRIVATE1:
683
       //case SND_PCM_STATE_LAST:
685
       //case SND_PCM_STATE_LAST:
684
       break;
686
       break;
685
   }
687
   }
722
   unsigned            byteCnt     = bytesPerSmp * smpCnt;
724
   unsigned            byteCnt     = bytesPerSmp * smpCnt;
723
   const cmApSample_t* ep          = sp + smpCnt;
725
   const cmApSample_t* ep          = sp + smpCnt;
724
   char                obuf[ byteCnt ];
726
   char                obuf[ byteCnt ];
725
-
727
+  
726
   // if no output was given then fill the device buffer with zeros
728
   // if no output was given then fill the device buffer with zeros
727
   if( sp == NULL )
729
   if( sp == NULL )
728
     memset(obuf,0,byteCnt);
730
     memset(obuf,0,byteCnt);
743
         {
745
         {
744
           short* dp = (short*)obuf;
746
           short* dp = (short*)obuf;
745
           while( sp < ep )
747
           while( sp < ep )
746
-            *dp++ = (short)(*sp++ * 0x7fff);        
748
+          {
749
+            *dp++ = (short)(*sp++ * 0x7fff);
750
+            
751
+          }
752
+            
747
         }
753
         }
748
         break;
754
         break;
749
 
755
 
764
           int* dp = (int*)obuf;
770
           int* dp = (int*)obuf;
765
 
771
 
766
           while( sp < ep )
772
           while( sp < ep )
767
-            *dp++ = (int)(*sp++ * 0x7fffffff);        
773
+            *dp++ = (int)(*sp++ * 0x7fffffff);
774
+
768
 
775
 
769
 #ifdef IMPLUSE_FN
776
 #ifdef IMPLUSE_FN
770
           int* tmp = (int*)obuf;
777
           int* tmp = (int*)obuf;
1049
             case SND_PCM_STATE_DRAINING:
1056
             case SND_PCM_STATE_DRAINING:
1050
             case SND_PCM_STATE_PAUSED:
1057
             case SND_PCM_STATE_PAUSED:
1051
             case SND_PCM_STATE_DISCONNECTED:
1058
             case SND_PCM_STATE_DISCONNECTED:
1059
+            case SND_PCM_STATE_PRIVATE1:
1052
               continue;
1060
               continue;
1053
 
1061
 
1054
             case SND_PCM_STATE_RUNNING:
1062
             case SND_PCM_STATE_RUNNING:

Loading…
Cancel
Save