Search Unity

Changing audio device (dual monitor setup, PulseAudio, ubuntu)

Discussion in 'Linux' started by StudioEvil, Jul 26, 2016.

  1. StudioEvil

    StudioEvil

    Joined:
    Aug 28, 2013
    Posts:
    66
    Hi all!
    I have an app that will run (with two instances) on a custom machine with two monitors (on a custom ubuntu build).

    The first monitor is connected via hdmi and audio is fine on that.

    The second monitor is connected via dvi and i need to launch a second instance of my app using the onboard audio card.

    I think i cannot select the audio device to use within Unity.

    Do you know any other trick/hack to achieve this goal? Is it possible to make my app seeing only one of the two audio devices when Unity starts?

    Thanks in advance for you time.


    This is my PulseAudio mapping:

    * index: 0
    name: <4hdl>
    driver: <module-alsa-sink.c>
    flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: RUNNING
    suspend cause:
    priority: 9950
    volume: 0: 53% 1: 53%
    0: -16.54 dB 1: -16.54 dB
    balance 0.00
    base volume: 100%
    0.00 dB
    volume steps: 65537
    muted: no
    current latency: 94.14 ms
    max request: 18 KiB
    max rewind: 64 KiB
    monitor source: 0
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
    Stereo
    used by: 2
    linked by: 2
    configured latency: 104.99 ms; range is 0.50 .. 371.52 ms
    module: 5
    properties:
    alsa.resolution_bits = "16"
    device.api = "alsa"
    device.class = "sound"
    alsa.class = "generic"
    alsa.subclass = "generic-mix"
    alsa.name = "ALC888 Analog"
    alsa.id = "ALC888 Analog"
    alsa.subdevice = "0"
    alsa.subdevice_name = "subdevice #0"
    alsa.device = "0"
    alsa.card = "0"
    alsa.card_name = "HDA NVidia"
    alsa.long_card_name = "HDA NVidia at 0xfae78000 irq 23"
    alsa.driver_name = "snd_hda_intel"
    device.bus_path = "pci-0000:00:08.0"
    sysfs.path = "/devices/pci0000:00/0000:00:08.0/sound/card0"
    device.bus = "pci"
    device.vendor.id = "10de"
    device.vendor.name = "NVIDIA Corporation"
    device.product.id = "0ac0"
    device.product.name = "MCP79 High Definition Audio"
    device.form_factor = "internal"
    device.string = "plughw:0,0"
    device.buffering.buffer_size = "65536"
    device.buffering.fragment_size = "32768"
    device.access_mode = "mmap+timer"
    device.description = "Built-in Audio"
    device.icon_name = "audio-card-pci"
    index: 1
    name: <4hdr>
    driver: <module-alsa-sink.c>
    flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: RUNNING
    suspend cause:
    priority: 9950
    volume: 0: 53% 1: 53%
    0: -16.54 dB 1: -16.54 dB
    balance 0.00
    base volume: 100%
    0.00 dB
    volume steps: 65537
    muted: no
    current latency: 73.57 ms
    max request: 18 KiB
    max rewind: 64 KiB
    monitor source: 1
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
    Stereo
    used by: 2
    linked by: 2
    configured latency: 104.99 ms; range is 0.50 .. 371.52 ms
    module: 6
    properties:
    alsa.resolution_bits = "16"
    device.api = "alsa"
    device.class = "sound"
    alsa.class = "generic"
    alsa.subclass = "generic-mix"
    alsa.name = "HDMI 0"
    alsa.id = "HDMI 0"
    alsa.subdevice = "0"
    alsa.subdevice_name = "subdevice #0"
    alsa.device = "3"
    alsa.card = "0"
    alsa.card_name = "HDA NVidia"
    alsa.long_card_name = "HDA NVidia at 0xfae78000 irq 23"
    alsa.driver_name = "snd_hda_intel"
    device.bus_path = "pci-0000:00:08.0"
    sysfs.path = "/devices/pci0000:00/0000:00:08.0/sound/card0"
    device.bus = "pci"
    device.vendor.id = "10de"
    device.vendor.name = "NVIDIA Corporation"
    device.product.id = "0ac0"
    device.product.name = "MCP79 High Definition Audio"
    device.form_factor = "internal"
    device.string = "plughw:0,3"
    device.buffering.buffer_size = "65536"
    device.buffering.fragment_size = "32768"
    device.access_mode = "mmap+timer"
    device.description = "Built-in Audio"
    device.icon_name = "audio-card-pci"
     
  2. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    This isn't something that's currently configured by Unity - you'd need to do this at the system level, using pavucontrol, pacmd/pactl, or similar.
     
  3. StudioEvil

    StudioEvil

    Joined:
    Aug 28, 2013
    Posts:
    66
    Thank you, i'll give it a try!