fixed clang warnings
This commit is contained in:
parent
cd657a1234
commit
43b21c664a
@ -100,7 +100,6 @@ void ALStream::update(double delta) {
|
||||
uint buffer;
|
||||
AL_CHECK(alSourceUnqueueBuffers(source, 1, &buffer));
|
||||
unusedBuffers.push(buffer);
|
||||
std::cout << "unqueue " << buffer << std::endl;
|
||||
}
|
||||
|
||||
uint preloaded = 0;
|
||||
@ -109,15 +108,12 @@ void ALStream::update(double delta) {
|
||||
if (preloadBuffer(buffer, loop)) {
|
||||
preloaded++;
|
||||
unusedBuffers.pop();
|
||||
std::cout << "queue " << buffer << std::endl;
|
||||
AL_CHECK(alSourceQueueBuffers(source, 1, &buffer));
|
||||
}
|
||||
}
|
||||
if (speaker->isStopped() && !speaker->isStoppedManually()) {
|
||||
std::cout << "preloaded " << preloaded << std::endl;
|
||||
if (preloaded) {
|
||||
speaker->play();
|
||||
std::cout << "speaker restored" << std::endl;
|
||||
} else {
|
||||
speaker->stop();
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ public:
|
||||
return totalSamples;
|
||||
}
|
||||
|
||||
duration_t getTotalDuration() const {
|
||||
duration_t getTotalDuration() const override {
|
||||
return static_cast<duration_t>(totalSamples) /
|
||||
static_cast<duration_t>(sampleRate);
|
||||
}
|
||||
|
||||
@ -96,43 +96,43 @@ public:
|
||||
return bytes;
|
||||
}
|
||||
|
||||
void close() {
|
||||
void close() override {
|
||||
if (!closed) {
|
||||
ov_clear(&vf);
|
||||
closed = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool isOpen() const {
|
||||
bool isOpen() const override {
|
||||
return !closed;
|
||||
}
|
||||
|
||||
size_t getTotalSamples() const {
|
||||
size_t getTotalSamples() const override {
|
||||
return totalSamples;
|
||||
}
|
||||
|
||||
duration_t getTotalDuration() const {
|
||||
duration_t getTotalDuration() const override {
|
||||
return static_cast<duration_t>(totalSamples) /
|
||||
static_cast<duration_t>(sampleRate);
|
||||
}
|
||||
|
||||
uint getChannels() const {
|
||||
uint getChannels() const override {
|
||||
return channels;
|
||||
}
|
||||
|
||||
uint getSampleRate() const {
|
||||
uint getSampleRate() const override {
|
||||
return sampleRate;
|
||||
}
|
||||
|
||||
uint getBitsPerSample() const {
|
||||
uint getBitsPerSample() const override {
|
||||
return 16;
|
||||
}
|
||||
|
||||
bool isSeekable() const {
|
||||
bool isSeekable() const override {
|
||||
return seekable;
|
||||
}
|
||||
|
||||
void seek(size_t position) {
|
||||
void seek(size_t position) override {
|
||||
if (!closed && seekable) {
|
||||
ov_raw_seek(&vf, position);
|
||||
}
|
||||
|
||||
@ -150,10 +150,10 @@ void LevelScreen::update(float delta) {
|
||||
updateHotkeys();
|
||||
}
|
||||
|
||||
auto camera = level->player->camera;
|
||||
auto camera = this->level->player->camera;
|
||||
audio::setListener(
|
||||
camera->position,
|
||||
level->player->hitbox->velocity,
|
||||
this->level->player->hitbox->velocity,
|
||||
camera->position+camera->dir,
|
||||
camera->up
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user