OSDN Git Service

Headerの書き込みです
authoryamat0jp <yamat0jp@yahoo.co.jp>
Fri, 11 May 2018 09:31:06 +0000 (18:31 +0900)
committeryamat0jp <yamat0jp@yahoo.co.jp>
Fri, 11 May 2018 09:31:06 +0000 (18:31 +0900)
WAVEがありませんになります

WriteHeader.pas
spWav.pas
spWave.pas [deleted file]
wav_proj.dproj

index cf7cff5..d05a6e2 100644 (file)
@@ -5,13 +5,13 @@ interface
 uses System.Classes;
 
 {$INCLUDE spWav}
-function waveHeaderWrite(fp: TFileStream; sizeOfData: LongInt; ch: Word;
-  sampRate: LongWord; sampBits: Word): LongInt;
+function waveHeaderWrite(fp: TFileStream; sizeOfData: LongInt; ch: Byte;
+  sampRate: LongWord; sampBits: Byte): integer;
 
 implementation
 
-function waveHeaderWrite(fp: TFileStream; sizeOfData: LongInt; ch: Word;
-  sampRate: LongWord; sampBits: Word): LongInt;
+function waveHeaderWrite(fp: TFileStream; sizeOfData: LongInt; ch: Byte;
+  sampRate: LongWord; sampBits: Byte): integer;
 var
   bytes: Word;
   wrWavHdr: WrSWaveFileHeader;
index 1a935b6..aad89bf 100644 (file)
--- a/spWav.pas
+++ b/spWav.pas
@@ -12,23 +12,23 @@ type
   end;
 
   tWaveFormatPcm = record
-    formatTag: Word;
-    channels: Word;
-    sampleParSec: LongInt;
-    bytesPerSec: LongInt;
-    blockAlign: Word;
-    bitsPerSample: Word;
+    formatTag: Byte;
+    channels: Byte;
+    sampleParSec: LongWord;
+    bytesPerSec: LongWord;
+    blockAlign: Byte;
+    bitsPerSample: Byte;
   end;
 
   WrSWaveFileHeader = record
     hdrRiff: array [0..3] of AnsiChar;
-    sizeOfFile: LongInt;
+    sizeOfFile: LongWord;
     stWaveFormat: tWaveFormatPCM;
     hdrWave: array [0..3] of AnsiChar;
     hdrFmt: array [0..3] of AnsiChar;
-    sizeOfFmt: LongInt;
+    sizeOfFmt: LongWord;
     hdrData: array [0..3] of AnsiChar;
-    sizeOfData: LongInt;
+    sizeOfData: LongWord;
   end;
 
 const
diff --git a/spWave.pas b/spWave.pas
deleted file mode 100644 (file)
index 823e734..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-
-type
-  SWaveFileHeader = record
-    hdrRiff: array [0 .. 3] of AnsiChar;
-    sizeOfFile: Cardinal;
-    hdrWave: array [0 .. 3] of AnsiChar;
-  end;
-
-  tChank = record
-    hdrFmtData: array [0 .. 3] of AnsiChar;
-    sizeOfFmtData: LongWord;
-  end;
-
-  tWaveFormatPcm = record
-    formatTag: Word;
-    channels: Word;
-    samplePerSec: LongWord;
-    bytesPerSec: LongWord;
-    blockAlign: Word;
-    bitsPerSample: Word;
-  end;
-
-const
-  STR_RIFF = 'RIFF';
-  STR_WAVE = 'WAVE';
-  STR_fmt = 'fmt ';
-  STR_DATA = 'data';
-  _MAX_PATH = 255;
\ No newline at end of file
index 4f5b9c2..afa486b 100644 (file)
         <DCC_RemoteDebug>true</DCC_RemoteDebug>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
-        <Debugger_RunParams>easy.wav effect.wav</Debugger_RunParams>
+        <Debugger_RunParams>toujyo.wav effect.wavu</Debugger_RunParams>
         <DCC_RemoteDebug>false</DCC_RemoteDebug>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">