Changeset 55339 in vbox for trunk/src/VBox
- Timestamp:
- Apr 20, 2015 12:52:33 PM (10 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp
r55338 r55339 272 272 * thus don't do any bounds checking! 273 273 * 274 * Note: Currently does not handle any endian ess conversion yet!274 * Note: Currently does not handle any endianness conversion yet! 275 275 */ 276 276 #define AUDMIXBUF_CONVERT(_aName, _aType, _aMin, _aMax, _aSigned, _aShift) \ -
trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp
r55335 r55339 154 154 155 155 static int drvHostPulseAudioPulseToFmt(pa_sample_format_t pulsefmt, 156 PDMAUDIOFMT *pFmt, PDMAUDIOENDIANNESS *pEndian ess)156 PDMAUDIOFMT *pFmt, PDMAUDIOENDIANNESS *pEndianness) 157 157 { 158 158 switch (pulsefmt) … … 160 160 case PA_SAMPLE_U8: 161 161 *pFmt = AUD_FMT_U8; 162 *pEndian ess = PDMAUDIOENDIANNESS_LITTLE;162 *pEndianness = PDMAUDIOENDIANNESS_LITTLE; 163 163 break; 164 164 165 165 case PA_SAMPLE_S16LE: 166 166 *pFmt = AUD_FMT_S16; 167 *pEndian ess = PDMAUDIOENDIANNESS_LITTLE;167 *pEndianness = PDMAUDIOENDIANNESS_LITTLE; 168 168 break; 169 169 170 170 case PA_SAMPLE_S16BE: 171 171 *pFmt = AUD_FMT_S16; 172 *pEndian ess = PDMAUDIOENDIANNESS_BIG;172 *pEndianness = PDMAUDIOENDIANNESS_BIG; 173 173 break; 174 174 … … 176 176 case PA_SAMPLE_S32LE: 177 177 *pFmt = AUD_FMT_S32; 178 *pEndian ess = PDMAUDIOENDIANNESS_LITTLE;178 *pEndianness = PDMAUDIOENDIANNESS_LITTLE; 179 179 break; 180 180 #endif … … 183 183 case PA_SAMPLE_S32BE: 184 184 *pFmt = AUD_FMT_S32; 185 *pEndian ess = PDMAUDIOENDIANNESS_BIG;185 *pEndianness = PDMAUDIOENDIANNESS_BIG; 186 186 break; 187 187 #endif … … 602 602 uint32_t cbBuf = RT_MIN(pThisStrmOut->BufAttr.tlength * 2, 603 603 pThisStrmOut->BufAttr.maxlength); /** @todo Make this configurable! */ 604 if (cbBuf) 604 if (cbBuf) 605 605 { 606 606 pThisStrmOut->pvPCMBuf = RTMemAllocZ(cbBuf); … … 852 852 while (cbToRead) 853 853 { 854 rc = audioMixBufReadCirc(&pHstStrmOut->MixBuf, pThisStrmOut->pvPCMBuf, 854 rc = audioMixBufReadCirc(&pHstStrmOut->MixBuf, pThisStrmOut->pvPCMBuf, 855 855 RT_MIN(cbToRead, pThisStrmOut->cbPCMBuf), &cRead); 856 if ( !cRead 856 if ( !cRead 857 857 || RT_FAILURE(rc)) 858 858 { … … 861 861 862 862 cbRead = AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, cRead); 863 if (pa_stream_write(pThisStrmOut->pStream, pThisStrmOut->pvPCMBuf, cbRead, NULL /* Cleanup callback */, 863 if (pa_stream_write(pThisStrmOut->pStream, pThisStrmOut->pvPCMBuf, cbRead, NULL /* Cleanup callback */, 864 864 0, PA_SEEK_RELATIVE) < 0) 865 865 { … … 872 872 cbReadTotal += cbRead; 873 873 874 LogFlowFunc(("\tcRead=%RU32 (%zu bytes) cbReadTotal=%RU32, cbToRead=%RU32\n", 874 LogFlowFunc(("\tcRead=%RU32 (%zu bytes) cbReadTotal=%RU32, cbToRead=%RU32\n", 875 875 cRead, AUDIOMIXBUF_S2B(&pHstStrmOut->MixBuf, cRead), cbReadTotal, cbToRead)); 876 876 }
Note:
See TracChangeset
for help on using the changeset viewer.