Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Strony: 1
Potrzebuję skryptu, dzięki któremu będę mógł się przełączać skrótem klawiatury między urządzeniami odtwarzającymi, tj. dwoma kartami dźwiękowymi Intel i Cube. Kontroluję głośność Master channel skrótami, ale to obsługuje poziom głośności tylko bieżącego urządzenia odtwarzającego.
Znalazłem jakieś skrypty, ale nie bardzo wiem jak je zastosować i czy mają one zastosowanie do kmix.
[url]http://askubuntu.com/questions/4055/audio-output-device-fast-switch[/url]
[url]http://pablo-blog.blueoakdb.com/2012/07/kmix-automatically-switch-master.html[/url]
dane:
qdbus org.kde.kmix /Mixers org.kde.KMix.MixSet.currentMasterMixer PulseAudio::Playback_Devices:1 qdbus org.kde.kmix /Mixers org.kde.KMix.MixSet.currentMasterControl alsa_output.pci-0000_00_1b.0.analog-stereo pacmd list-sinks Welcome to PulseAudio! Use "help" for usage information. >>> 3 sink(s) available. * index: 0 name: <alsa_output.pci-0000_00_1b.0.analog-stereo> driver: <module-alsa-card.c> flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY state: IDLE suspend cause: priority: 9959 volume: 0: 67% 1: 67% 0: -10,61 dB 1: -10,61 dB balance 0,00 base volume: 100% 0,00 dB volume steps: 65537 muted: no current latency: 19,84 ms max request: 3 KiB max rewind: 64 KiB monitor source: 0 sample spec: s16le 2ch 44100Hz channel map: front-left,front-right Stereo used by: 0 linked by: 1 configured latency: 20,00 ms; range is 2,00 .. 371,52 ms card: 1 <alsa_card.pci-0000_00_1b.0> module: 6 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 = "1" alsa.card_name = "HDA Intel" alsa.long_card_name = "HDA Intel at 0xd5100000 irq 44" alsa.driver_name = "snd_hda_intel" device.bus_path = "pci-0000:00:1b.0" sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card1" device.bus = "pci" device.vendor.id = "8086" device.vendor.name = "Intel Corporation" device.product.id = "27d8" device.product.name = "GA-D525TUD (Realtek ALC887)" device.form_factor = "internal" device.string = "front:1" device.buffering.buffer_size = "65536" device.buffering.fragment_size = "32768" device.access_mode = "mmap+timer" device.profile.name = "analog-stereo" device.profile.description = "Analogowe stereo" device.description = "Wbudowany dźwięk Analogowe stereo" alsa.mixer_name = "Realtek ALC888" alsa.components = "HDA:10ec0888,1458e601,00100001" module-udev-detect.discovered = "1" device.icon_name = "audio-card-pci" ports: analog-output: Wyjście analogowe (priority 9900, latency offset 0 usec, available: unknown) properties: analog-output-headphones: Słuchawki (priority 9000, latency offset 0 usec, available: no) properties: device.icon_name = "audio-headphones" active port: <analog-output> index: 1 name: <alsa_output.usb-GYROCOM_C_C_Co.__LTD_Audiotrak_ProDigy_CUBE-01-CUBE.analog-stereo> driver: <module-alsa-card.c> flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY state: IDLE suspend cause: priority: 9049 volume: 0: 38% 1: 38% 0: -25,41 dB 1: -25,41 dB balance 0,00 base volume: 100% 0,00 dB volume steps: 65537 muted: no current latency: 24,09 ms max request: 3 KiB max rewind: 344 KiB monitor source: 1 sample spec: s16le 2ch 44100Hz channel map: front-left,front-right Stereo used by: 0 linked by: 1 configured latency: 20,00 ms; range is 4,00 .. 2000,00 ms card: 2 <alsa_card.usb-GYROCOM_C_C_Co.__LTD_Audiotrak_ProDigy_CUBE-01-CUBE> module: 7 properties: alsa.resolution_bits = "16" device.api = "alsa" device.class = "sound" alsa.class = "generic" alsa.subclass = "generic-mix" alsa.name = "USB Audio" alsa.id = "USB Audio" alsa.subdevice = "0" alsa.subdevice_name = "subdevice #0" alsa.device = "0" alsa.card = "2" alsa.card_name = "Audiotrak ProDigy CUBE" alsa.long_card_name = "GYROCOM C&C Co., LTD Audiotrak ProDigy CUBE at usb-0000:00:1d.2-1, full speed" alsa.driver_name = "snd_usb_audio" device.bus_path = "pci-0000:00:1d.2-usb-0:1:1.1" sysfs.path = "/devices/pci0000:00/0000:00:1d.2/usb4/4-1/4-1:1.1/sound/card2" udev.id = "usb-GYROCOM_C_C_Co.__LTD_Audiotrak_ProDigy_CUBE-01-CUBE" device.bus = "usb" device.vendor.id = "1852" device.vendor.name = "GYROCOM C&C Co., LTD" device.product.id = "7921" device.product.name = "Audiotrak ProDigy CUBE" device.serial = "GYROCOM_C_C_Co.__LTD_Audiotrak_ProDigy_CUBE" device.string = "front:2" device.buffering.buffer_size = "352800" device.buffering.fragment_size = "176400" device.access_mode = "mmap+timer" device.profile.name = "analog-stereo" device.profile.description = "Analogowe stereo" device.description = "Audiotrak ProDigy CUBE Analogowe stereo" alsa.mixer_name = "USB Mixer" alsa.components = "USB1852:7921" module-udev-detect.discovered = "1" device.icon_name = "audio-card-usb" ports: analog-output: Wyjście analogowe (priority 9900, latency offset 0 usec, available: unknown) properties: active port: <analog-output> index: 2 name: <alsa_output.pci-0000_01_00.1.hdmi-stereo> driver: <module-alsa-card.c> flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY state: IDLE suspend cause: priority: 9050 volume: 0: 1% 1: 1% 0: -120,01 dB 1: -120,01 dB balance 0,00 base volume: 100% 0,00 dB volume steps: 65537 muted: yes current latency: 19,95 ms max request: 3 KiB max rewind: 64 KiB monitor source: 2 sample spec: s16le 2ch 44100Hz channel map: front-left,front-right Stereo used by: 0 linked by: 1 configured latency: 20,00 ms; range is 2,00 .. 371,52 ms card: 0 <alsa_card.pci-0000_01_00.1> module: 5 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 0xd2000000 irq 17" alsa.driver_name = "snd_hda_intel" device.bus_path = "pci-0000:01:00.1" sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0" device.bus = "pci" device.vendor.id = "10de" device.vendor.name = "NVIDIA Corporation" device.product.id = "0be3" device.product.name = "High Definition Audio Controller" device.string = "hdmi:0" device.buffering.buffer_size = "65536" device.buffering.fragment_size = "32768" device.access_mode = "mmap+timer" device.profile.name = "hdmi-stereo" device.profile.description = "Digital Stereo (HDMI)" device.description = "High Definition Audio Controller Digital Stereo (HDMI)" alsa.mixer_name = "Nvidia GPU 0b HDMI/DP" alsa.components = "HDA:10de000b,10de0101,00100200" module-udev-detect.discovered = "1" device.icon_name = "audio-card-pci" ports: hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no) properties: device.icon_name = "video-display" active port: <hdmi-output-0>
Offline
Możesz pokombinować z podmienianiem ~/.asoundrc
https://forum.dug.net.pl/viewtopic.php?id=18662
Ale nie wiem czy to zadziała z pulseaudio i phononem.
Offline
Poza [i]~/.asoundrc[/i] można podmieniać zawartość [i]~/.config/kde.org/libphonon.conf[/i] lub [i]~/.kde/share/config/phonondevicesrc[/i]
Pulseaudio też ma swoje pliki konfiguracyjne i da się w taki sam sposób to przełączać.
Masz więc trzy całkiem proste sposoby.
Offline
Strony: 1
Time (s) | Query |
---|---|
0.00010 | SET CHARSET latin2 |
0.00006 | SET NAMES latin2 |
0.00120 | SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='3.15.203.242' WHERE u.id=1 |
0.00064 | REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '3.15.203.242', 1732960306) |
0.00047 | SELECT * FROM punbb_online WHERE logged<1732960006 |
0.00060 | SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=26768 AND t.moved_to IS NULL |
0.00014 | SELECT search_for, replace_with FROM punbb_censoring |
0.00173 | SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=26768 ORDER BY p.id LIMIT 0,25 |
0.00083 | UPDATE punbb_topics SET num_views=num_views+1 WHERE id=26768 |
Total query time: 0.00577 s |