mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
sound
This commit is contained in:
@@ -361,6 +361,7 @@ end
|
||||
-- @param #RADIOQUEUE self
|
||||
-- @param #RADIOQUEUE.Transmission transmission The transmission.
|
||||
function RADIOQUEUE:Broadcast(transmission)
|
||||
self:T("Broarcast")
|
||||
|
||||
if ((transmission.soundfile and transmission.soundfile.useSRS) or transmission.soundtext) and self.msrs then
|
||||
self:_BroadcastSRS(transmission)
|
||||
@@ -425,7 +426,7 @@ function RADIOQUEUE:Broadcast(transmission)
|
||||
else
|
||||
|
||||
-- Broadcasting from carrier. No subtitle possible. Need to send messages to players.
|
||||
self:T(self.lid..string.format("Broadcasting via trigger.action.radioTransmission()."))
|
||||
self:T(self.lid..string.format("Broadcasting via trigger.action.radioTransmission()"))
|
||||
|
||||
-- Position from where to transmit.
|
||||
local vec3=nil
|
||||
@@ -453,6 +454,8 @@ function RADIOQUEUE:Broadcast(transmission)
|
||||
local text=string.format("file=%s, freq=%.2f MHz, duration=%.2f sec, subtitle=%s", filename, self.frequency/1000000, transmission.duration, transmission.subtitle or "")
|
||||
MESSAGE:New(string.format(text, filename, transmission.duration, transmission.subtitle or ""), 5, "RADIOQUEUE "..self.alias):ToAll()
|
||||
end
|
||||
else
|
||||
self:E("ERROR: Could not get vec3 to determin transmission origin! Did you specify a sender and is it still alive?")
|
||||
end
|
||||
|
||||
end
|
||||
@@ -482,7 +485,7 @@ end
|
||||
--- Check radio queue for transmissions to be broadcasted.
|
||||
-- @param #RADIOQUEUE self
|
||||
function RADIOQUEUE:_CheckRadioQueue()
|
||||
--env.info("FF check radio queue "..self.alias)
|
||||
env.info("FF check radio queue "..self.alias)
|
||||
|
||||
-- Check if queue is empty.
|
||||
if #self.queue==0 then
|
||||
|
||||
@@ -160,7 +160,7 @@ do -- Sound File
|
||||
-- @param #string FileName The name of the sound file, e.g. "Hello World.ogg".
|
||||
-- @param #string Path The path of the directory, where the sound file is located. Default is "l10n/DEFAULT/" within the miz file.
|
||||
-- @param #number Duration Duration in seconds, how long it takes to play the sound file. Default is 3 seconds.
|
||||
-- @param #bolean UseSrs Set if SRS should be used to play this file. Default is false.
|
||||
-- @param #boolean UseSrs Set if SRS should be used to play this file. Default is false.
|
||||
-- @return #SOUNDFILE self
|
||||
function SOUNDFILE:New(FileName, Path, Duration, UseSrs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user