VERIFY(!snd_pcm_hw_params_set_rate_near(handle, params, &sampleRate,0));; VERIFY(!snd_pcm_hw_params_set_channels(handle, params,2)); VERIFY(!snd_pcm_hw_params(handle, params)); VERIFY(!snd_pcm_hw_params_get_period_size(params, &periodSize,0)); snd_pcm_hw_params_free(params);w...
errx(EXIT_FAILURE,"Audio: Could not set access type: %s", snd_strerror(err));if(0> (err =snd_pcm_hw_params_set_format(playback_handle, hw_params, SND_PCM_FORMAT_S16))) errx(EXIT_FAILURE,"Audio: Could not set sample format to signed 16 bit ""native endian: %s", snd_strerror(...
hw:O1640i,0|hw:O1640i,0|512|3|48000|0|0|nomon|swmeter|-|32bit configuring for 48000Hz, period = 512 frames (10.7 ms), buffer = 3 periods ALSA: final selected sample format for capture: 32bit integer little-endian ALSA: use 3 periods for capture ALSA: cannot set hardware parameters...
SNDRV_PCM_HW_PARAM_RATE,8000,8000);snd_pcm_hw_constraint_minmax(substream->runtime, SNDRV_PCM_HW_PARAM_CHANNELS,1,1);break;caseWL1273_MODE_FM_RX:if(substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { pr_err("Cannot play in RX mode.\n");return-EINVAL; }break;caseWL1273_MODE_FM_T...
snd_pcm_hw_params_free(hw_params); r =snd_pcm_prepare(m_audio_handle); an_init_codecs(); m_capturing =true; an_setup_video_capturing( m_i_fd ); an_setup_audio_capturing(); } 开发者ID:Elitalan,项目名称:datvexpress_gui,代码行数:101,代码来源:an_capture.cpp ...
err = snd_pcm_hw_params_set_access(ad->pcm, hwparams, SND_PCM_ACCESS_MMAP_INTERLEAVED);if(err <0) { g_warning("Cannot set mmap'ed mode on ALSA device \"%s\": %s\n", alsa_device(ad),snd_strerror(-err)); g_warning("Falling back to direct write mode\n"); ...
snd_pcm_hw_constraint_step(runtime,0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE,32); snd_pcm_set_sync(substream); err =0;exit: runtime->private_data = chip; mutex_unlock(&chip->setup_mutex);snd_printdd("<-lx_pcm_open, %d\n", err);returnerr; ...
SND_PCM_STREAM_CAPTURE,0);if(rc <0) {fprintf(stderr,"unable to open pcm device: %s\n", snd_strerror(rc));exit(1); }/* Allocate a hardware parameters object. */snd_pcm_hw_params_alloca(¶ms);/* Fill it in with default values. */snd_pcm_hw_params_any(handle, params);/*...
(&pcm->pcm, desc->name, stm, SND_PCM_NONBLOCK);if(err) PERROR_GOTO(snd_strerror(err), on_error_0); err = snd_pcm_hw_params_malloc(&pcm->hw_params);if(err) PERROR_GOTO(snd_strerror(err), on_error_1); err = snd_pcm_hw_params_any(pcm->pcm, pcm->hw_params);if(err) PERR...
示例1: snd_pcm_hw_params_malloc ▲点赞 7▼ boolPokeLaunchApplication::sound() {#ifJUCE_LINUXinterr;intfreq =44100, channels =2;snd_pcm_hw_params_t*hw_params;snd_pcm_sw_params_t*sw_params; snd_pcm_hw_params_malloc( &hw_params ); ...