MCPcopy Create free account
hub / github.com/assaultcube/AC / reset

Method reset

source/src/oggstream.cpp:80–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void oggstream::reset()
81{
82 name[0] = '\0';
83
84 // stop playing
85 if(src)
86 {
87 src->stop();
88 src->unqueueallbuffers();
89 src->buffer(0);
90 }
91 format = AL_NONE;
92
93 // reset file handler
94 if(isopen)
95 {
96 isopen = !ov_clear(&oggfile);
97 }
98 info = NULL;
99 totalseconds = 0.0f;
100
101 // default settings
102 startmillis = endmillis = startfademillis = endfademillis = 0;
103 gain = 1.0f; // reset gain but not volume setting
104 looping = false;
105}
106
107bool oggstream::open(const char *f)
108{

Callers

nothing calls this directly

Calls 3

unqueueallbuffersMethod · 0.80
bufferMethod · 0.80
stopMethod · 0.45

Tested by

no test coverage detected