Changeset 1893 for pjproject/trunk
- Timestamp:
- Mar 25, 2008 5:05:59 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/pasound.c
r1848 r1893 70 70 71 71 pj_bool_t rec_thread_exited; 72 pj_bool_t rec_thread_initialized;72 //pj_bool_t rec_thread_initialized; 73 73 pj_thread_desc rec_thread_desc; 74 74 pj_thread_t *rec_thread; 75 75 76 76 pj_bool_t play_thread_exited; 77 pj_bool_t play_thread_initialized;77 //pj_bool_t play_thread_initialized; 78 78 pj_thread_desc play_thread_desc; 79 79 pj_thread_t *play_thread; … … 102 102 return paContinue; 103 103 104 if (stream->rec_thread_initialized == 0) { 104 // Sometime the thread, where this callback called from, is changed 105 // (e.g: in MacOS this happens when plugging/unplugging headphone) 106 // if (stream->rec_thread_initialized == 0) { 107 if (!pj_thread_is_registered()) { 105 108 status = pj_thread_register("pa_rec", stream->rec_thread_desc, 106 109 &stream->rec_thread); 107 stream->rec_thread_initialized = 1;110 //stream->rec_thread_initialized = 1; 108 111 PJ_LOG(5,(THIS_FILE, "Recorder thread started")); 109 112 } … … 152 155 return paContinue; 153 156 154 if (stream->play_thread_initialized == 0) { 157 // Sometime the thread, where this callback called from, is changed 158 // (e.g: in MacOS this happens when plugging/unplugging headphone) 159 // if (stream->play_thread_initialized == 0) { 160 if (!pj_thread_is_registered()) { 155 161 status = pj_thread_register("portaudio", stream->play_thread_desc, 156 162 &stream->play_thread); 157 stream->play_thread_initialized = 1;163 //stream->play_thread_initialized = 1; 158 164 PJ_LOG(5,(THIS_FILE, "Player thread started")); 159 165 }
Note: See TracChangeset
for help on using the changeset viewer.