Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
al_create_...o_recorder(3) Library Functions Manual al_create_...o_recorder(3)

NAME
       al_create_audio_recorder	- Allegro 5 API

SYNOPSIS
	      #include <allegro5/allegro_audio.h>

	      ALLEGRO_AUDIO_RECORDER *al_create_audio_recorder(size_t fragment_count,
		 unsigned int samples, unsigned	int frequency,
		 ALLEGRO_AUDIO_DEPTH depth, ALLEGRO_CHANNEL_CONF chan_conf)

DESCRIPTION
       Creates	an audio recorder using	the system's default recording device.
       (So if the returned device does not work, try updating the system's de-
       fault recording device.)

       Allegro will internally buffer several seconds of captured  audio  with
       minimal latency.	 (XXX: These settings need to be exposed via config or
       API  calls.)   Audio  will  be copied out of that private buffer	into a
       fragment	buffer of the size specified by	the samples parameter.	 When-
       ever a new fragment is ready an event will be generated.

       The  total  size	 of  the fragment buffer is fragment_count * samples *
       bytes_per_sample.  It is	treated	as a circular,	never  ending  buffer.
       If  you do not process the information fast enough, it will be overrun.
       Because of that,	even if	you only ever need to process one small	 frag-
       ment  at	 a  time,  you should still use	a large	enough value for frag-
       ment_count to hold a few	seconds	of audio.

       frequency is the	number of samples per second to	record.	 Common	values
       are:

        8000 -	telephone quality speech

        11025

        22050

        44100 - CD quality music (if 16-bit, stereo)

       For maximum compatibility, use a	depth of ALLEGRO_AUDIO_DEPTH_UINT8  or
       ALLEGRO_AUDIO_DEPTH_INT16, and a	single (mono) channel.

       The  recorder  will  not	 record	 until	you start it with al_start_au-
       dio_recorder(3).

       On failure, returns NULL.

SINCE
       5.1.1

	      [Unstable	API]: The API may need a slight	redesign.

Allegro	reference manual			    al_create_...o_recorder(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=al_create_audio_recorder&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help