# If $HOME/.aloopdrc exist, it will be used instead of this file.

# Note: You don't need to re-start any audio apps to switch output.
#       You only need to edit this file, and restart "aloopd" service
#       to see the changes.
#
# Note: Adjust the output and latency as needed.
# 1. Latency can be specified as -l 32768 (frames) or -t 500000 (usec)
# 2. -t 500000 (500ms, or half a second) CPU load is barely noticeable, but you can notice audio lag in videos
# 3. -t 50000 (50ms) is heavier on the CPU, but decent enough for watching audio-synced video
#
# Note: The capture job ("recording") is de-activated in the examples.
#       You need to enable it to make it work.
#       One playback and one capture job can run at the same time.
#
# Note: There are two pcm outputs. "aloopd" and "aloopdshared".
#       "aloopd" is exclusive, once opened, it can't be used by others, but it has less latency.
#       "aloopdshared" is shared, so it can be used by others, e.g. recording while listening.
#       (similar to pcm.mixout).
#       Use one or the other, but not both. (Using "aloopd" will preclude the use of "aloopdshared" elsewhere)
#       IMPORTANT: "aloopdshared" is for playback only. Capture jobs do __NOT__ works with it.
#
# Note: aloopd can run multiple jobs - but the sources have to be all __DIFFERENT__
#       Do __NOT__ start multiple playback jobs or multiple capture jobs on the __same__ source devices.
#       One source can only be used in one job, even it the source is capable of sharing.
#       E.g. Trying to run multiple jobs from "aloopshared" to output to multiple output
#       devices will __NOT__ work, only the last one will actually be run.
#
#       You can still use "aloopshared" to output to multiple devices, but you need to
#       run multiple instance of alsaloop (which is not supported by the "aloopd" service,
#       you wil have to run and manage it manually, as a replacement or in addition to
#       the "aloopd" service.
#
# Note: Thread for playback and capture should be separated (specified with -T parameter)
#       (-1 means create a unique thread so you don't have to keep track of the thread ids)
#

# playback job
-t 500000 -T -1 -S none -C aloopd -P hw:0
#-t 500000 -T -1 -S none -C aloopdshared -P hw:0
#-t 500000 -T -1 -S none -C aloopd -P bluealsa_raw:SRV=org.bluealsa,DEV=F8:DF:15:C4:5E:DC,PROFILE=A2DP,DELAY=0

# capture job - use "aloopd" only here. Never use "aloopdshared".
#-t 500000 -T -1 -S none -C hw:0 -P aloopd
#-l 32768  -T -1 -S none -C hw:0 -P aloopd
