Changeset 744 for pjproject/trunk/pjmedia/src/pjmedia/dsound.c
- Timestamp:
- Sep 27, 2006 10:49:55 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/dsound.c
r732 r744 90 90 { 91 91 pjmedia_dir dir; /**< Sound direction. */ 92 int play_id; /**< Playback dev id. */ 93 int rec_id; /**< Recording dev id. */ 92 94 pj_pool_t *pool; /**< Memory pool. */ 93 95 … … 102 104 unsigned clock_rate; /**< Clock rate. */ 103 105 unsigned samples_per_frame; /**< Samples per frame. */ 106 unsigned bits_per_sample; /**< Bits per sample. */ 107 unsigned channel_count; /**< Channel count. */ 104 108 105 109 pj_thread_t *thread; /**< Thread handle. */ … … 720 724 strm = pj_pool_zalloc(pool, sizeof(pjmedia_snd_stream)); 721 725 strm->dir = dir; 726 strm->play_id = play_id; 727 strm->rec_id = rec_id; 722 728 strm->pool = pool; 723 729 strm->rec_cb = rec_cb; … … 726 732 strm->clock_rate = clock_rate; 727 733 strm->samples_per_frame = samples_per_frame; 734 strm->bits_per_sample = bits_per_sample; 735 strm->channel_count = channel_count; 728 736 strm->buffer = pj_pool_alloc(pool, samples_per_frame * BYTES_PER_SAMPLE); 729 737 if (!strm->buffer) { … … 828 836 829 837 /* 838 * Get stream info. 839 */ 840 PJ_DEF(pj_status_t) pjmedia_snd_stream_get_info(pjmedia_snd_stream *strm, 841 pjmedia_snd_stream_info *pi) 842 { 843 844 PJ_ASSERT_RETURN(strm && pi, PJ_EINVAL); 845 846 pj_bzero(pi, sizeof(*pi)); 847 pi->dir = strm->dir; 848 pi->play_id = strm->play_id; 849 pi->rec_id = strm->rec_id; 850 pi->clock_rate = strm->clock_rate; 851 pi->channel_count = strm->channel_count; 852 pi->samples_per_frame = strm->samples_per_frame; 853 pi->bits_per_sample = strm->bits_per_sample; 854 pi->rec_latency = 0; 855 pi->play_latency = 0; 856 857 return PJ_SUCCESS; 858 } 859 860 861 /* 830 862 * Start stream. 831 863 */
Note: See TracChangeset
for help on using the changeset viewer.