- Timestamp:
- Jun 16, 2017 11:56:45 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioMixer.cpp
r67429 r67436 874 874 return 0; 875 875 876 if ( !(pSink->fStatus & AUDMIXSINK_STS_RUNNING)877 || pSink->fStatus & AUDMIXSINK_STS_PENDING_DISABLE)878 {879 return 0;880 }881 882 876 uint32_t cbWritable = 0; 883 877 878 if ( (pSink->fStatus & AUDMIXSINK_STS_RUNNING) 879 && !(pSink->fStatus & AUDMIXSINK_STS_PENDING_DISABLE)) 880 { 884 881 #ifdef VBOX_AUDIO_MIXER_WITH_MIXBUF 885 882 # error "Implement me!" 886 883 #else 887 /* The hosts sets the pace --888 * so we try to find the minimum of writable data to all connected streams to this sink. */889 PAUDMIXSTREAM pMixStream;890 RTListForEach(&pSink->lstStreams, pMixStream, AUDMIXSTREAM, Node)891 {892 if (!(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTRMSTS_FLAG_ENABLED))893 {894 Log3Func(("[%s] Stream '%s' disabled, skipping ...\n", pSink->pszName, pMixStream->pszName));895 continue;896 }897 898 const uint32_t cbWritableStream = pMixStream->pConn->pfnStreamGetWritable(pMixStream->pConn, pMixStream->pStream);899 900 if (cbWritable < cbWritableStream)901 cbWritable = cbWritableStream;902 903 break; /** @todo For now the first stream sets the pace. */904 }884 /* The hosts sets the pace -- 885 * so we try to find the minimum of writable data to all connected streams to this sink. */ 886 PAUDMIXSTREAM pMixStream; 887 RTListForEach(&pSink->lstStreams, pMixStream, AUDMIXSTREAM, Node) 888 { 889 if (!(pMixStream->pConn->pfnStreamGetStatus(pMixStream->pConn, pMixStream->pStream) & PDMAUDIOSTRMSTS_FLAG_ENABLED)) 890 { 891 Log3Func(("[%s] Stream '%s' disabled, skipping ...\n", pSink->pszName, pMixStream->pszName)); 892 continue; 893 } 894 895 const uint32_t cbWritableStream = pMixStream->pConn->pfnStreamGetWritable(pMixStream->pConn, pMixStream->pStream); 896 897 if (cbWritable < cbWritableStream) 898 cbWritable = cbWritableStream; 899 900 break; /** @todo For now the first stream sets the pace. */ 901 } 905 902 #endif 903 } 906 904 907 905 Log3Func(("[%s] cbWritable=%RU32\n", pSink->pszName, cbWritable));
Note:
See TracChangeset
for help on using the changeset viewer.