Who can tell me the English translation for various valves!!!

『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

inline meter
s aplay. c is as follows .. char *pcm_name = "default"; . ..err = snd_pcm_open(&handle, pcm_name, stream, open_mode); If (err<0) {error (_ ("audio open error:% s"), snd_strerror (err)); return 1;} After logging in, copy the prototype of the snd_pcm_open function as follows int snd_pcm_open(snd_pcm_t **pcmp, const char *name, snd_pcm_stream_t stream, int mode){snd_config_t *top;int err;assert(pcmp && name);if (_snd_is_ucm_device(name)) {name = uc_mgr_alibcfg_by_device(&top, name);if (name == NULL)return -ENODEV;} else {err = snd_config_update_ref(&top);if (err < 0)return err;}err = snd_pcm_open_noupdate(pcmp, top, name, stream, mode, 0); snd_config_unref(top); return err; }Copy PCMP after logging in, which is the handle of the opened PCM device; name, The name of the PCM device to be opened, the default stream of the default script, the corresponding PCM stream type, the mode for playing PCM stream (SND_PCM_STREAM_LAYBACK) and recording PCM stream (SND_PCM_STREAM_CPTURE), the opening method, blocking, non blocking, asynchronous, etc. snd_pcm_open retrieves the configuration information in als.conf by calling snd_config.update_def, and saves the parameters to snd_config.t. Using snd_pcm_open_noupdate to parse the snd_config.t configuration, the prototype of the snd_pcm_open_noupdate function is as follows static int snd_pcm_open_noupdate(snd_pcm_t **pcmp, snd_config_t *root, const char *name, snd_pcm_stream_t stream, int mode, int hop){int err;snd_config_t *pcm_conf;const char *str;err = snd_config_search_definition(root, "pcm", name, &pcm_conf);if (err < 0) {SNDERR("Unknown PCM %s", name);return err;}if (snd_config_get_string(pcm_conf, &str) >= 0) // Loop recursive parsing err=snd_pcm_open_noupdate (pcmp, root,

『SILVER Official Website SERVICE』

Copyright2026SILVER E-Commerce
+86 15365082610