Final sound recording API
My Gigabyte Brix pro lacks an audio in port and I was not able to find a USB microphone yesterday. However, I found a cheap webcam with audio support and have been using this to test voice recording, and it works great. Here is the final voice recording API:
bool Sound::StartRecording(const int frequency = 22050, const int format = Sound::Mono8, const int buffersize = 20480) Sound* Sound::StopRecording() bool Sound::StopRecording(Lobby* lobby) lobby->SetVoiceFilter(const uint64 steamid, const bool block)
And in Leadwerks 5:
bool StartRecording(const int frequency = 22050, const int format = SOUND_MONO8, const int buffersize = 20480) shared_ptr<Sound> StopRecording() bool StopRecording(shared_ptr<Lobby> lobby) lobby->SetVoiceFilter(const uint64 steamid, const bool block)
The first overload of the StopRecording function will return a Leadwerks sound object you can play, and then second version of the function will broadcast your recorded audio to all players in the specified lobby. The SetVoiceFilter() method in the Lobby class can be used to block some players from receiving your voice audio, so the game can make voice chat private for your team.
The lobby and peer-to-peer networking system are also done, so in theory we have everything we need right now to make multiplayer games. An update will be out soon on the beta branch so you can start testing these new features.
- 1
3 Comments
Recommended Comments