Minifixes
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ TApp* TApp::Instance() {
|
|||||||
TApp::TApp() {
|
TApp::TApp() {
|
||||||
FileManager_ = std::make_unique<TFileManager>("Data", "data.pak");
|
FileManager_ = std::make_unique<TFileManager>("Data", "data.pak");
|
||||||
SurfaceManager_ = std::make_unique<TSurfaceManager>(*FileManager_);
|
SurfaceManager_ = std::make_unique<TSurfaceManager>(*FileManager_);
|
||||||
RenderManager_ = std::make_unique<TRenderManager>(*SurfaceManager_, 320, 240, "SDL Game");
|
RenderManager_ = std::make_unique<TRenderManager>(*SurfaceManager_, 320, 240, "EULAMadness");
|
||||||
SpriteManager_ = std::make_unique<TSpriteManager>(*FileManager_, *RenderManager_);
|
SpriteManager_ = std::make_unique<TSpriteManager>(*FileManager_, *RenderManager_);
|
||||||
EntityManager_ = std::make_unique<TEntityManager>(*RenderManager_, 1000 / 60);
|
EntityManager_ = std::make_unique<TEntityManager>(*RenderManager_, 1000 / 60);
|
||||||
FontManager_ = std::make_unique<TFontManager>(*SpriteManager_);
|
FontManager_ = std::make_unique<TFontManager>(*SpriteManager_);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ TAudioManager::TAudioManager(TFileManager& fileManager)
|
|||||||
desired.freq = 44100;
|
desired.freq = 44100;
|
||||||
desired.format = AUDIO_F32;
|
desired.format = AUDIO_F32;
|
||||||
desired.channels = 2;
|
desired.channels = 2;
|
||||||
desired.samples = 4096;
|
desired.samples = 1024;
|
||||||
desired.callback = NULL;
|
desired.callback = NULL;
|
||||||
|
|
||||||
Device_ = SDL_OpenAudioDevice(NULL, 0, &desired, NULL, 0);
|
Device_ = SDL_OpenAudioDevice(NULL, 0, &desired, NULL, 0);
|
||||||
@@ -35,7 +35,7 @@ void TAudioManager::Run() {
|
|||||||
std::uint32_t currentTick = SDL_GetTicks();
|
std::uint32_t currentTick = SDL_GetTicks();
|
||||||
|
|
||||||
Paint(Stream_, currentTick - LastTick_);
|
Paint(Stream_, currentTick - LastTick_);
|
||||||
if (SDL_GetQueuedAudioSize(Device_) < 8192) {
|
if (SDL_GetQueuedAudioSize(Device_) < 2048) {
|
||||||
const int bytesRemaining = SDL_AudioStreamAvailable(Stream_);
|
const int bytesRemaining = SDL_AudioStreamAvailable(Stream_);
|
||||||
if (bytesRemaining > 0) {
|
if (bytesRemaining > 0) {
|
||||||
const int samplesRemaining = SDL_min(bytesRemaining, 32 * 1024);
|
const int samplesRemaining = SDL_min(bytesRemaining, 32 * 1024);
|
||||||
|
|||||||
Reference in New Issue
Block a user