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

This commit is contained in:
kevin 2020-07-19 07:49:09 -04:00
parent 118fd5c92d
commit 29196253a7

View File

@ -349,6 +349,7 @@ const char* _cmApPcmStateToString( snd_pcm_state_t state )
case SND_PCM_STATE_PAUSED: return "paused";
case SND_PCM_STATE_SUSPENDED: return "suspended";
case SND_PCM_STATE_DISCONNECTED: return "disconnected";
case SND_PCM_STATE_PRIVATE1: return "private1";
}
return "<invalid>";
@ -680,6 +681,7 @@ void _cmApStateRecover( snd_pcm_t* pcmH, cmApDevRecd_t* drp, bool inputFl )
case SND_PCM_STATE_DRAINING:
case SND_PCM_STATE_PAUSED:
case SND_PCM_STATE_DISCONNECTED:
case SND_PCM_STATE_PRIVATE1:
//case SND_PCM_STATE_LAST:
break;
}
@ -743,7 +745,11 @@ int _cmApWriteBuf( cmApDevRecd_t* drp, snd_pcm_t* pcmH, const cmApSample_t* sp,
{
short* dp = (short*)obuf;
while( sp < ep )
{
*dp++ = (short)(*sp++ * 0x7fff);
}
}
break;
@ -766,6 +772,7 @@ int _cmApWriteBuf( cmApDevRecd_t* drp, snd_pcm_t* pcmH, const cmApSample_t* sp,
while( sp < ep )
*dp++ = (int)(*sp++ * 0x7fffffff);
#ifdef IMPLUSE_FN
int* tmp = (int*)obuf;
unsigned ii = 0;
@ -1049,6 +1056,7 @@ bool _cmApThreadFunc(void* param)
case SND_PCM_STATE_DRAINING:
case SND_PCM_STATE_PAUSED:
case SND_PCM_STATE_DISCONNECTED:
case SND_PCM_STATE_PRIVATE1:
continue;
case SND_PCM_STATE_RUNNING: