dx8 sound sample using a double pointer to traverse list question!

Started by
-1 comments, last by GekkoCube 20 years, 5 months ago
The source below traverses a linked list of directsound8 buffers and resumes them all for playback. my question: why did they use... BufferQueueNode** ppNode; instead of... BufferQueueNode* ppNode; ...?

BufferQueueNode** ppNode;
   
   for( ppNode = &m_pBusyBuffersHead; (*ppNode); )
   {
      DWORD dwStatus;
      (*ppNode)->pBuffer->GetStatus( &dwStatus );

      // If the buffer is playing

      if((dwStatus & DSBSTATUS_PAUSED))
      {
         (*ppNode)->pBuffer->Pause(DSBPAUSE_RESUME);
      }
      else
      {
         ppNode = &(*ppNode)->pNext;
      }
   }

This topic is closed to new replies.

Advertisement