Changeset 53567 in vbox for trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp
- Timestamp:
- Dec 18, 2014 12:42:45 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp
r53562 r53567 213 213 if (close(*phFile)) 214 214 { 215 LogRel((" Audio: Closing descriptor failed: %s\n",215 LogRel(("OSS: Closing descriptor failed: %s\n", 216 216 strerror(errno))); 217 217 rc = VERR_GENERAL_FAILURE; /** @todo */ … … 242 242 if (!pszDev) 243 243 { 244 LogRel((" Audio: Invalid or no %s device name set\n",244 LogRel(("OSS: Invalid or no %s device name set\n", 245 245 fIn ? "input" : "output")); 246 246 rc = VERR_INVALID_PARAMETER; … … 251 251 if (hFile == -1) 252 252 { 253 LogRel((" Audio: Failed to open %s: %s\n", pszDev, strerror(errno)));253 LogRel(("OSS: Failed to open %s: %s\n", pszDev, strerror(errno))); 254 254 rc = RTErrConvertFromErrno(errno); 255 255 break; … … 259 259 if (ioctl(hFile, SNDCTL_DSP_SAMPLESIZE, &iFormat)) 260 260 { 261 LogRel((" Audio: Failed to set audio format to %ld\n",261 LogRel(("OSS: Failed to set audio format to %ld\n", 262 262 iFormat, strerror(errno))); 263 263 rc = RTErrConvertFromErrno(errno); … … 268 268 if (ioctl(hFile, SNDCTL_DSP_CHANNELS, &cChannels)) 269 269 { 270 LogRel((" Audio: Failed to set number of audio channels (%d): %s\n",270 LogRel(("OSS: Failed to set number of audio channels (%d): %s\n", 271 271 pReq->cChannels, strerror(errno))); 272 272 rc = RTErrConvertFromErrno(errno); … … 277 277 if (ioctl(hFile, SNDCTL_DSP_SPEED, &freq)) 278 278 { 279 LogRel((" Audio: Failed to set audio frequency (%dHZ): %s\n",279 LogRel(("OSS: Failed to set audio frequency (%dHZ): %s\n", 280 280 pReq->uFreq, strerror(errno))); 281 281 rc = RTErrConvertFromErrno(errno); … … 287 287 if (ioctl(hFile, SNDCTL_DSP_NONBLOCK)) 288 288 { 289 LogRel((" Audio: Failed to set non-blocking mode: %s\n",289 LogRel(("OSS: Failed to set non-blocking mode: %s\n", 290 290 strerror(errno))); 291 291 rc = RTErrConvertFromErrno(errno); … … 296 296 if (ioctl(hFile, SNDCTL_DSP_SETFRAGMENT, &mmmmssss)) 297 297 { 298 LogRel((" Audio: Failed to set %RU16 fragments to %RU32 bytes each: %s\n",298 LogRel(("OSS: Failed to set %RU16 fragments to %RU32 bytes each: %s\n", 299 299 pReq->cFragments, pReq->cbFragmentSize, strerror(errno))); 300 300 rc = RTErrConvertFromErrno(errno); … … 306 306 &abinfo)) 307 307 { 308 LogRel((" Audio: Failed to retrieve buffer length: %s\n", strerror(errno)));308 LogRel(("OSS: Failed to retrieve buffer length: %s\n", strerror(errno))); 309 309 rc = RTErrConvertFromErrno(errno); 310 310 break; … … 370 370 if (ioctl(pThisStrmOut->hFile, SNDCTL_DSP_SETTRIGGER, &mask) < 0) 371 371 { 372 LogRel((" Audio: Failed to enable output stream: %s\n",372 LogRel(("OSS: Failed to enable output stream: %s\n", 373 373 strerror(errno))); 374 374 rc = RTErrConvertFromErrno(errno); … … 383 383 if (ioctl(pThisStrmOut->hFile, SNDCTL_DSP_SETTRIGGER, &mask) < 0) 384 384 { 385 LogRel((" Audio: Failed to disable output stream: %s\n",385 LogRel(("OSS: Failed to disable output stream: %s\n", 386 386 strerror(errno))); 387 387 rc = RTErrConvertFromErrno(errno); … … 588 588 { 589 589 if (obtStream.cFragments * obtStream.cbFragmentSize & pHstStrmIn->Props.uAlign) 590 LogRel((" Audio: Warning: Misaligned DAC output buffer: Size = %zu, Alignment = %u\n",590 LogRel(("OSS: Warning: Misaligned DAC output buffer: Size = %zu, Alignment = %u\n", 591 591 obtStream.cFragments * obtStream.cbFragmentSize, 592 592 pHstStrmIn->Props.uAlign + 1)); … … 616 616 if (!pThisStrmIn->pvBuf) 617 617 { 618 LogRel((" Audio: Failed allocating ADC buffer with %RU32 samples, each %d bytes\n",618 LogRel(("OSS: Failed allocating ADC buffer with %RU32 samples, each %d bytes\n", 619 619 cSamples, 1 << pHstStrmIn->Props.cShift)); 620 620 rc = VERR_NO_MEMORY; … … 665 665 { 666 666 if (obtStream.cFragments * obtStream.cbFragmentSize & pHstStrmOut->Props.uAlign) 667 LogRel((" Audio: Warning: Misaligned DAC output buffer: Size = %zu, Alignment = %u\n",667 LogRel(("OSS: Warning: Misaligned DAC output buffer: Size = %zu, Alignment = %u\n", 668 668 obtStream.cFragments * obtStream.cbFragmentSize, 669 669 pHstStrmOut->Props.uAlign + 1)); … … 693 693 if (pThisStrmOut->pvPCMBuf == MAP_FAILED) 694 694 { 695 LogRel((" Audio: Failed to memory map %zu bytes of DAC output file: %s\n",695 LogRel(("OSS: Failed to memory map %zu bytes of DAC output file: %s\n", 696 696 cSamples << pHstStrmOut->Props.cShift, strerror(errno))); 697 697 rc = RTErrConvertFromErrno(errno); … … 703 703 if (ioctl(hFile, SNDCTL_DSP_SETTRIGGER, &mask) < 0) 704 704 { 705 LogRel((" Audio: Failed to retrieve initial trigger mask: %s\n",705 LogRel(("OSS: Failed to retrieve initial trigger mask: %s\n", 706 706 strerror(errno))); 707 707 rc = RTErrConvertFromErrno(errno); … … 713 713 if (ioctl (hFile, SNDCTL_DSP_SETTRIGGER, &mask) < 0) 714 714 { 715 LogRel((" Audio: Failed to retrieve PCM_ENABLE_OUTPUT mask: %s\n",716 strerror(errno)));715 LogRel(("OSS: Failed to retrieve PCM_ENABLE_OUTPUT mask: %s\n", 716 strerror(errno))); 717 717 rc = RTErrConvertFromErrno(errno); 718 718 /* Note: No break here, need to unmap file first! */ … … 727 727 cSamples << pHstStrmOut->Props.cShift); 728 728 if (rc2) 729 LogRel((" Audio: Failed to unmap DAC output file: %s\n",729 LogRel(("OSS: Failed to unmap DAC output file: %s\n", 730 730 strerror(errno))); 731 731 … … 745 745 if (!pThisStrmOut->pvPCMBuf) 746 746 { 747 LogRel((" Audio: Failed allocating DAC buffer with %RU32 samples, each %d bytes\n",747 LogRel(("OSS: Failed allocating DAC buffer with %RU32 samples, each %d bytes\n", 748 748 cSamples, 1 << pHstStrmOut->Props.cShift)); 749 749 rc = VERR_NO_MEMORY; … … 793 793 if (!rc2) 794 794 { 795 LogRel((" Audio: Failed to retrieve current playback pointer: %s\n",795 LogRel(("OSS: Failed to retrieve current playback pointer: %s\n", 796 796 strerror(errno))); 797 797 rc = RTErrConvertFromErrno(errno); … … 820 820 if (rc2 < 0) 821 821 { 822 LogRel((" Audio: Failed to retrieve current playback buffer: %s\n",822 LogRel(("OSS: Failed to retrieve current playback buffer: %s\n", 823 823 strerror(errno))); 824 824 rc = RTErrConvertFromErrno(errno); … … 865 865 if (cbWritten == -1) 866 866 { 867 LogRel((" Audio: Failed writing output data %s\n", strerror(errno)));867 LogRel(("OSS: Failed writing output data %s\n", strerror(errno))); 868 868 rc = RTErrConvertFromErrno(errno); 869 869 break;
Note:
See TracChangeset
for help on using the changeset viewer.