Changeset 319 for pjproject/trunk/pjmedia/src/pjmedia/stream.c
- Timestamp:
- Mar 15, 2006 8:56:04 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/stream.c
r311 r319 54 54 unsigned pt; /**< Payload type. */ 55 55 pj_bool_t paused; /**< Paused?. */ 56 pj_snd_stream_info snd_info; /**< Sound stream param. */57 //pj_snd_stream *snd_stream; /**< Sound stream. */58 56 unsigned in_pkt_size; /**< Size of input buffer. */ 59 57 void *in_pkt; /**< Input buffer. */ … … 279 277 280 278 /* Number of samples in the frame */ 281 ts_len = frame->size / (channel->snd_info.bits_per_sample / 8);279 ts_len = frame->size / 2; 282 280 283 281 /* Init frame_out buffer. */ … … 565 563 566 564 /* 567 * Create sound stream parameter from codec attributes.568 */569 static void init_snd_param( pj_snd_stream_info *snd_param,570 const pjmedia_codec_param *codec_param)571 {572 pj_memset(snd_param, 0, sizeof(*snd_param));573 574 snd_param->bits_per_sample = codec_param->pcm_bits_per_sample;575 snd_param->bytes_per_frame = 2;576 snd_param->frames_per_packet = codec_param->sample_rate *577 codec_param->ptime /578 1000;579 snd_param->samples_per_frame = 1;580 snd_param->samples_per_sec = codec_param->sample_rate;581 }582 583 584 /*585 565 * Create media channel. 586 566 */ … … 643 623 if (status != PJ_SUCCESS) 644 624 return status; 645 646 /* Create and initialize sound device */647 648 init_snd_param(&channel->snd_info, codec_param);649 650 /*651 if (dir == PJMEDIA_DIR_ENCODING)652 channel->snd_stream = pj_snd_open_recorder(-1, &channel->snd_info,653 &rec_callback, channel);654 else655 channel->snd_stream = pj_snd_open_player(-1, &channel->snd_info,656 &play_callback, channel);657 658 if (!channel->snd_stream)659 return -1;660 */661 625 662 626 /* Done. */
Note: See TracChangeset
for help on using the changeset viewer.