/*=============================================================================
	CAAudioStreamBasicDesc.h

	$Log: CAAudioStreamBasicDesc.h,v $
	Revision 1.10  2003/04/23 22:33:13  dwyatt
	more fallout of class merge
	
	Revision 1.9  2003/04/23 22:09:04  dwyatt
	CAAudioStreamBasicDescription merged into CAStreamBasicDescription
	
	Revision 1.8  2003/04/12 01:37:22  jcm10
	add sEmpty
	
	Revision 1.7  2003/02/21 01:59:15  jcm10
	add FillOutFormat
	
	Revision 1.6  2003/01/30 22:30:59  jcm10
	add a flag to return abbreviated strings to GetSimpleName()
	
	Revision 1.5  2003/01/27 20:07:04  jcm10
	add GetSimpleName()
	
	Revision 1.4  2002/04/23 21:51:29  jcm10
	clean up things for the AudioCodec build
	
	Revision 1.3  2002/04/18 02:20:12  jcm10
	clean up the header inclusion
	
	Revision 1.2  2002/04/10 02:40:52  jcm10
	synch the MP-4 code
	
	Revision 1.3  2002/04/10 00:21:13  ealdrich
	Make it build on OS X in the QT Build System
	
	Revision 1.2  2002/03/07 04:42:08  jcm10
	names are changed to protect the innocent
	
	Revision 1.1  2002/03/07 04:12:59  jcm10
	moved here for convenience
	
	Revision 1.1  2002/03/01 01:52:40  jcm10
	moved here from ../Utility
	
	Revision 1.9  2001/07/25 21:43:04  jcm10
	Add ResetFormat()
	
	Revision 1.8  2001/07/25 20:01:24  jcm10
	make it build
	
	Revision 1.7  2001/04/06 02:58:00  jcm10
	add NormalizeLinearPCMFormat
	
	Revision 1.6  2001/04/05 01:36:43  jcm10
	clean things up
	
	Revision 1.5  2001/03/27 00:42:20  jcm10
	add PrintToLog methods and reverse the logic of the sorting operators
	
	Revision 1.4  2001/01/08 23:51:04  jcm10
	remove #pragma once, since gcc claims it to be obsolete and issues an annoying warning to that effect when all warnings are enabled
	
	Revision 1.3  2001/01/05 03:08:42  jcm10
	add more comparison operators
	
	Revision 1.2  2001/01/04 22:38:58  jcm10
	no longer needed
	
	Revision 1.1  2001/01/04 22:26:22  jcm10
	rename CAAudioStreamBasicDescription.h to CAAudioStreamBasicDesc.h
	
	Revision 1.7  2001/01/04 20:17:29  jcm10
	move most of the code to the .cp file
	
	Revision 1.6  2000/11/20 20:51:54  jcm10
	include <cstring>
	
	Revision 1.5  2000/11/20 20:12:43  jcm10
	explicitly do all the work here
	
	Revision 1.4  2000/10/16 19:21:19  jcm10
	support the mFormatFlags field
	
	Revision 1.3  2000/09/12 23:16:34  jcm10
	remove usage of OSType
	
	Revision 1.2  2000/07/21 00:25:03  jcm10
	better operator == logic
	
	Revision 1.1  2000/07/06 04:14:02  jcm10
	New IOAudio support, Phase 1
	
	Revision 0.0  2000/01/01 12:34:56  jcm10
	created
		
	$NoKeywords: $
=============================================================================*/
#if !defined(__CAAudioStreamBasicDesc_h__)
#define __CAAudioStreamBasicDesc_h__

//=============================================================================
//	Includes
//=============================================================================

#error "CAAudioStreamBasicDesc is now OBSOLETE -- replace with CAStreamBasicDescription"

#if 0
//=============================================================================
//	CAAudioStreamBasicDescription
//
//	This is a wrapper class for the AudioStreamBasicDescription struct.
//	It only adds a few convenience routines, but otherwise adds nothing
//	to the footprint of the original struct.
//=============================================================================

struct	CAAudioStreamBasicDescription
:
	public AudioStreamBasicDescription
{

//	Constants
public:
	static const AudioStreamBasicDescription	sEmpty;

//	Construction/Destruction
public:
									CAAudioStreamBasicDescription();
									CAAudioStreamBasicDescription(const AudioStreamBasicDescription& v);
									CAAudioStreamBasicDescription(	double inSampleRate,		UInt32 inFormatID,
																	UInt32 inBytesPerPacket,	UInt32 inFramesPerPacket,
																	UInt32 inBytesPerFrame,		UInt32 inChannelsPerFrame,
																	UInt32 inBitsPerChannel,	UInt32 inFormatFlags);

//	Assignment
public:
	CAAudioStreamBasicDescription&	operator=(const AudioStreamBasicDescription& v);

//	Operations
public:
	static void						NormalizeLinearPCMFormat(AudioStreamBasicDescription& ioDescription);
	static void						ResetFormat(AudioStreamBasicDescription& ioDescription);
	static void						FillOutFormat(AudioStreamBasicDescription& ioDescription, const AudioStreamBasicDescription& inTemplateDescription);
	static void						GetSimpleName(const AudioStreamBasicDescription& inDescription, char* outName, bool inAbbreviate);
#if CoreAudio_Debug
	static void						PrintToLog(const AudioStreamBasicDescription& inDesc);
#endif

};

bool		operator<(const AudioStreamBasicDescription& x, const AudioStreamBasicDescription& y);
bool		operator==(const AudioStreamBasicDescription& x, const AudioStreamBasicDescription& y);
inline bool	operator!=(const AudioStreamBasicDescription& x, const AudioStreamBasicDescription& y) { return !(x == y); }
inline bool	operator<=(const AudioStreamBasicDescription& x, const AudioStreamBasicDescription& y) { return (x < y) || (x == y); }
inline bool	operator>=(const AudioStreamBasicDescription& x, const AudioStreamBasicDescription& y) { return !(x < y); }
inline bool	operator>(const AudioStreamBasicDescription& x, const AudioStreamBasicDescription& y) { return !((x < y) || (x == y)); }
#endif // if 0

#endif
