iblrig.sound.format_sound
- iblrig.sound.format_sound(sound, file_path=None, flat=False)[source]
Format sound to send to sound card.
Binary files to be sent to the sound card need to be a single contiguous vector of int32 s. 4 Bytes left speaker, 4 Bytes right speaker, …, etc.
- Parameters:
sound (2d numpy.array os shape (n_samples, 2)) – Stereo sound
file_path (str) – full path of file. [default: None]