Skip to content

Commit

Permalink
* fix sample rate&channel&format not set correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
lxowalle committed Jan 6, 2025
1 parent dd15847 commit b36179c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/voice/port/maixcam/maix_audio_mmf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,8 @@ namespace maix::audio
// alsa init
snd_pcm_t *handle = NULL;
snd_pcm_hw_params_t *hwparams;
snd_pcm_format_t format_p = _alsa_format_from_maix(format);
err::check_bool_raise(0 <= _alsa_player_init(&handle, &hwparams, &_period_size, format_p, sample_rate, channel, 24000), "capture init failed");
snd_pcm_format_t format_p = _alsa_format_from_maix(_format);
err::check_bool_raise(0 <= _alsa_player_init(&handle, &hwparams, &_period_size, format_p, _sample_rate, _channel, 24000), "capture init failed");
_handle = handle;
snd_pcm_uframes_t buffer_size = 0;
_buffer = _alsa_prepare_buffer(format_p, channel, _period_size, &buffer_size);
Expand Down

0 comments on commit b36179c

Please sign in to comment.