---
- name: install media packages
  apt:
    name:
      - abcde
      - aegisub
      - audacious
      - audacity
      - calibre
      - cmus
      - csound
      - cuetools
      - deluge-gtk
      - easytag
      - eom
      - feedreader
      - handbrake
      - id3v2
      - jpegoptim
      - libfdk-aac1
      - lltag
      - mediainfo
      - milkytracker
      - mkvtoolnix
      - mkvtoolnix-gui
      - mplayer
      - mpv
      - ncmpcpp
      - ogmtools
      - optipng
      - paprefs
      - pasystray
      - pavucontrol
      - picard
      - pngcrush
      - pngquant
      - pulseaudio
      - qcomicbook
      - shntool
      - sidplayfp
      - sonata
      - sox
      - v4l2loopback-dkms
      - vlc
      - webp
    state: present

- name: copy alsa config
  copy:
    src: asound.conf
    dest: /etc/asound.conf

- name: set pulse config
  lineinfile:
    path: /etc/pulse/daemon.conf
    line: "{{ item }}"
  loop:
    - default-sample-format = s16le
    - default-sample-rate = 48000
    - alternate-sample-rate = 44100
    - resample-method = soxr-hq
    - flat-volumes = no
