Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
Classes/AudioDefs.h
#ifndef __AUDIODEFS__ |
#define __AUDIODEFS__ |
#if PRAGMA_STRUCT_ALIGN |
#pragma options align=mac68k |
#elif PRAGMA_STRUCT_PACKPUSH |
#pragma pack(push, 2) |
#elif PRAGMA_STRUCT_PACK |
#pragma pack(2) |
#endif |
typedef struct { |
AudioFormatAtom formatData; |
AudioEndianAtom endianData; |
AudioTerminatorAtom terminatorData; |
} AudioCompressionAtom, *AudioCompressionAtomPtr, **AudioCompressionAtomHandle; |
#if PRAGMA_STRUCT_ALIGN |
#pragma options align=reset |
#elif PRAGMA_STRUCT_PACKPUSH |
#pragma pack(pop) |
#elif PRAGMA_STRUCT_PACK |
#pragma pack() |
#endif |
#define BailErr(x) {err = x; if(err != noErr) goto bail;} |
enum {kMaxOutputBuffer = 64 * 1024}; // max size of output buffer |
typedef enum { kFirstBuffer, kSecondBuffer } eBufferNumber; |
typedef struct { |
ExtendedSoundComponentData compData; |
Handle hSource; // source media buffer |
Media sourceMedia; // sound media identifier |
TimeValue getMediaAtThisTime; |
TimeValue sourceDuration; |
UInt32 maxBufferSize; |
Boolean isThereMoreSource; |
Boolean isSourceVBR; |
} SCFillBufferData, *SCFillBufferDataPtr; |
// functions |
OSErr PlaySound(const FSSpec *inFileToPlay); |
#endif // __AUDIODEFS__ |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-07-07