Esempio n. 1
0
void MPEGaudio:: Play(void)
{
	ResetPause();
	if ( valid_stream )
	{
		#ifdef THREADED_AUDIO
		StartDecoding();
		#endif
		playing = true;
	}
}
Esempio n. 2
0
void
MPEGaudio:: Skip(float seconds)
{
#ifdef THREADED_AUDIO
    /* Stop the decode thread */
    StopDecoding();
#endif

    /* Called only when there is no timestamp info in the MPEG */
    //printf("Audio: Skipping %f seconds...\n", seconds);
    while(seconds > 0)
    {
        seconds -= (float) samplesperframe / ((float) frequencies[version][frequency]*(1+inputstereo));
        if(!loadheader()) break;
    }

#ifdef THREADED_AUDIO
    StartDecoding();
#endif
}