Sound Listener

Betray has a fill recording API that lets you recourd sound sources.

betray_audio_read_units

uint betray_audio_read_units();

Description: Returns the number of units available for recording.

betray_audio_read_channels_availables

uint betray_audio_read_channels_availables(uint unit_id);

Description: Returns the number of channels each recording unit records

betray_audio_read_channel_directions

void betray_audio_read_channel_directions(uint unit_id, float *vec);

Description: returns a 3d vector of the channel

betray_audio_read

uint betray_audio_read(uint unit_id, void *data, uint type, uint buffer_size);

Description: Reads out data from a channel on a recording device to the buffer defined as data. The "type" parameter defines the type of data to be read and the stride of the read data counted in the size of the specified type. The buffer_size defines the maximum number of samples to be read. So the buffer needs to be atleast the data types size times the buffer_size times the stride. The function returns the number of samples actiualy read.