1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-06 05:07:48 +02:00

#15 tabs & includes fix

This commit is contained in:
XProger
2016-11-03 22:11:03 +03:00
parent 595780f6fd
commit eb37622b15
2 changed files with 60 additions and 59 deletions

View File

@@ -13,6 +13,7 @@
#include <GL/glext.h> #include <GL/glext.h>
#elif __APPLE__ #elif __APPLE__
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>
#include <AudioToolbox/AudioQueue.h>
#include <OpenGL/OpenGL.h> #include <OpenGL/OpenGL.h>
#include <OpenGL/gl.h> #include <OpenGL/gl.h>
#include <OpenGL/glext.h> #include <OpenGL/glext.h>

View File

@@ -1,12 +1,10 @@
#include "game.h" #include "game.h"
#include <Carbon/Carbon.h>
#include <AudioToolbox/AudioQueue.h>
bool isQuit = false; bool isQuit = false;
WindowRef window; WindowRef window;
AGLContext context; AGLContext context;
#define SND_SIZE 8192 // можно и 4096, что в 2 раза сократит latency, но в симуляторе будут слышны щелчки #define SND_SIZE 8192
static AudioQueueRef audioQueue; static AudioQueueRef audioQueue;
@@ -16,6 +14,7 @@ void soundFill(void* inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffe
Sound::fill((Sound::Frame*)frames, count); Sound::fill((Sound::Frame*)frames, count);
inBuffer->mAudioDataByteSize = count * 4; inBuffer->mAudioDataByteSize = count * 4;
AudioQueueEnqueueBuffer(audioQueue, inBuffer, 0, NULL); AudioQueueEnqueueBuffer(audioQueue, inBuffer, 0, NULL);
// TODO: mutex
} }
void soundInit() { void soundInit() {
@@ -228,6 +227,7 @@ int main() {
Game::free(); Game::free();
delete[] contentPath; delete[] contentPath;
// TODO: sndFree
aglSetCurrentContext(NULL); aglSetCurrentContext(NULL);
ReleaseWindow(window); ReleaseWindow(window);