]> gitweb @ CieloNegro.org - bindings-CarbonCore.git/commitdiff
AIFF.h
authorPHO <pho@cielonegro.org>
Fri, 8 Oct 2010 17:19:01 +0000 (02:19 +0900)
committerPHO <pho@cielonegro.org>
Fri, 8 Oct 2010 17:19:01 +0000 (02:19 +0900)
Bindings/CoreServices/CarbonCore/AIFF.hsc [new file with mode: 0644]
Bindings/CoreServices/CarbonCore/MacTypes.hsc
bindings-carbon-core.cabal
cbits/helper_aiff.c [new file with mode: 0644]

diff --git a/Bindings/CoreServices/CarbonCore/AIFF.hsc b/Bindings/CoreServices/CarbonCore/AIFF.hsc
new file mode 100644 (file)
index 0000000..2d4d397
--- /dev/null
@@ -0,0 +1,171 @@
+#include <bindings.dsl.h>
+#include <CoreServices/CoreServices.h>
+
+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          , <UInt32>
+#synonym_t MarkerIdType, <SInt16>
+
+#starttype struct ChunkHeader
+#  field ckID  , <ID>
+#  field ckSize, <SInt16>
+#stoptype
+
+#starttype struct ContainerChunk
+#  field ckID    , <ID>
+#  field ckSize  , <SInt32>
+#  field formType, <ID>
+#stoptype
+
+#starttype struct FormatVersionChunk
+#  field ckID     , <ID>
+#  field ckSize   , <SInt32>
+#  field timestamp, <UInt32>
+#stoptype
+#synonym_t FormatVersionChunkPtr, Ptr <FormatVersionChunk>
+
+#starttype struct CommonChunk
+#  field ckID           , <ID>
+#  field ckSize         , <SInt32>
+#  field numChannels    , <SInt16>
+#  field numSampleFrames, <UInt32>
+#  field sampleSize     , <SInt16>
+#  field sampleRate     , <extended80>
+#stoptype
+#synonym_t CommonChunkPtr, Ptr <CommonChunk>
+
+#starttype struct ExtCommonChunk
+#  field ckID           , <ID>
+#  field ckSize         , <SInt32>
+#  field numChannels    , <SInt16>
+#  field numSampleFrames, <UInt32>
+#  field sampleSize     , <SInt16>
+#  field sampleRate     , <extended80>
+#  field compressionType, <ID>
+#  flexible_array_member compressionName, CChar
+#stoptype
+#synonym_t ExtCommonChunkPtr, Ptr <ExtCommonChunk>
+
+#starttype struct SoundDataChunk
+#  field ckID     , <ID>
+#  field ckSize   , <SInt32>
+#  field offset   , <UInt32>
+#  field blockSize, <UInt32>
+#stoptype
+#synonym_t SoundDataChunkPtr, Ptr <SoundDataChunk>
+
+#starttype struct Marker
+#  field id        , <MarkerIdType>
+#  field position  , <UInt32>
+#  field markerName, <Str255>
+#stoptype
+
+#starttype struct MarkerChunk
+#  field ckID      , <ID>
+#  field ckSize    , <SInt32>
+#  field numMarkers, <UInt16>
+#  flexible_array_member Markers, <Marker>
+#stoptype
+#synonym_t MarkerChunkPtr, Ptr <MarkerChunk>
+
+#starttype struct AIFFLoop
+#  field playMode , <SInt16>
+#  field beginLoop, <MarkerIdType>
+#  field endLoop  , <MarkerIdType>
+#stoptype
+
+#starttype struct InstrumentChunk
+#  field ckID         , <ID>
+#  field ckSize       , <SInt32>
+#  field baseFrequency, <UInt8>
+#  field detune       , <UInt8>
+#  field lowFrequency , <UInt8>
+#  field highFrequency, <UInt8>
+#  field lowVelocity  , <UInt8>
+#  field highVelocity , <UInt8>
+#  field gain         , <SInt16>
+#  field sustainLoop  , <AIFFLoop>
+#  field releaseLoop  , <AIFFLoop>
+#stoptype
+#synonym_t InstrumentChunkPtr, Ptr <InstrumentChunk>
+
+#starttype struct MIDIDataChunk
+#  field ckID  , <ID>
+#  field ckSize, <SInt32>
+#  flexible_array_member MIDIdata, <UInt8>
+#stoptype
+#synonym_t MIDIDataChunkPtr, Ptr <MIDIDataChunk>
+
+#starttype struct AudioRecordingChunk
+#  field ckID  , <ID>
+#  field ckSize, <SInt32>
+#  array_field AESChannelStatus, <UInt8>
+#stoptype
+#synonym_t AudioRecordingChunkPtr, Ptr <AudioRecordingChunk>
+
+#starttype struct ApplicationSpecificChunk
+#  field ckID  , <ID>
+#  field ckSize, <SInt32>
+#  field applicationSignature, <OSType>
+#  flexible_array_member data, <UInt8>
+#stoptype
+#synonym_t ApplicationSpecificChunkPtr, Ptr <ApplicationSpecificChunk>
+
+#starttype struct Comment
+#  field timeStamp, <UInt32>
+#  field marker   , <MarkerIdType>
+#  field count    , <UInt16>
+#  flexible_array_member text, CChar
+#stoptype
+
+#starttype struct CommentsChunk
+#  field ckID  , <ID>
+#  field ckSize, <SInt32>
+#  field numComments, <UInt16>
+#  flexible_array_member comments, <Comment>
+#stoptype
+#synonym_t CommentsChunkPtr, Ptr <CommentsChunk>
+
+#starttype struct TextChunk
+#  field ckID  , <ID>
+#  field ckSize, <SInt32>
+#  flexible_array_member text, CChar
+#stoptype
+#synonym_t TextChunkPtr, Ptr <TextChunk>
index 109cef23dd838325f44ad683b853257a7c92d8e4..41b21b8be3f2f41846e59b21ea6b82d024b3695b 100644 (file)
@@ -1,5 +1,5 @@
 #include <bindings.dsl.h>
-#include <CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h>
+#include <CoreServices/CoreServices.h>
 
 module Bindings.CoreServices.CarbonCore.MacTypes where
 #strict_import
index 2ad84abc8d12fe5e60239f39d6f9bd6a11f539e3..e9ed6e364948fe4047c4dd5a8573a4cd2f21b57d 100644 (file)
@@ -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 (file)
index 0000000..23fc49a
--- /dev/null
@@ -0,0 +1,8 @@
+#include <bindings.cmacros.h>
+#include <CoreServices/CoreServices.h>
+
+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)