Migrated first MSRS missions to MOOSE_Demos

This commit is contained in:
kaltokri 2024-02-17 18:54:30 +01:00
parent 7bd1d46cf2
commit af21eee0db
8 changed files with 0 additions and 92 deletions

View File

@ -1,31 +0,0 @@
-- This demo mission will play an internal audio file.
-- This is a file which is part of the .miz file.
-- Enter the A-10CII and listen to the radio.
-- If you don't own A-10CII you have to change the mission to use another aircraft.
-- Check dcs.log if something is not working:
BASE:TraceClass("MSRS")
BASE:TraceClass("SOUNDFILE")
BASE:TraceLevel(3)
BASE:TraceOnOff( true )
FileName = "Hello-world.ogg"
FolderPath=nil -- Will use l10n/DEFAULT/ as default
Duration=nil -- Will use 3 seconds as default
UseSrs=true
InstallPathSrs=nil -- This will use the default installation path of SRS
-- If you did't install SRS into the default path uncomment and change the line below.
--InstallPathSrs = "G:\\Spiele\\DCS\\Tools\\DCS-SimpleRadio-Standalone"
local soundfile=SOUNDFILE:New(FileName, FolderPath, Duration, UseSrs)
local msrs=MSRS:New( InstallPathSrs, 251, radio.modulation.AM)
local function msg()
MESSAGE:New( "I try to play the internal sound file now!" ):ToAll():ToLog()
msrs:PlaySoundFile(soundfile)
end
-- Use a timer to delay the transmission 2 seconds after script is executeed.
-- Repeat transmission every 10 seconds.
TIMER:New( msg ):Start(2, 10)

View File

@ -1,33 +0,0 @@
-- This demo mission will play an external audio file.
-- This is a file which is not part of the .miz file.
-- Save the file Hello-world.ogg to your Missions folder,
-- e.g. C:\Users\<YourUserName>\Saved Games\DCS.openbeta\Missions
-- Enter the A-10CII and listen to the radio.
-- If you don't own A-10CII you have to change the mission to use another aircraft.
-- Check dcs.log if something is not working:
BASE:TraceClass("MSRS")
BASE:TraceClass("SOUNDFILE")
BASE:TraceLevel(3)
BASE:TraceOnOff( true )
FileName = "Hello-world.ogg"
FolderPath = lfs.writedir() .. 'Missions'
Duration=nil -- Will use 3 seconds as default
UseSrs=true
InstallPathSrs=nil -- This will use the default installation path of SRS
-- If you did't install SRS into the default path uncomment and change the line below.
--InstallPathSrs = "G:\\Spiele\\DCS\\Tools\\DCS-SimpleRadio-Standalone"
local soundfile=SOUNDFILE:New(FileName, FolderPath, Duration, UseSrs)
local msrs=MSRS:New( InstallPathSrs, 251, radio.modulation.AM)
local function msg()
MESSAGE:New( "I try to play the external sound file now!" ):ToAll():ToLog()
msrs:PlaySoundFile(soundfile)
end
-- Use a timer to delay the transmission 2 seconds after script is executeed.
-- Repeat transmission every 10 seconds.
TIMER:New( msg ):Start(2, 10)

View File

@ -1,25 +0,0 @@
-- This demo mission will play an external audio file.
-- This is a file which is not part of the .miz file.
-- Save the file Hello-world.ogg to your Missions folder,
-- e.g. C:\Users\<YourUserName>\Saved Games\DCS.openbeta\Missions
-- Enter the A-10CII and listen to the radio.
-- If you don't own A-10CII you have to change the mission to use another aircraft.
-- Check dcs.log if something is not working:
BASE:TraceClass("MSRS")
BASE:TraceLevel(3)
BASE:TraceOnOff( true )
-- Force to use SRSEXE and WINDOWS TTS, no matter what is defined in Moose_MSRS.lua
local msrs=MSRS:New()
msrs:SetBackendSRSEXE()
msrs:SetProvider(MSRS.Provider.WINDOWS)
msrs:SetFrequencies(251)
local fileName = "MSRS-003-PlayTextFile.txt"
local folderPath = lfs.writedir() .. 'Missions'
local delay = 5
-- Broadcast text after 5 seconds.
MESSAGE:New( "I try to play the external text file now!" ):ToAll():ToLog()
msrs:PlayTextFile(string.format("%s\\%s", folderPath, fileName), delay)

View File

@ -1,3 +0,0 @@
Hello World, this is the Moose simple radio text-to-speech class speaking.
I'am reading this text file.
This is insane, right?