PCM channel status structure
Synopsis:
typedef struct snd_pcm_channel_status
{
        int32_t                  channel;
        int32_t                  mode;
        int32_t                  status;
        uint32_t                 scount;
        struct timeval           stime;
        uint64_t                 ust_stime;
        int32_t                  frag;
        int32_t                  count;
        int32_t                  free;
        int32_t                  underrun;
        int32_t                  overrun;
        int32_t                  overrange;
        uint32_t                 subbuffered;
        uint32_t                 ducking_state;
#define SND_PCM_DUCKING_STATE_INACTIVE          (0x00)
#define SND_PCM_DUCKING_STATE_ACTIVE            (1<<0)
#define SND_PCM_DUCKING_STATE_HARD_SUSPENDED    (1<<1) 
#define SND_PCM_DUCKING_STATE_SOFT_SUSPENDED    (1<<2)
#define SND_PCM_DUCKING_STATE_PAUSED            (1<<3)
#define SND_PCM_DUCKING_STATE_FORCED_ACTIVE     (1<<4)        
        struct timeval           stop_time;
        uint8_t                  reserved[112];
} snd_pcm_channel_status_t;
 
Description:
The snd_pcm_channel_status_t structure describes the status
of a PCM channel.
The members include:
- channel
 
- The channel direction; one of SND_PCM_CHANNEL_PLAYBACK or
  SND_PCM_CHANNEL_CAPTURE.
  
  
 
    
        - ducking_state
 
        -  The audio concurrency management ducking state. These are the valid states: 
              - SND_PCM_DUCKING_STATE_INACTIVE—Ducking isn't active.
 
              - SND_PCM_DUCKING_STATE_ACTIVE—Ducking is active due because
                the stream is active.
 
              - SND_PCM_DUCKING_STATE_HARD_SUSPENDED —The subchannel is
                hard-suspended and can't transition from the SUSPENDED state if you call
                  snd_pcm_*_resume(). 
 
              - SND_PCM_DUCKING_STATE_SOFT_SUSPENDED—The subchannel is
                soft-suspended and an can transition from the SUSPENDED state if you call
                  snd_pcm_*_resume(). 
 
              - SND_PCM_DUCKING_STATE_PAUSED—The subchannel will transition
                to the PAUSED state from the SUSPENDED state.
 
              - SND_PCM_DUCKING_STATE_FORCED_ACTIVE—Ducking is active because
                the snd_pcm_channel_audio_ducking() was called.
 
              - SND_PCM_DUCKING_STATE_MUTE_BY_HIGHER—Ducking occurred because
                a higher priority subchannel has started running.
 
              - SND_PCM_DUCKING_STATE_MUTE_BY_SAME—Ducking occurred because a
                same priority subchannel has started running.
 
            
           
    
- mode
 
- The transfer mode: SND_PCM_MODE_BLOCK.
  (SND_PCM_MODE_STREAM is deprecated.)
  
  
 
- status
 
- The channel status.
  Valid values are:
  
  - SND_PCM_STATUS_NOTREADY — the driver isn't prepared
    for any operation. 
    After a successful call to
    snd_pcm_channel_params(),
    the state is changed to SND_PCM_STATUS_READY.
    
    
    
  
 
  - SND_PCM_STATUS_READY — the driver is ready for operation. 
    You can mmap() the audio buffer only in this state, but the
    samples still can't be transferred.
    After a successful call to
    snd_pcm_channel_prepare(),
    snd_pcm_capture_prepare(),
    snd_pcm_playback_prepare(),
    or
    snd_pcm_plugin_prepare(),
    the state is changed to SND_PCM_STATUS_PREPARED.
    
    
    
  
 
  - SND_PCM_STATUS_PREPARED — the driver is prepared for operation. 
 
    
    
    
  
 
  - SND_PCM_STATUS_RUNNING — the driver is actively
    transferring data through the hardware.
   
    
    
    
  
 
  
   - SND_PCM_STATUS_PAUSED — the channel has stopped playing.
    
    
    
    
  
 
  
  - SND_PCM_STATUS_SUSPENDED — the driver has stopped playing.
 
    
    
    
  
 
  - SND_PCM_STATUS_UNDERRUN — the playback channel is in an underrun state. 
    The driver completely drained the buffers before new data was ready to
    be played.
    You must reprepare the channel before continuing, by calling
    snd_pcm_channel_prepare(),
    snd_pcm_playback_prepare(),
    or
    snd_pcm_plugin_prepare().
    See the
    wave.c example
    in the appendix.
    
    
    
    
    
  
 
  - SND_PCM_STATUS_OVERRUN — the capture channel is
    in an overrun state. 
    The driver has processed the incoming data faster than it's coming in;
    the channel is stalled.
    You must reprepare the channel before continuing, by calling
    snd_pcm_channel_prepare(),
    snd_pcm_capture_prepare(),
    or
    snd_pcm_plugin_prepare().
    See the
    waverec.c example
    in the appendix.
    
    
    
    
    
  
 
  - SND_PCM_STATUS_PAUSED — the playback is paused (not supported by QSA).
    
    
    
  
 
  
 
- scount
 
- The number of bytes processed since the playback/capture last started.
  This value wraps around to 0 when it passes the value of SND_PCM_BOUNDARY,
  and is reset when you prepare the channel.
  
 
- stime
 
- The playback/capture start time, in the format used by
  gettimeofday()
  (see the QNX Neutrino C Library Reference).
  
 
  This member is valid only when the time flags is active in the
  snd_pcm_channel_params_t
  structure.
  
 
- ust_stime
 
- The playback/capture start time, in UST format. 
  This member is valid only when the ust_time flags is active in the
  snd_pcm_channel_params_t
  structure.
 
- frag
 
- The current fragment number (available only in the block mode).
 
- count
 
- The number of bytes in the queue/buffer.
 
- free
 
- The number of bytes in the queue that are still free.
 
- underrun
 
- The number of playback underruns since the last status.
 
- overrun
 
- The number of capture overruns since the last status.
 
- overrange
 
- The number of ADC capture overrange detections since the last status.
 
- subbuffered
 
- The number of bytes subbuffered in the plugin interface.
 
- status_data
 
- Additional data relevant to a particular value for status.
 
- stop_time
 
- The time at which the last sample was played or recorded in the most recent
  case where the channel stopped for any reason.
 
Note: 
The stop_time and stime members hold valid data only
  if there's data present in the channel; they aren't necessarily valid as soon as the
  channel goes to a SND_PCM_STATUS_RUNNING state, but they're guaranteed to be
  valid as soon as scount indicates that some data has been processed.
 
Classification:
QNX Neutrino