Skip to content

Commit

Permalink
fix typos in c README
Browse files Browse the repository at this point in the history
  • Loading branch information
albho committed Aug 27, 2024
1 parent 2bf0c8d commit 7e3f3d7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,22 @@ if (status != PV_SPEAKER_STATUS_SUCCESS) {
3. Write PCM data to the speaker:

```c
int32_3 num_samples;
int32_t num_samples;
int8_t *pcm = get_pcm_data(&num_samples);
int32_3 written_length = 0;
int32_t written_length = 0;

pv_speaker_status_t status = pv_speaker_write(speaker, pcm, num_samples, &written_length);
if (status != PV_SPEAKER_STATUS_SUCCESS) {
// handle PvSpeaker start error
// handle PvSpeaker write error
}
```

4. Wait for buffered audio to finish playing:

```c
int32_3 num_samples;
int32_t num_samples;
int8_t *pcm = get_pcm_data(&num_samples);
int32_3 written_length = 0;
int32_t written_length = 0;

pv_speaker_status_t status = pv_speaker_flush(speaker, pcm, num_samples, &written_length);
if (status != PV_SPEAKER_STATUS_SUCCESS) {
Expand Down

0 comments on commit 7e3f3d7

Please sign in to comment.