Jump to content
  • entries
    943
  • comments
    5,899
  • views
    923,763

More voice recording


Josh

1,879 views

 Share

Previously I talked about a voice recording API done through Steamworks. However, OpenAL already has a simple recording API that handles this. The only thing the Steamworks API adds is compression (presumably OGG) to send the data.

I quickly implemented an OpenAL-based recording API, although I do not presently have any recording hardware device to test with. OGG compression can be added with the Ogg library that is already built into Leadwerks.

Here is my modified recording API:

static bool Sound::StartRecording();
static Sound* Sound::StopRecording();

Or in Leadwerks 5:

bool StartRecording();
shared_ptr<Sound> StopRecording();

I'm not sure if I want sound broadcast to be automatic, or if I want this to be a general-purpose sound recording API with an example that compresses the audio data and writes it to a packet.

 Share

2 Comments


Recommended Comments

Quote

I'm not sure if I want sound broadcast to be automatic, or if I want this to be a general-purpose sound recording API with an example that compresses the audio data and writes it to a packet.

I would say do both! Some people like out of the box solutions and others like to get under the hood and modify things. You did this with the animations API (although it took you a year or so to decide on making an official API method for it) so same idea here.

  • Upvote 1
Link to comment
On ‎2‎/‎25‎/‎2018 at 3:04 PM, Rick said:

I would say do both! Some people like out of the box solutions and others like to get under the hood and modify things. You did this with the animations API (although it took you a year or so to decide on making an official API method for it) so same idea here.

One of the issues with this is that the received sounds may be used differently. In an online shooter you will want all voices to be played at full volume with no spatialization, but in a VR game you want to have spatialization so you can tell who is talking.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...