Changeset 767:de19eb8842c4 in mediastreamer2
- Timestamp:
- Nov 9, 2009 8:39:26 PM (4 years ago)
- Branch:
- default
- Location:
- linphone/mediastreamer2/src
- Files:
-
- 2 edited
-
winsnd2.c (modified) (4 diffs)
-
winsndds.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
linphone/mediastreamer2/src/winsnd2.c
r606 r767 902 902 static void winsndcard_detect(MSSndCardManager *m){ 903 903 _winsndcard_detect(m); 904 ms_thread_create(&poller_thread,NULL,new_device_polling_thread,NULL); 904 if (poller_thread==NULL) 905 ms_thread_create(&poller_thread,NULL,new_device_polling_thread,NULL); 905 906 } 906 907 … … 1106 1107 } 1107 1108 } 1109 #ifndef _TRUE_TIME 1110 ms_mutex_lock(&f->ticker->lock); 1111 ms_ticker_set_time_func(f->ticker,winsnd_get_cur_time,d); 1112 ms_mutex_unlock(&f->ticker->lock); 1113 #endif 1114 1108 1115 bsize=WINSND_NSAMPLES*d->wfx.nAvgBytesPerSec/8000; 1109 1116 ms_debug("Using input buffers of %i bytes",bsize); … … 1116 1123 if (mr != MMSYSERR_NOERROR){ 1117 1124 ms_error("waveInStart() error"); 1125 #ifndef _TRUE_TIME 1126 ms_mutex_lock(&f->ticker->lock); 1127 ms_ticker_set_time_func(f->ticker,NULL,NULL); 1128 ms_mutex_unlock(&f->ticker->lock); 1129 #endif 1118 1130 return ; 1119 1131 } 1120 #ifndef _TRUE_TIME1121 ms_ticker_set_time_func(f->ticker,winsnd_get_cur_time,d);1122 #endif1123 1132 } 1124 1133 … … 1128 1137 int i; 1129 1138 #ifndef _TRUE_TIME 1139 ms_mutex_lock(&f->ticker->lock); 1130 1140 ms_ticker_set_time_func(f->ticker,NULL,NULL); 1141 ms_mutex_unlock(&f->ticker->lock); 1131 1142 #endif 1132 1143 d->running=FALSE; -
linphone/mediastreamer2/src/winsndds.cpp
r607 r767 1148 1148 static void winsnddscard_detect(MSSndCardManager *m){ 1149 1149 _winsnddscard_detect(m); 1150 ms_thread_create(&poller_thread,NULL,new_device_polling_thread,NULL); 1150 if (poller_thread==NULL) 1151 ms_thread_create(&poller_thread,NULL,new_device_polling_thread,NULL); 1151 1152 } 1152 1153 … … 1351 1352 hr = IDirectSoundCaptureBuffer_Start( d->lpDirectSoundInputBuffer, DSCBSTART_LOOPING ); 1352 1353 1354 ms_mutex_lock(&f->ticker->lock); 1353 1355 ms_ticker_set_time_func(f->ticker,winsndds_get_cur_time,d); 1356 ms_mutex_unlock(&f->ticker->lock); 1354 1357 1355 1358 d->thread_running=TRUE; … … 1371 1374 ms_thread_join(d->thread,NULL); 1372 1375 1376 ms_mutex_lock(&f->ticker->lock); 1373 1377 ms_ticker_set_time_func(f->ticker,NULL,NULL); 1378 ms_mutex_unlock(&f->ticker->lock); 1374 1379 1375 1380 if( d->lpDirectSoundInputBuffer ) … … 1520 1525 hr = IDirectSoundCaptureBuffer_Start( d_capture_filter->lpDirectSoundInputBuffer, DSCBSTART_LOOPING ); 1521 1526 1527 ms_mutex_lock(&f->ticker->lock); 1522 1528 ms_ticker_set_time_func(f_capture_filter->ticker,winsndds_get_cur_time,d_capture_filter); 1529 ms_mutex_unlock(&f->ticker->lock); 1523 1530 1524 1531 d_capture_filter->thread_running=TRUE;
Note: See TracChangeset
for help on using the changeset viewer.
