unsigned int period_size = 1024; // 设置周期大小为1024个样本点 int dir; // 设置 PCM 设备的周期大小 err = snd_pcm_hw_params_set_period_size_near(pcm_handle, pcm_params, &period_size, &dir); // 检查设置周期大小是否成功 if (err < 0) { fprintf(stderr, "Can't set period size: ...
period_size=8196 dir=0; err = snd_pcm_hw_params_set_period_size_near(this->audio_fd, params, &period_size, &dir); result: period_size=8196period_size=8196 dir=1; err = snd_pcm_hw_params_set_period_size_near(this->audio_fd, params, &period_size, &dir); result: period_size=16...