Changeset 2495
- Timestamp:
- Mar 10, 2009 12:05:23 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/wmme_dev.c
r2494 r2495 674 674 pj_status_t status = PJ_SUCCESS; 675 675 static unsigned rec_cnt, play_cnt; 676 enum { MAX_BURST = 1 }; 676 677 677 678 rec_cnt = play_cnt = 0; … … 707 708 pjmedia_dir signalled_dir; 708 709 709 /* Swap */710 /* Swap hWaveIn and hWaveOut to get equal opportunity for both */ 710 711 if (eventCount==3) { 711 712 HANDLE hTemp = events[2]; … … 740 741 { 741 742 struct wmme_channel *wmme_strm = &strm->play_strm; 743 unsigned burst; 742 744 743 745 status = PJ_SUCCESS; … … 748 750 */ 749 751 750 while (wmme_strm->WaveHdr[wmme_strm->dwBufIdx].dwFlags & WHDR_DONE) 752 for (burst=0; burst<MAX_BURST && 753 (wmme_strm->WaveHdr[wmme_strm->dwBufIdx].dwFlags & WHDR_DONE); 754 ++burst) 751 755 { 752 756 void *buffer = wmme_strm->WaveHdr[wmme_strm->dwBufIdx].lpData; … … 829 833 wmme_strm->timestamp.u64 += strm->param.samples_per_frame / 830 834 strm->param.channel_count; 831 } 835 } /* for */ 832 836 } 833 837 else 834 838 { 835 839 struct wmme_channel *wmme_strm = &strm->rec_strm; 840 unsigned burst; 836 841 MMRESULT mr = MMSYSERR_NOERROR; 837 842 status = PJ_SUCCESS; … … 865 870 #endif 866 871 867 while (wmme_strm->WaveHdr[wmme_strm->dwBufIdx].dwFlags & WHDR_DONE) 872 for (burst=0; burst<MAX_BURST && 873 (wmme_strm->WaveHdr[wmme_strm->dwBufIdx].dwFlags & WHDR_DONE); 874 ++burst) 868 875 { 869 876 char* buffer = (char*) … … 935 942 wmme_strm->timestamp.u64 += strm->param.samples_per_frame / 936 943 strm->param.channel_count; 937 } 944 } /* for */ 938 945 } 939 946 }
Note: See TracChangeset
for help on using the changeset viewer.