[vorbis-dev] Winamp plugin

Philip Heron dragonsfire at lineone.net
Sat Jul 1 18:21:15 PDT 2000



Hi all,

There seems to be a problem with the winamp plugin not releasing the file
when playing is stopped.

I put  ov_clear(&input_file);  into the stop() function and that seems to
work, but I'm fairly new to ogg so it could be the wrong way of doing things !

void stop()
{
        if (thread_handle != INVALID_HANDLE_VALUE) {
                killDecodeThread = 1;
                
                if (WaitForSingleObject(thread_handle, INFINITE) == WAIT_TIMEOUT) {
                        MessageBox(mod.hMainWindow, "error asking thread to die!\n", "error
killing decode thread", 0);
                        TerminateThread(thread_handle, 0);
                }

                CloseHandle(thread_handle);
                thread_handle = INVALID_HANDLE_VALUE;

                ov_clear(&input_file);

        }

        // deallocate sample buffer
        if (sample_buffer)
                free(sample_buffer);

        mod.outMod->Close();

        mod.SAVSADeInit();
}


--

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/




More information about the Vorbis-dev mailing list