Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

Multidevice ASIO output plugin for WinAMP

, 13 Feb 2009 CDDL
A tiny WinAMP output DLL that uses a C++ replacement of the official ASIO SDK that supports multiple ASIO devices.
#pragma once

#include "stdafx.h"

#ifdef TINY_ATL

    #undef __STDC_WANT_SECURE_LIB__
    #undef __STDC_SECURE_LIB__

    //  Ugly hacks to disable SEH and synchronization (since WTL does not
    // provide a cleaner way) which are not needed for the simple usage that
    // TINY_ATL is meant for.
    #define __try
    #define __except( x ) if (0)
    #define __finally
    #define RaiseException( dwExceptionCode, dwExceptionFlags, nNumberOfArguments, lpArguments ) dwExceptionFlags; nNumberOfArguments; lpArguments; ::exit( dwExceptionCode )
    #define EnterCriticalSection(      pCS ) CRITICAL_SECTION; pCS;
    #define InitializeCriticalSection( pCS ) CRITICAL_SECTION; pCS;
    #define LeaveCriticalSection(      pCS ) CRITICAL_SECTION; pCS;
    #define DeleteCriticalSection(     pCS ) CRITICAL_SECTION; pCS;

    // atlapp.h: #error WTL requires that _ATL_NO_COMMODULE is not defined
    //#define _ATL_NO_COMMODULE

    #define _ATL_MIN_CRT    // WTL still seems to use/allow it.

    #define ATLENSURE ATLVERIFY

    #define AtlThrow exit

#endif

#include <atlbase.h>
#include <atlapp.h>

#include <atlwin.h>

#include <atlcrack.h>
#include <atlctrls.h>
#include <atldlgs.h>
#include <atlframe.h>
#include <atlmisc.h>

#ifdef TINY_ATL

    // TINY_ATL hacks cleanup.
    #undef __try
    #undef __except
    #undef __finally
    #undef RaiseException
    #undef EnterCriticalSection
    #undef InitializeCriticalSection
    #undef LeaveCriticalSection
    #undef DeleteCriticalSection

#endif

namespace WTL
{
bool Initialize( HINSTANCE, DWORD commonControlFlags = 0, CMessageLoop * pDefaultMessageLoop = 0 );
void Uninitialize();

CMessageLoop & DefaultMessageLoop();
}


bool InitializeCOM( DWORD comInitializationFlags );

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Common Development and Distribution License (CDDL)

Share

About the Author

Domagoj Šarić
Software Developer Little Endian Ltd.
Croatia Croatia
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150327.1 | Last Updated 13 Feb 2009
Article Copyright 2009 by Domagoj Šarić
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid