- Timestamp:
- Jul 18, 2009 9:21:09 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-audiodev/wmme_dev.c
r2557 r2841 516 516 WAVEFORMATEX wfx; 517 517 unsigned i, ptime; 518 DWORD flag; 518 519 pj_status_t status; 519 520 … … 538 539 parent->bytes_per_frame = wfx.nAvgBytesPerSec * ptime / 1000; 539 540 541 flag = CALLBACK_EVENT; 542 if (prm->ext_fmt.id == PJMEDIA_FORMAT_L16) 543 flag |= WAVE_FORMAT_DIRECT; 544 540 545 /* 541 546 * Open wave device. … … 543 548 mr = waveOutOpen(&wmme_strm->hWave.Out, 544 549 wf->dev_info[prm->play_id].deviceId, 545 &wfx, (DWORD)wmme_strm->hEvent, 0, CALLBACK_EVENT);550 &wfx, (DWORD)wmme_strm->hEvent, 0, flag); 546 551 if (mr != MMSYSERR_NOERROR) { 547 552 return PJMEDIA_AUDIODEV_ERRNO_FROM_WMME_OUT(mr); … … 604 609 MMRESULT mr; 605 610 WAVEFORMATEX wfx; 611 DWORD flag; 606 612 unsigned i, ptime; 607 613 … … 624 630 parent->bytes_per_frame = wfx.nAvgBytesPerSec * ptime / 1000; 625 631 632 flag = CALLBACK_EVENT; 633 if (prm->ext_fmt.id == PJMEDIA_FORMAT_L16) 634 flag |= WAVE_FORMAT_DIRECT; 635 626 636 /* 627 637 * Open wave device. … … 629 639 mr = waveInOpen(&wmme_strm->hWave.In, 630 640 wf->dev_info[prm->rec_id].deviceId, 631 &wfx, (DWORD)wmme_strm->hEvent, 0, CALLBACK_EVENT);641 &wfx, (DWORD)wmme_strm->hEvent, 0, flag); 632 642 if (mr != MMSYSERR_NOERROR) { 633 643 return PJMEDIA_AUDIODEV_ERRNO_FROM_WMME_IN(mr);
Note: See TracChangeset
for help on using the changeset viewer.