This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/src/backend/looped/system/voice_chat_audio.cpp
maybegreat48 ad90ee3f6a
Play audio on voice chat and more (#1053)
* feat(VC): audio through voice chat
* fix(BlackHole): remove unnecessary cleanup
* fix(Formatting): fix formatting for initializer lists
* feat(LSC): reimplement LSC
* feat(Protections): add (untested) protections for vehicle kick and remote teleport
2023-03-09 12:23:01 +00:00

31 lines
876 B
C++

#include "backend/looped_command.hpp"
#include "natives.hpp"
#include "pointers.hpp"
namespace big
{
class voice_chat_audio : looped_command
{
using looped_command::looped_command;
virtual void on_enable() override
{
*g_pointers->m_refresh_audio_input = true;
}
virtual void on_tick() override
{
NETWORK::NETWORK_OVERRIDE_SEND_RESTRICTIONS_ALL(true);
}
virtual void on_disable() override
{
*g_pointers->m_refresh_audio_input = true;
NETWORK::NETWORK_OVERRIDE_SEND_RESTRICTIONS_ALL(false);
}
};
voice_chat_audio g_voice_chat_audio("vcaudio", "Play Audio Through Voice Chat", "Plays the audio.wav file in the project folder through voice chat. The wave file must be encoded with a mono 16 bit 16kHz PCM format. You have to reset voice chat settings whenever you load the menu for the sound to play",
g.spoofing.voice_chat_audio);
}