dsound: replace size to empty function
This commit is contained in:
parent
50d21d8127
commit
f872bb5f8a
|
@ -156,7 +156,7 @@ static inline void DSStream_Packet_Stop(
|
|||
{
|
||||
DSStream_Packet_Stop_Internal(pThis);
|
||||
|
||||
if (pThis->Host_BufferPacketArray.size() == 0) {
|
||||
if (pThis->Host_BufferPacketArray.empty()) {
|
||||
if ((pThis->EmuFlags & DSE_FLAG_ENVELOPE2) > 0) {
|
||||
pThis->Xb_Status |= X_DSSSTATUS_ENVELOPECOMPLETE;
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ bool DSStream_Packet_Process(
|
|||
{
|
||||
|
||||
// Do not allow to process if there is no packets.
|
||||
if (pThis->Host_BufferPacketArray.size() == 0) {
|
||||
if (pThis->Host_BufferPacketArray.empty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -282,7 +282,7 @@ bool DSStream_Packet_Process(
|
|||
bool isStreamEnd = packetCurrent->isStreamEnd;
|
||||
DSStream_Packet_Clear(packetCurrent, XMP_STATUS_SUCCESS, pThis->Xb_lpfnCallback, pThis->Xb_lpvContext, pThis);
|
||||
|
||||
if (pThis->Host_BufferPacketArray.size() == 0) {
|
||||
if (pThis->Host_BufferPacketArray.empty()) {
|
||||
if (isStreamEnd) {
|
||||
DSStream_Packet_Stop(pThis);
|
||||
}
|
||||
|
@ -318,7 +318,7 @@ bool DSStream_Packet_Process(
|
|||
DSStream_Packet_Prefill(pThis, packetCurrent);
|
||||
}
|
||||
// Out of packets, let's stop stream's buffer.
|
||||
if (pThis->Host_BufferPacketArray.size() == 0) {
|
||||
if (pThis->Host_BufferPacketArray.empty()) {
|
||||
DSStream_Packet_Starved(pThis);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -899,7 +899,7 @@ xbox::hresult_xt WINAPI xbox::EMUPATCH(CDirectSound_SynchPlayback)
|
|||
|
||||
vector_ds_stream::iterator ppDSStream = g_pDSoundStreamCache.begin();
|
||||
for (; ppDSStream != g_pDSoundStreamCache.end(); ppDSStream++) {
|
||||
if ((*ppDSStream)->Host_BufferPacketArray.size() == 0) {
|
||||
if ((*ppDSStream)->Host_BufferPacketArray.empty()) {
|
||||
continue;
|
||||
}
|
||||
if (((*ppDSStream)->EmuFlags & DSE_FLAG_SYNCHPLAYBACK_CONTROL) > 0) {
|
||||
|
|
|
@ -126,7 +126,7 @@ void DirectSoundDoWork_Stream(xbox::LARGE_INTEGER& time)
|
|||
// Actually, DirectSoundStream need to process buffer packets here.
|
||||
vector_ds_stream::iterator ppDSStream = g_pDSoundStreamCache.begin();
|
||||
for (; ppDSStream != g_pDSoundStreamCache.end(); ppDSStream++) {
|
||||
if ((*ppDSStream)->Host_BufferPacketArray.size() == 0) {
|
||||
if ((*ppDSStream)->Host_BufferPacketArray.empty()) {
|
||||
continue;
|
||||
}
|
||||
xbox::X_CDirectSoundStream* pThis = (*ppDSStream);
|
||||
|
|
Loading…
Reference in New Issue