Skip to content

Conversation

@PabstMirror
Copy link
Collaborator

Had a feature request to allow playing music via radios.
This allows an AI unit to talk or speak on radio with the use of
some external ts client that is outputting sound e.g.: https://github.com/Splamy/TS3AudioBot

https://www.youtube.com/watch?v=MTFx7xuhRjE

Example use:

[q2, "Botty", 0, 0, ""] call acre_sys_headless_fnc_start // has AI unit q2 start speaking with "Botty"'s Audio 

Ultimately, I think this feature is just too niche (and kind of hackey) to add publicly.
But it does seem to be a useful tool in debugging.

also fun bug:
acre just expects mono microphone data, but TS is capable of stereo
without the mono fix, everything was pitch shifted lower because the sound data is interleaved [left, right, left]

@jonpas jonpas added this to the 2.10.0 milestone May 20, 2021
@jonpas jonpas removed this from the 2.10.0 milestone Oct 8, 2021
@jonpas jonpas added the WIP label Oct 8, 2021
@jonpas
Copy link
Member

jonpas commented Apr 10, 2023

Ultimately, I think this feature is just too niche (and kind of hackey) to add publicly.

Hackey part yes, otherwise I would say this fits public API just fine.

also fun bug:

Maybe we can split that off to include in next release? Unless you intend to finish this.

@JordannDev
Copy link

Is there any intention of this being merged and put into release? I think this could be very useful for scenarios where game masters want ambient radio traffic over usable radios (as an example use case).

@Jsmuk
Copy link
Contributor

Jsmuk commented Feb 26, 2025

Are there any plans to revive this and get it in - even as a dev / undocumented feature? It'll be useful for developing, but I can see the gameplay benefits of it as well.

I've resolved the merge conflicts in my fork here if that helps at all.

TRACE_4("start",_unit,_tsName,_languageId,_speakingType,_radioId);

if (!alive _unit) exitWith { ERROR_1("bad unit",_this); false };
if (!isNil {_unit getVariable [QGVAR(keepRunning), nil]}) exitWith { ERROR_1("unit is already active",_this); false };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of 'Arma 3' 2.18, the nil check could be simplified:

Suggested change
if (!isNil {_unit getVariable [QGVAR(keepRunning), nil]}) exitWith { ERROR_1("unit is already active",_this); false };
if !(_unit isNil QGVAR(keepRunning)) exitWith { ERROR_1("unit is already active",_this); false };

params ["_unit"];
TRACE_1("stop"_unit);

if (isNil {_unit getVariable [QGVAR(keepRunning), nil]}) exitWith { ERROR_1("unit is not active",_this); };
Copy link
Contributor

@rautamiekka rautamiekka Feb 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise this could be simplified:

Suggested change
if (isNil {_unit getVariable [QGVAR(keepRunning), nil]}) exitWith { ERROR_1("unit is not active",_this); };
if (_unit isNil QGVAR(keepRunning)) exitWith { ERROR_1("unit is not active",_this); };

@VelonacepsCalyxEggs
Copy link

Yeah, this PR opens a lot of possibilities for a wide variety of scenarios, like stations that people can listen to to get important mission related information by deciphering the signal or similar. Or just straight up playing radio on a specific frequency.
I really hope this gets merged, this is going to be a game changer in my opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants