Ejemplo n.º 1
0
int AalibSeek(int channel,int time)
{
	if ((PSPAALIB_CHANNEL_WAV_1<=channel)&&(channel<=PSPAALIB_CHANNEL_WAV_32))
	{
		return SeekWav(channel-PSPAALIB_CHANNEL_WAV_1,time);
	}
	if ((PSPAALIB_CHANNEL_OGG_1<=channel)&&(channel<=PSPAALIB_CHANNEL_OGG_10))
	{
		return SeekOgg(channel-PSPAALIB_CHANNEL_OGG_1,time);
	}
	return PSPAALIB_ERROR_INVALID_CHANNEL;
}
Ejemplo n.º 2
0
	void SoundStreamData::SeekTo(Int millisecond) {
		if (!mStreamReader)
			return;
		if (!mStreamReader->IsOpen())
			return;
		mSampleOffset = (millisecond * mProperties.GetFrequency()) / 1000;
		if (mSampleOffset >= mNumTotalSamples) {
			mSampleOffset = 0;
			if (!mIsLooping)
				Close();
		}
		switch (mFileType)
		{
		case kSoundStreamFileOgg:
			SeekOgg();
			return;
		case kSoundStreamFileWav:
			SeekWav();
			return;
		default:
			return;
		};
	}
Ejemplo n.º 3
0
int RewindWav(int channel)
{
	return SeekWav(0,channel);
}