Video playback support phase 2

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1246 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2003-09-20 01:09:01 +00:00
parent 49fbd74ed4
commit 3decaeaf7a
2 changed files with 18 additions and 0 deletions
+17
View File
@@ -126,6 +126,23 @@ ResumeStream (uint32 source)
TFBSound_SourcePlay (soundSource[source].handle); TFBSound_SourcePlay (soundSource[source].handle);
} }
void
SeekStream (uint32 source, uint32 pos)
{
TFB_SoundSample* sample = soundSource[source].sample;
bool looping;
bool scope;
if (!sample)
return;
looping = sample->decoder->looping;
scope = soundSource[source].sbuffer != NULL;
StopSource (source);
SoundDecoder_Seek (sample->decoder, pos);
PlayStream (sample, source, looping, scope, false);
}
BOOLEAN BOOLEAN
PlayingStream (uint32 source) PlayingStream (uint32 source)
{ {
+1
View File
@@ -22,6 +22,7 @@ void PlayStream (TFB_SoundSample *sample, uint32 source, bool looping,
void StopStream (uint32 source); void StopStream (uint32 source);
void PauseStream (uint32 source); void PauseStream (uint32 source);
void ResumeStream (uint32 source); void ResumeStream (uint32 source);
void SeekStream (uint32 source, uint32 pos);
BOOLEAN PlayingStream (uint32 source); BOOLEAN PlayingStream (uint32 source);
int StreamDecoderTaskFunc (void *data); int StreamDecoderTaskFunc (void *data);
int PreDecodeClips (TFB_SoundSample *sample, TFB_SoundDecoder *decoders[], bool autofree); int PreDecodeClips (TFB_SoundSample *sample, TFB_SoundDecoder *decoders[], bool autofree);