『inline meter』Related information(flow rotameter|digital flow meter|balo meter|hydraulic flow meter|volumetric meter|positive displacement meter|pitot tube flow meter|displacement meter|cfm meter|variable area flow meter|inline flow meter|differential pressure flow meter|calibrated flow meter|velocity meter|paddle wheel flow meter|oval gear flow meter|anemometer hvac|multiphase flow meter|doppler flow meter|thorpe tube flowmeter|heat flow meter)

1. What header file does snd_pcm_open need to include?
ALSA lib is mainly an abstract user space library for ALSA applications, which can be called by specific applications. Also utilities are mainly related operating apps that can serve as official demos for developers to refer to. The ALSA audio architecture has been presented earlier. This article mainly focuses on lead and provides a detailed analysis of snd_pcm_open. Detailed analysis of snd_pcm_open sequence diagram code (using playback as an example) introduces the issue of using function pointers to implement the playback interface in alsa_utils aplay. c. The specific definition is as follows static snd_pcm_sframes_t (*writei_func)(snd_pcm_t *handle, const void *buffer, snd_pcm_uframes_t size); After logging in, copy and assign the following value: writable=snd_pcm_writable; readi_func = snd_pcm_readi; writen_func = snd_pcm_writen; readn_func = snd_pcm_readn; After logging in, copy snd_pcm_write and write the PCM data stream by calling _stnd_pcm-write. The prototype of the _stnd_pcm-write function is as follows static inline snd_pcm_sframes_t _snd_pcm_writei(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size){/* lock handled in the callback */if (!pcm->fast_ops->writei)return -ENOSYS;return pcm->fast_ops->writei(pcm->fast_op_arg, buffer, size); // After logging in, copying the function pointer will call pcm ->fast_ops ->writable to perform the actual operation. Upon checking the source code of aplay. c, it was not found where the const snd_pcm_fast_ops_t * fast_ops structure in the PCM device was initialized. It is highly likely that the corresponding operation was performed in snd_pcm_open. The specific analysis of snd_pcm_open in alsa_util


Hot Blog
Related AD
