From b2805409566af00bc15639494f5a186fbd2f16e6 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Fri, 9 Dec 2011 20:15:42 +0000 Subject: More indenting changes --- nGenEx/SoundCard.cpp | 80 ++++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'nGenEx/SoundCard.cpp') diff --git a/nGenEx/SoundCard.cpp b/nGenEx/SoundCard.cpp index 98e9f20..582b27b 100644 --- a/nGenEx/SoundCard.cpp +++ b/nGenEx/SoundCard.cpp @@ -1,15 +1,15 @@ /* Project nGenEx - Destroyer Studios LLC - Copyright © 1997-2004. All Rights Reserved. + Destroyer Studios LLC + Copyright © 1997-2004. All Rights Reserved. - SUBSYSTEM: nGenEx.lib - FILE: SoundCard.cpp - AUTHOR: John DiCamillo + SUBSYSTEM: nGenEx.lib + FILE: SoundCard.cpp + AUTHOR: John DiCamillo - OVERVIEW - ======== - Abstract sound card class + OVERVIEW + ======== + Abstract sound card class */ #include "MemDebug.h" @@ -23,37 +23,37 @@ DWORD WINAPI SoundCardUpdateProc(LPVOID link); // +--------------------------------------------------------------------+ SoundCard::SoundCard() - : status(SC_UNINITIALIZED), hthread(0), shutdown(false) +: status(SC_UNINITIALIZED), hthread(0), shutdown(false) { - DWORD thread_id = 0; - hthread = CreateThread(0, 4096, SoundCardUpdateProc, - (LPVOID) this, 0, &thread_id); + DWORD thread_id = 0; + hthread = CreateThread(0, 4096, SoundCardUpdateProc, + (LPVOID) this, 0, &thread_id); } // +--------------------------------------------------------------------+ SoundCard::~SoundCard() { - shutdown = true; + shutdown = true; - WaitForSingleObject(hthread, 500); - CloseHandle(hthread); - hthread = 0; + WaitForSingleObject(hthread, 500); + CloseHandle(hthread); + hthread = 0; - sounds.destroy(); - status = SC_UNINITIALIZED; + sounds.destroy(); + status = SC_UNINITIALIZED; } // +--------------------------------------------------------------------+ DWORD WINAPI SoundCardUpdateProc(LPVOID link) { - SoundCard* card = (SoundCard*) link; + SoundCard* card = (SoundCard*) link; - if (card) - return card->UpdateThread(); + if (card) + return card->UpdateThread(); - return (DWORD) E_POINTER; + return (DWORD) E_POINTER; } // +--------------------------------------------------------------------+ @@ -61,12 +61,12 @@ DWORD WINAPI SoundCardUpdateProc(LPVOID link) DWORD SoundCard::UpdateThread() { - while (!shutdown) { - Update(); - Sleep(50); - } + while (!shutdown) { + Update(); + Sleep(50); + } - return 0; + return 0; } // +--------------------------------------------------------------------+ @@ -74,20 +74,20 @@ SoundCard::UpdateThread() void SoundCard::Update() { - AutoThreadSync a(sync); + AutoThreadSync a(sync); - ListIter iter = sounds; - while (++iter) { - Sound* s = iter.value(); + ListIter iter = sounds; + while (++iter) { + Sound* s = iter.value(); - s->Update(); + s->Update(); - if (s->GetStatus() == Sound::DONE && - !(s->GetFlags() & Sound::LOCKED)) { + if (s->GetStatus() == Sound::DONE && + !(s->GetFlags() & Sound::LOCKED)) { - delete iter.removeItem(); - } - } + delete iter.removeItem(); + } + } } // +--------------------------------------------------------------------+ @@ -95,9 +95,9 @@ SoundCard::Update() void SoundCard::AddSound(Sound* s) { - AutoThreadSync a(sync); + AutoThreadSync a(sync); - if (!sounds.contains(s)) - sounds.append(s); + if (!sounds.contains(s)) + sounds.append(s); } -- cgit v1.1