Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: AnasAbdin on Wed 18/07/2018 06:44:53

Title: Recording sound clips in-game
Post by: AnasAbdin on Wed 18/07/2018 06:44:53
Hi there!
I was wondering if there's a way to make AGS access the mic to record a voice clip and store it in a file.

Thanks in advance!
Title: Re: Recording sound clips in-game
Post by: ManicMatt on Wed 18/07/2018 08:35:55
I'd be surprised if someone said you can, but I have to ask, why would you want to? I would never import unedited recorded audio.

Additionally, what audio format would you want it to be? Ogg Vorbis is the best way to go I believe. If you haven't already, grab yourself a free download of Audacity and use that to record your mic input.
Title: Re: Recording sound clips in-game
Post by: Crimson Wizard on Wed 18/07/2018 09:30:02
Quote from: AnasAbdin on Wed 18/07/2018 06:44:53
Hi there!
I was wondering if there's a way to make AGS access the mic to record a voice clip and store it in a file.

Short answer: AGS does not have such function.

Potential solution: plugin, based on SDL2.
* SDL2 is a cross-platform library, which is more up-to-date than Allegro4 (which AGS currently uses).
* There was at least one successful example of plugin with SDL2 (joystick rewrite that works on Linux)
* SDL2 supports audio recording: https://wiki.libsdl.org/SDL_OpenAudioDevice

EDIT: My above answer was written with assumption that you are speaking of recording in game. If not, please elaborate.
Title: Re: Recording sound clips in-game
Post by: AnasAbdin on Wed 18/07/2018 10:19:05
Quote from: Crimson Wizard on Wed 18/07/2018 09:30:02
EDIT: My above answer was written with assumption that you are speaking of recording in game. If not, please elaborate.

Yes,the recording is in-game.
Thanks for the answer CW :-*