This plugin provides direct mixing of multiple streams. The resolution for 32-bit mixing is only 24-bit. The low significant byte is filled with zeros. The extra 8 bits are used for the saturation.
ipc_key
specfies the unique IPC key in integer. This number must be unique for each different dmix definition, since the shared memory is created with this key number. When ipc_key_add_uid
is set true, the uid value is added to the value set in ipc_key
. This will avoid the confliction of the same IPC key with different users concurrently.
Note that the dmix plugin itself supports only a single configuration. That is, it supports only the fixed rate (default 48000), format (S16
), channels (2), and period_time (125000). For using other configuration, you have to set the value explicitly in the slave PCM definition. The rate, format and channels can be covered by an additional plug plugin, but there is only one base configuration, anyway.
An example configuration for setting 44100 Hz, S32_LE
format as the slave PCM of "hw:0" is like below:
You can hear 48000 Hz samples still using this dmix pcm via plug plugin like:
For using the dmix plugin for OSS emulation device, you have to set the period and the buffer sizes in power of two. For example,
period_time 0
must be set, too, for resetting the default value. In the case of soundcards with multi-channel IO, adding the bindings would help
so that only the first two channels are used by dmix. Also, note that ICE1712 have the limited buffer size, 5513 frames (corresponding to 640 kB). In this case, reduce the buffer_size to 4096.