Changeset 480 for pjproject/trunk/pjmedia/src/pjmedia/wav_player.c
- Timestamp:
- May 28, 2006 2:51:21 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/wav_player.c
r411 r480 320 320 321 321 /* 322 * Set position. 323 */ 324 PJ_DEF(pj_status_t) pjmedia_wav_player_port_set_pos(pjmedia_port *port, 325 pj_uint32_t samples ) 326 { 327 struct file_port *fport; 328 329 PJ_ASSERT_RETURN(port, PJ_EINVAL); 330 331 fport = (struct file_port*) port; 332 333 PJ_ASSERT_RETURN(samples*BYTES_PER_SAMPLE < fport->fsize - 334 sizeof(pjmedia_wave_hdr), PJ_EINVAL); 335 336 fport->fpos = sizeof(struct pjmedia_wave_hdr) + 337 samples * BYTES_PER_SAMPLE; 338 pj_file_setpos( fport->fd, fport->fpos, PJ_SEEK_SET); 339 340 return fill_buffer(fport); 341 } 342 343 344 /* 322 345 * Put frame to file. 323 346 */
Note: See TracChangeset
for help on using the changeset viewer.