mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
Merge pull request #902 from ey6es/master
Fix for crash on shutdown: we need to clean up the audio bits before destroying the menu.
This commit is contained in:
commit
2897765828
3 changed files with 6 additions and 3 deletions
|
@ -238,8 +238,10 @@ Application::~Application() {
|
|||
|
||||
_sharedVoxelSystem.changeTree(new VoxelTree);
|
||||
|
||||
delete Menu::getInstance();
|
||||
_audio.shutdown();
|
||||
|
||||
delete Menu::getInstance();
|
||||
|
||||
delete _oculusProgram;
|
||||
delete _settings;
|
||||
delete _networkAccessManager;
|
||||
|
|
|
@ -448,7 +448,7 @@ Audio::Audio(Oscilloscope* scope, int16_t initialJitterBufferSamples) :
|
|||
gettimeofday(&_lastReceiveTime, NULL);
|
||||
}
|
||||
|
||||
Audio::~Audio() {
|
||||
void Audio::shutdown() {
|
||||
if (_stream) {
|
||||
outputPortAudioError(Pa_CloseStream(_stream));
|
||||
outputPortAudioError(Pa_Terminate());
|
||||
|
|
|
@ -33,7 +33,8 @@ class Audio : public QObject {
|
|||
public:
|
||||
// initializes audio I/O
|
||||
Audio(Oscilloscope* scope, int16_t initialJitterBufferSamples);
|
||||
~Audio();
|
||||
|
||||
void shutdown();
|
||||
|
||||
void reset();
|
||||
void render(int screenWidth, int screenHeight);
|
||||
|
|
Loading…
Reference in a new issue