Engine:
+ Split PlaySound into PlaySound and LoopSound
+ Added overloaded versions of PlaySound/LoopSound that won't require voicepack parameter
+ LoopSound now allows multiple copies of the same sound to play looped and returns the channel used for playback (to stop them later)
+ StopSound now allows either a specific sound (single playback) or channel (single playback as well as looped playback) to be stopped
+ SoundChannel attribute for Gears to be used when looping sounds
/*
* Copyright (C) 2008 Remko Troncon
*/
#include "CocoaInitializer.h"
#include <AppKit/AppKit.h>
#include <Cocoa/Cocoa.h>
#include <QtDebug>
class CocoaInitializer::Private
{
public:
NSAutoreleasePool* autoReleasePool_;
};
CocoaInitializer::CocoaInitializer()
{
d = new CocoaInitializer::Private();
c = new CocoaInitializer::Private();
NSApplicationLoad();
c->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
d->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
}
CocoaInitializer::~CocoaInitializer()
{
[d->autoReleasePool_ release];
[c->autoReleasePool_ release];
delete c;
delete d;
}