Parameters |
---|
format% |
Format to use for recording, created with snd_format_create, snd_format_choose, or snd_codec_getformat. |
block_size% |
Size (in bytes) of each block, see info. |
block_count% |
Number of blocks, see info. |
Description |
---|
Opens a device for Sound Input. block_size should be the size in which you poll for recorded data. Data will not be made available until block_size (in bytes) has been recorded from the device. This will vary for different formats, most formats support snd_format_bps (Bytes Per Second) which can be used to approximate the size used for a buffer. block_count is the amount of blocks in the queue at one time. block_count should be at a minimum of 2. If you have a small block_size block_count should be higher. Remember that the total memmory occupied while recording will be block_size * block_count If you set both values to 0, they will be computed automatically. You will have new data arrive 5 times per second. If you fail to set these parameters correctly, you may have bad performance or buffer underruns (dropouts in audio recording). Use snd_in_close when done using the snd_in device. |
Return |
---|
Returns 0 on failure, otherwise handle to created object. |
SndLib : Sound Input : snd_in_open |
---|