void CTestPage::StopPlayback( void ) ///////////////////////////////////////////////////////////////////////////// { PHALWAVEDEVICE pHD; if( m_nPlayMode != MODE_RUN ) return; DPF(("Stopping Play Device %d\n", m_nPlayDevice )); pHD = m_pHalAdapter->GetWaveOutDevice( m_nPlayDevice ); //DPF(("Stop\n")); if( pHD->Stop() ) { DPF(("Stop Failed!\n")); } m_nPlayMode = MODE_STOP; m_WavePlayFile.Close(); free( m_pPlayBuffer ); ReleasePhysicalPages( m_pPlayBuffer, m_ulPlayBufferSize, m_ulPlayBufferPages ); // change the button to play SetDlgItemText( IDC_PLAY, "Play" ); SetDlgItemText( IDC_PLAY_SAMPLECOUNT, "" ); if( m_bRepeat ) StartPlayback(); }
USHORT FreeMemory( PVOID pObject, PVOID pVAddr ) // Free memory allocated with above procedure ///////////////////////////////////////////////////////////////////////////// { ReleasePhysicalPages( pVAddr, 2048, 1 ); free( pObject ); return( HSTATUS_OK ); }