Page 1 of 1

Is it possible to record audio from line in or microphone?

Posted: Mon Jan 16, 2023 11:30 am
by AlexC
Is there a way to capture audio with Hollywood?

I was thinking about making some kind of walkie talkie program to send/receive audio (speech) via TCP or UDP, initially just playing the incoming stream right away, and possibly storing it on the receiving end if the listener is "away" to be able to replay it later, much like an answering machine or voicemail.

I looked at the libraries and plug-ins but couldn't find any function related to the audio input side of things, only playback.

I'm guessing that this feature isn't implemented because it is far less common than audio playback?

I understand that each OS has a different API to access the audio hardware, be it AHI, PulseAudio, Alsa, DirectSound, etc. and since Hollywood is able to play sounds on all the supported platforms it must already support these APIs to some extent.

I also found that SDL can handle audio input but Rebel SDL doesn't seem to have audio input functions. SDL could be a handy shortcut to gaining access to the host OS audio subsystem as the SDL library already supports the related APIs.

Is there currently a way I might have missed?

Re: Is it possible to record audio from line in or microphone?

Posted: Sat Jan 28, 2023 10:16 pm
by airsoftsoftwair
No, it's currently not possible but it's indeed on my list for the next update of the RebelSDL plugin because SDL has this functionality as you've correctly pointed out.

Re: Is it possible to record audio from line in or microphone?

Posted: Sun Jan 29, 2023 8:20 am
by AlexC
Great!
Thank you Andreas!

Re: Is it possible to record audio from line in or microphone?

Posted: Sun May 11, 2025 7:26 pm
by airsoftsoftwair
Only took like 13 years or so from the original request but here it finally is, sorry for the delay ;)

Code: Select all

- New: Audio recording is finally supported using the new RecordAudio() function; this function allows you
  to record audio directly to a file in various audio formats (also extensible via plugins); you can also
  configure things like channels, bit depth and sampling frequency in the optional table argument; finally
  asynchronous recording is also supported by setting the "Async" tag to TRUE; note that on slower systems
  like AmigaOS 3 it's recommended to use an output audio format that doesn't use any compression (e.g.
  uncompressed RIFF WAVE) to make sure the file saver can keep up with the audio recorder