mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-05 00:36:57 +00:00
AUDIO: Added probe method to ImpulseTracker
This commit is contained in:
parent
aa46d0418c
commit
af18380ac3
@ -225,6 +225,20 @@ RewindableAudioStream *makeImpulseTrackerStream(Common::SeekableReadStream *stre
|
||||
return impulseTrackerMod;
|
||||
}
|
||||
|
||||
bool probeImpulseTracker(Common::SeekableReadStream *st) {
|
||||
int32 setPos = st->pos();
|
||||
|
||||
// xm file
|
||||
char sigIt[4] = { 0 };
|
||||
st->read(sigIt, 4);
|
||||
st->seek(setPos);
|
||||
if (!memcmp(sigIt, "IMPM", 4)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
} // End of namespace Audio
|
||||
|
||||
#endif // #ifdef USE_MIKMOD
|
||||
|
@ -47,9 +47,13 @@ class RewindableAudioStream;
|
||||
* @param disposeAfterUse whether to delete the stream after use
|
||||
* @return a new AudioStream, or NULL, if an error occurred
|
||||
*/
|
||||
RewindableAudioStream *makeImpulseTrackerStream(
|
||||
Common::SeekableReadStream *stream,
|
||||
DisposeAfterUse::Flag disposeAfterUse);
|
||||
RewindableAudioStream *makeImpulseTrackerStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse);
|
||||
|
||||
/**
|
||||
* Check if the stream is one of the supported formats
|
||||
*/
|
||||
bool probeImpulseTracker(Common::SeekableReadStream *stream);
|
||||
|
||||
} // End of namespace Audio
|
||||
|
||||
#endif // #ifdef USE_MIKMOD
|
||||
|
Loading…
Reference in New Issue
Block a user