1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-05 20:57:46 +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>
#elif __APPLE__
#include <Carbon/Carbon.h>
#include <AudioToolbox/AudioQueue.h>
#include <OpenGL/OpenGL.h>
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>

View File

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