From 7d33f7f3b195174fbb2dc5bb42e3baf2cb133219 Mon Sep 17 00:00:00 2001 From: PHO Date: Sat, 9 Oct 2010 02:19:01 +0900 Subject: [PATCH] AIFF.h --- Bindings/CoreServices/CarbonCore/AIFF.hsc | 171 ++++++++++++++++++ Bindings/CoreServices/CarbonCore/MacTypes.hsc | 2 +- bindings-carbon-core.cabal | 5 + cbits/helper_aiff.c | 8 + 4 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 Bindings/CoreServices/CarbonCore/AIFF.hsc create mode 100644 cbits/helper_aiff.c diff --git a/Bindings/CoreServices/CarbonCore/AIFF.hsc b/Bindings/CoreServices/CarbonCore/AIFF.hsc new file mode 100644 index 0000000..2d4d397 --- /dev/null +++ b/Bindings/CoreServices/CarbonCore/AIFF.hsc @@ -0,0 +1,171 @@ +#include +#include + +module Bindings.CoreServices.CarbonCore.AIFF where +#strict_import +import Bindings.CoreServices.CarbonCore.MacTypes + +#num AIFFID +#num AIFCID +#num FormatVersionID +#num CommonID +#num FORMID +#num SoundDataID +#num MarkerID +#num InstrumentID +#num MIDIDataID +#num AudioRecordingID +#num ApplicationSpecificID +#num CommentID +#num NameID +#num AuthorID +#num CopyrightID +#num AnnotationID + +#num NoLooping +#num ForwardLooping +#num ForwardBackwardLooping + +#num AIFCVersion1 + +#globalarray NoneName , CUChar +#globalarray ACE2to1Name , CUChar +#globalarray ACE8to3Name , CUChar +#globalarray MACE3to1Name, CUChar +#globalarray MACE6to1Name, CUChar + +#num NoneType +#num ACE2Type +#num ACE8Type +#num MACE3Type +#num MACE6Type + +#synonym_t ID , +#synonym_t MarkerIdType, + +#starttype struct ChunkHeader +# field ckID , +# field ckSize, +#stoptype + +#starttype struct ContainerChunk +# field ckID , +# field ckSize , +# field formType, +#stoptype + +#starttype struct FormatVersionChunk +# field ckID , +# field ckSize , +# field timestamp, +#stoptype +#synonym_t FormatVersionChunkPtr, Ptr + +#starttype struct CommonChunk +# field ckID , +# field ckSize , +# field numChannels , +# field numSampleFrames, +# field sampleSize , +# field sampleRate , +#stoptype +#synonym_t CommonChunkPtr, Ptr + +#starttype struct ExtCommonChunk +# field ckID , +# field ckSize , +# field numChannels , +# field numSampleFrames, +# field sampleSize , +# field sampleRate , +# field compressionType, +# flexible_array_member compressionName, CChar +#stoptype +#synonym_t ExtCommonChunkPtr, Ptr + +#starttype struct SoundDataChunk +# field ckID , +# field ckSize , +# field offset , +# field blockSize, +#stoptype +#synonym_t SoundDataChunkPtr, Ptr + +#starttype struct Marker +# field id , +# field position , +# field markerName, +#stoptype + +#starttype struct MarkerChunk +# field ckID , +# field ckSize , +# field numMarkers, +# flexible_array_member Markers, +#stoptype +#synonym_t MarkerChunkPtr, Ptr + +#starttype struct AIFFLoop +# field playMode , +# field beginLoop, +# field endLoop , +#stoptype + +#starttype struct InstrumentChunk +# field ckID , +# field ckSize , +# field baseFrequency, +# field detune , +# field lowFrequency , +# field highFrequency, +# field lowVelocity , +# field highVelocity , +# field gain , +# field sustainLoop , +# field releaseLoop , +#stoptype +#synonym_t InstrumentChunkPtr, Ptr + +#starttype struct MIDIDataChunk +# field ckID , +# field ckSize, +# flexible_array_member MIDIdata, +#stoptype +#synonym_t MIDIDataChunkPtr, Ptr + +#starttype struct AudioRecordingChunk +# field ckID , +# field ckSize, +# array_field AESChannelStatus, +#stoptype +#synonym_t AudioRecordingChunkPtr, Ptr + +#starttype struct ApplicationSpecificChunk +# field ckID , +# field ckSize, +# field applicationSignature, +# flexible_array_member data, +#stoptype +#synonym_t ApplicationSpecificChunkPtr, Ptr + +#starttype struct Comment +# field timeStamp, +# field marker , +# field count , +# flexible_array_member text, CChar +#stoptype + +#starttype struct CommentsChunk +# field ckID , +# field ckSize, +# field numComments, +# flexible_array_member comments, +#stoptype +#synonym_t CommentsChunkPtr, Ptr + +#starttype struct TextChunk +# field ckID , +# field ckSize, +# flexible_array_member text, CChar +#stoptype +#synonym_t TextChunkPtr, Ptr diff --git a/Bindings/CoreServices/CarbonCore/MacTypes.hsc b/Bindings/CoreServices/CarbonCore/MacTypes.hsc index 109cef2..41b21b8 100644 --- a/Bindings/CoreServices/CarbonCore/MacTypes.hsc +++ b/Bindings/CoreServices/CarbonCore/MacTypes.hsc @@ -1,5 +1,5 @@ #include -#include +#include module Bindings.CoreServices.CarbonCore.MacTypes where #strict_import diff --git a/bindings-carbon-core.cabal b/bindings-carbon-core.cabal index 2ad84ab..e9ed6e3 100644 --- a/bindings-carbon-core.cabal +++ b/bindings-carbon-core.cabal @@ -29,10 +29,15 @@ Library CoreServices Exposed-Modules: + Bindings.CoreServices.CarbonCore.AIFF Bindings.CoreServices.CarbonCore.MacTypes C-Sources: + cbits/helper_aiff.c cbits/helper_mactypes.c + CC-Options: + -fpascal-strings + Extensions: ForeignFunctionInterface diff --git a/cbits/helper_aiff.c b/cbits/helper_aiff.c new file mode 100644 index 0000000..23fc49a --- /dev/null +++ b/cbits/helper_aiff.c @@ -0,0 +1,8 @@ +#include +#include + +BC_GLOBALARRAY(NoneName , unsigned char) +BC_GLOBALARRAY(ACE2to1Name , unsigned char) +BC_GLOBALARRAY(ACE8to3Name , unsigned char) +BC_GLOBALARRAY(MACE3to1Name, unsigned char) +BC_GLOBALARRAY(MACE6to1Name, unsigned char) -- 2.40.0