From 6767906755215d0fc81f174d77ed77484733fcc7 Mon Sep 17 00:00:00 2001 From: nickysn Date: Thu, 24 Sep 2015 16:21:37 +0000 Subject: [PATCH] + added the win16api sound support functions git-svn-id: trunk@31822 - --- rtl/win16/winprocsh.inc | 25 +++++++++++++++++++++++++ rtl/win16/wintypes.inc | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/rtl/win16/winprocsh.inc b/rtl/win16/winprocsh.inc index 218ab8af7f..133a683f96 100644 --- a/rtl/win16/winprocsh.inc +++ b/rtl/win16/winprocsh.inc @@ -1237,3 +1237,28 @@ function EnableHardwareInput(fEnableInput: BOOL): BOOL; external 'USER'; { Help support } function WinHelp(hwndMain: HWND; lpszHelp: LPCSTR; usCommand: UINT; ulData: DWORD): BOOL; external 'USER'; + +{ Sound support } + +function OpenSound: SmallInt; external 'SOUND'; +procedure CloseSound; external 'SOUND'; + +function StartSound: SmallInt; external 'SOUND'; +function StopSound: SmallInt; external 'SOUND'; + +function SetVoiceQueueSize(nVoice, cbQueue: SmallInt): SmallInt; external 'SOUND'; +function SetVoiceNote(voice, value, length, cdots: SmallInt): SmallInt; external 'SOUND'; +function SetVoiceAccent(nVoice, nTempo, nVolume, fnMode, nPitch: SmallInt): SmallInt; external 'SOUND'; +function SetVoiceEnvelope(nVoice, nShape, nRepeat: SmallInt): SmallInt; external 'SOUND'; +function SetVoiceSound(nVoice: SmallInt; dwFrequency: DWORD; nDuration: SmallInt): SmallInt; external 'SOUND'; + +function SetVoiceThreshold(voice, cNotesThreshold: SmallInt): SmallInt; external 'SOUND'; +function GetThresholdEvent: LPINT; external 'SOUND'; +function GetThresholdStatus: SmallInt; external 'SOUND'; + +function SetSoundNoise(fnSource, nDuration: SmallInt): SmallInt; external 'SOUND'; + +function WaitSoundState(fnState: SmallInt): SmallInt; external 'SOUND'; + +function SyncAllVoices: SmallInt; external 'SOUND'; +function CountVoiceNotes(nvoice: SmallInt): SmallInt; external 'SOUND'; diff --git a/rtl/win16/wintypes.inc b/rtl/win16/wintypes.inc index 7924d980c9..80c39b3aa9 100644 --- a/rtl/win16/wintypes.inc +++ b/rtl/win16/wintypes.inc @@ -2726,3 +2726,44 @@ type rgchMember: array [0..1] of char; end; THelpWinInfo = HELPWININFO; + +{ Sound support } + +const +{ SetSoundNoise() Sources } + S_PERIOD512 = 0; + S_PERIOD1024 = 1; + S_PERIOD2048 = 2; + S_PERIODVOICE = 3; + S_WHITE512 = 4; + S_WHITE1024 = 5; + S_WHITE2048 = 6; + S_WHITEVOICE = 7; + +{ WaitSoundState() constants } + S_QUEUEEMPTY = 0; + S_THRESHOLD = 1; + S_ALLTHRESHOLD = 2; + +{ Accent Modes } + S_NORMAL = 0; + S_LEGATO = 1; + S_STACCATO = 2; + +{ Error return values } + S_SERDVNA = (-1); + S_SEROFM = (-2); + S_SERMACT = (-3); + S_SERQFUL = (-4); + S_SERBDNT = (-5); + S_SERDLN = (-6); + S_SERDCC = (-7); + S_SERDTP = (-8); + S_SERDVL = (-9); + S_SERDMD = (-10); + S_SERDSH = (-11); + S_SERDPT = (-12); + S_SERDFQ = (-13); + S_SERDDR = (-14); + S_SERDSR = (-15); + S_SERDST = (-16);