Sound Listener

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


uint betray_audio_read_units();

Description: Returns the number of units available for recording.


uint betray_audio_read_channels_availables(uint unit_id);

Description: Returns the number of channels each recording unit can record


void betray_audio_read_channel_directions(uint unit_id, float *vec);

Description: returns a 3d vector of the channel


uint betray_audio_read(uint unit_id, void *data, uint type, uint channel, 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.