
/*
  File: include/sq2_audiosys/Interface_GenericOutput.h
  Description: Interface to the Sonique 2 output miniport plugin
  Part of the Mantis project
  (c) 2002 Lycos Inc.

  This file is distributed for the sole purpose of allowing you to write
  software to interface with Sonique 2 and other Mantis programs. It is
  not to be modified or used for any other purpose without written
  authorization.

  If you redistribute this file, it must be in the original package
  complete with all other files provided, including the usage agreement.

  Do not remove this notice.
*/

#ifndef _INTERFACE_GENERICOUTPUT_H_
#define _INTERFACE_GENERICOUTPUT_H_

#include "Interface_MediaSystem.h"

// {3AF113CC-172A-4079-90E6-4232D69148D1}
DEFINE_MID(GFID_MEDIAOUTPUTMINIPORT, 0x3af113cc, 0x172a, 0x4079, 0x90, 0xe6, 0x42, 0x32, 0xd6, 0x91, 0x48, 0xd1);

class MMediaOutputMiniport;
class MMediaGenericOutput : public MMediaFilter
{
  public:
	virtual void    __stdcall SetMiniPort( MMediaOutputMiniport* pMiniport ) = 0;
};

class MMediaOutputMiniport : public MMediaSettings
{
  public:
	virtual MRESULT __stdcall CanHandleFormat(const MMediaFormat* pFormat) = 0;
	virtual int32   __stdcall GetFormatMerit(const MMediaFormat* pFormat) = 0;
	virtual bool    __stdcall WriteBlocks() const = 0;
	virtual bool    __stdcall Initialize(MMediaChain* pChain, const MMediaFormat* pFormat, double lfBufferTime) = 0;
	virtual void    __stdcall Deinitialize() = 0;
	virtual bool    __stdcall NotCurrentFormat(const MMediaFormat* pFormat) = 0;
	virtual bool    __stdcall SetFormat(const MMediaFormat* pFormat) = 0;
	virtual int32	__stdcall GetNumChannels() = 0;
	virtual int32	__stdcall GetSampleRate() = 0;
	virtual int32	__stdcall GetBytesPerSecond() = 0;
	virtual uint32  __stdcall GetCurrentBufferSize() = 0;
	virtual bool    __stdcall Play() = 0;
	virtual bool    __stdcall Stop() = 0;
	virtual bool    __stdcall Flush() = 0;
	virtual bool    __stdcall PlayRemainingDataAndStop(SignalObject* pAbortSignal) = 0;
	virtual uint32  __stdcall GetBytesFree() = 0;
	virtual bool    __stdcall SetVolume(double lfVolume) = 0;
	virtual bool    __stdcall SetPan(double lfPan) = 0;
	virtual bool    __stdcall WriteBuffer( const char* pData, uint32 Bytes, MPacket* pSourcePacket ) = 0;
    virtual ThreadObjectPriority __stdcall GetThreadPriority(bool bBoost) = 0;
};

#endif//_INTERFACE_GENERICOUTPUT_H_
