comparison pcm/pcm_tx.c @ 12:27ca01bb5b11

pcm: implement play-stop command
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 23 Jun 2024 20:06:09 +0000
parents e149ca1dd14f
children fa341317c844
comparison
equal deleted inserted replaced
11:e149ca1dd14f 12:27ca01bb5b11
192 close(fd); 192 close(fd);
193 memset(play_buffer + pre_offset + st.st_size, pcm_fill_octet, offset); 193 memset(play_buffer + pre_offset + st.st_size, pcm_fill_octet, offset);
194 play_buf_nframes = st.st_size / 160 + 1; 194 play_buf_nframes = st.st_size / 160 + 1;
195 play_buf_ptr = 0; 195 play_buf_ptr = 0;
196 } 196 }
197
198 void cmd_play_stop(int argc, char **argv)
199 {
200 if (!record_file) {
201 printf("error: no file play in progress\n");
202 return;
203 }
204 free(play_buffer);
205 play_buffer = NULL;
206 }