Пример #1
0
wxThread::ExitCode wxSoundAsyncPlaybackThread::Entry()
{
    m_adapt->m_backend->Play(m_data, m_flags & ~wxSOUND_ASYNC,
                             &m_adapt->m_status);

    m_data->DecRef();
    m_adapt->m_playing = false;
    m_adapt->m_mutexRightToPlay.Unlock();
    wxLogTrace(_T("sound"), _T("terminated async playback thread"));
    return 0;
}
Пример #2
0
void wxSoundBackendSDL::Stop()
{
    SDL_LockAudio();
    SDL_PauseAudio(1);
    m_playing = false;
    if (m_data)
    {
        m_data->DecRef();
        m_data = NULL;
    }
    SDL_UnlockAudio();
}