Comments (4)
It looks like it could potentially just be the wrong variable being used there. Let me explain. According to the OpenALStream constructor, the mSource value will be set to 0: https://github.com/afritz1/OpenTESArena/blob/master/OpenTESArena/src/Media/AudioManager.cpp#L406
Cool, but the reason I say there might be wrong values in use here is the init itself using mSource:
https://github.com/afritz1/OpenTESArena/blob/master/OpenTESArena/src/Media/AudioManager.cpp#L477
Why? It appears maybe it wants to assert(source != 0) because we're initializing mSource with the source value input to ::init: https://github.com/afritz1/OpenTESArena/blob/master/OpenTESArena/src/Media/AudioManager.cpp#L510
Which makes sense as to why mSource might not be initialized (well, why it might be 0).
from opentesarena.
I have a feeling it should say assert(source != 0)
. @kcat?
@Ragora, I think you should use the link of the actual commit instead of using master. It would go out of date if master was updated, right?
from opentesarena.
Also ::reset will pretty much just reinitialize the unique_ptr with a new pointer value, destroying the old one if there is a non-NULL value stored: http://en.cppreference.com/w/cpp/memory/unique_ptr/reset
from opentesarena.
I have a feeling it should say assert(source != 0).
Actually that should've been assert(mSource == 0);
to ensure the init
method isn't being called again. The source
parameter is valid, there's no way it can be called with 0 (if it is, there's more serious issues to worry about). I'll get a fix for that shortly.
Really annoying that cmake's RelWithDebInfo build type disables assertions, even though debug info is supposed to remain. I would've caught it earlier.
from opentesarena.
Related Issues (20)
- Mountains are floating HOT 6
- Rename default branch from master to main HOT 6
- Improving first-time contributor experience on Windows HOT 1
- Software renderer redesign for 0.15.0 HOT 6
- A Question about the capablities of OpenTESAreana HOT 1
- Is this still being worked on? HOT 2
- [Future Enhancement] Fan translations support (and improved .EXE unpacking) HOT 11
- Hit Chance Calculation. Clarification/Verification requested for wiki HOT 1
- Is external MIDI supported? HOT 1
- Switch to GitHub Actions HOT 4
- C++20 HOT 3
- Change Travis CI badge in Readme to GitHub Actions HOT 2
- Change ArenaPath to ArenaPaths HOT 8
- Mysterious performance hiccup every ~3 seconds HOT 1
- Job system
- Very slow performance HOT 5
- -march=native not supported on Apple M1 HOT 2
- Game world palette documentation HOT 11
- Triangle clipping improvement HOT 1
- Revise Readme to prioritize obtaining game files from Steam HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opentesarena.