| 78 | } |
| 79 | |
| 80 | void 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 | |
| 107 | bool oggstream::open(const char *f) |
| 108 | { |
nothing calls this directly
no test coverage detected