| 164 | } |
| 165 | |
| 166 | void location::update() |
| 167 | { |
| 168 | if(stale) return; |
| 169 | |
| 170 | switch(src->state()) |
| 171 | { |
| 172 | case AL_PLAYING: |
| 173 | updatepos(); |
| 174 | break; |
| 175 | case AL_STOPPED: |
| 176 | case AL_PAUSED: |
| 177 | case AL_INITIAL: |
| 178 | stale = true; |
| 179 | DEBUG("location is stale"); |
| 180 | break; |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | void location::play(bool loop) |
| 185 | { |