Changeset 1486
- Timestamp:
- Oct 7, 2007 7:42:04 AM (17 years ago)
- Location:
- pjproject/trunk/pjmedia
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/config.h
r1483 r1486 76 76 * Specify whether we prefer to use DirectSound on Windows. 77 77 * 78 * Say yes!78 * Default: 0 79 79 */ 80 80 #ifndef PJMEDIA_PREFER_DIRECT_SOUND 81 # define PJMEDIA_PREFER_DIRECT_SOUND 1 81 # define PJMEDIA_PREFER_DIRECT_SOUND 0 82 #endif 83 84 85 /** 86 * Specify PortAudio maximum buffering latency, in milliseconds. 87 */ 88 #ifndef PJMEDIA_PASOUND_MAX_LATENCY 89 # define PJMEDIA_PASOUND_MAX_LATENCY 60 82 90 #endif 83 91 -
pjproject/trunk/pjmedia/src/pjmedia/pasound.c
r1456 r1486 29 29 #define THIS_FILE "pasound.c" 30 30 31 #define MAX_LATENCY (PJMEDIA_PASOUND_MAX_LATENCY / 1000.0) 32 31 33 static int snd_init_count; 32 34 … … 442 444 inputParam.sampleFormat = sampleFormat; 443 445 inputParam.suggestedLatency = paDevInfo->defaultLowInputLatency; 446 if (inputParam.suggestedLatency > MAX_LATENCY) 447 inputParam.suggestedLatency = MAX_LATENCY; 444 448 445 449 paHostApiInfo = Pa_GetHostApiInfo(paDevInfo->hostApi); … … 537 541 outputParam.hostApiSpecificStreamInfo = NULL; 538 542 outputParam.sampleFormat = sampleFormat; 539 outputParam.suggestedLatency = 1.0 * samples_per_frame / clock_rate;; 543 outputParam.suggestedLatency = paDevInfo->defaultLowOutputLatency; 544 if (outputParam.suggestedLatency > MAX_LATENCY) 545 outputParam.suggestedLatency = MAX_LATENCY; 540 546 541 547 paHostApiInfo = Pa_GetHostApiInfo(paDevInfo->hostApi); … … 659 665 inputParam.sampleFormat = sampleFormat; 660 666 inputParam.suggestedLatency = paRecDevInfo->defaultLowInputLatency; 667 if (inputParam.suggestedLatency > MAX_LATENCY) 668 inputParam.suggestedLatency = MAX_LATENCY; 661 669 662 670 paRecHostApiInfo = Pa_GetHostApiInfo(paRecDevInfo->hostApi); … … 668 676 outputParam.sampleFormat = sampleFormat; 669 677 outputParam.suggestedLatency = paPlayDevInfo->defaultLowOutputLatency; 678 if (outputParam.suggestedLatency > MAX_LATENCY) 679 outputParam.suggestedLatency = MAX_LATENCY; 670 680 671 681 paPlayHostApiInfo = Pa_GetHostApiInfo(paPlayDevInfo->hostApi);
Note: See TracChangeset
for help on using the changeset viewer.