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; }
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; }; }
int RewindWav(int channel) { return SeekWav(0,channel); }