Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
# dmix - plug:dmix supports 1-8 channels, and does use dmix! # Whereas surround51 doesn't use dmix # http://bbs.archlinux.org/viewtopic.php?pid=745946#p745946 # cat /proc/asound/card0/pcm0p/sub0/hw_params # Output to hw:0,0 to keep at 44.1k rather than dmix's 48k # 44.1k stops dmix from working, though. # From https://bugs.launchpad.net/debian/+source/sdl-mixer1.2/+bug/66483 # Not needed. #defaults.pcm.dmix_max_periods -1 #defaults.pcm.rate_converter "samplerate_best" # See /usr/share/alsa/pcm/dmix.conf #defaults.dmix.period_time 0 #defaults.dmix.periods 4 #defaults.pcm.surround51.device "0" # From https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1853 # Posted at http://bbs.archlinux.org/viewtopic.php?id=95582 # Is a dmix that actually works! pcm.dmixed { @args [ CHANNELS ] @args.CHANNELS { type integer default 2 } @args.CARD { type string default 0 } @args.$DEV { type string default 0 } @args.$SUBDEV { type string default 0 } type asym playback.pcm { type dmix ipc_key 5678293 ipc_perm 0660 ipc_gid audio slave { channels $CHANNELS pcm { type hw card $CARD device $DEV subdevice $SUBDEV } period_time { @func refer name { @func concat strings [ "cards." { @func card_driver card $CARD } ".pcm.dmix.period_time" ] } default -1 } period_size { @func refer name { @func concat strings [ "cards." { @func card_driver card $CARD } ".pcm.dmix.period_size" ] } default 1024 } periods { @func refer name { @func concat strings [ "cards." { @func card_driver card $CARD } ".pcm.dmix.periods" ] } default 16 } } } capture.pcm { type dsnoop ipc_key 5778293 ipc_perm 0660 slave { pcm { type hw card $CARD device $DEV subdevice $SUBDEV } period_size { @func refer name { @func concat strings [ "cards." { @func card_driver card $CARD } ".pcm.dsnoop.period_size" ] } default 1024 } period_time { @func refer name { @func concat strings [ "cards." { @func card_driver card $CARD } ".pcm.dsnoop.period_time" ] } default -1 } periods { @func refer name { @func concat strings [ "cards." { @func card_driver card $CARD } ".pcm.dsnoop.periods" ] } default 16 } } } } # Playing #pcm.!default { # type asym # playback.pcm "upmix_20to51_resample" #} # Check that e.g. Thief2 still works, if default is redefined. #pcm.!default { # type plug # # Always output to all 6 channels, so the dmixer actually works if e.g. 6-channel is attempted to be started, while 2-channel is playing. # slave.pcm "dmixed:6" #} pcm.!surround20 { type plug slave.pcm "dmixed:6" } pcm.!surround40 { type plug slave.pcm "dmixed:6" } pcm.!surround51 { type plug slave.pcm "dmixed:6" } # If get error "Slave PCM not usable", then need to use plug: # If get error "Cannot find rate converter", then install libsamplerate and alsa-plugins # Lunar Linux: lin ladspa-bs2b # listplugins # analyseplugin bs2b pcm.bs2b { type ladspa path "/usr/lib/ladspa" plugins { 0 { id 4221 # Bauer stereophonic-to-binaural (4221/bs2b) input { controls [ 700 6 ] } } } # http://bbs.archlinux.org/viewtopic.php?id=95582 slave.pcm "plug:dmixed:6" } # speaker-test -D headphones -c 2 -t wav # audacious uses less CPU when running bs2b as a listed plugin, probably because of samplerate_best # Posted at http://bbs.archlinux.org/viewtopic.php?pid=626573#p626573 pcm.headphones { type rate slave { pcm "plug:bs2b" rate 48000 } # Choices: samplerate_best samplerate_medium samplerate samplerate_order samplerate_linear converter "samplerate_best" hint { show on description "Headphones" } } pcm.ch51dup { slave.pcm "dmixed:6" slave.channels 6 type route # Front and rear ttable.0.0 0.5 ttable.1.1 0.5 ttable.2.2 0.5 ttable.3.3 0.5 # Center and LFE ttable.4.4 1 ttable.5.5 1 # Front left/right to center ttable.0.4 0.5 ttable.1.4 0.5 # Front left/right to rear ttable.0.2 0.5 ttable.1.3 0.5 } # http://alsa.opensrc.org/SurroundSound # http://alsa.opensrc.org/index.php/Low-pass_filter_for_subwoofer_channel_(HOWTO) # Lunar: lin ladspa tap-plugins swh-plugins cmt-plugins libsamplerate # Fedora: yum install ladspa ladspa-blop-plugins ladspa-caps-plugins ladspa-cmt-plugins ladspa-swh-plugins ladspa-tap-plugins libsamplerate # Arch Linux: pacman -S ladspa blop swh-plugins libsamplerate tap-plugins cmt # For id 1672 - 4 Pole Low-Pass Filter with Resonance (FCRCIA) (1672/lp4pole_fcrcia_oa), install blop-plugins # speaker-test -D upmix_20to51 -c 2 -t wav # Debugging: speaker-test -D plug:lowpass_21to21 -c 3 -t wav # listplugins # analyseplugin cmt # http://plugin.org.uk/ladspa-swh/docs/ladspa-swh.html # http://forums.gentoo.org/viewtopic-p-4528619.html#4528619 pcm.lowpass_21to21 { type ladspa slave.pcm upmix_21to51 # Set the path to ladspa, to fix this error: # Playback open error: -2,No such file or directory path "/usr/lib/ladspa" channels 3 plugins { 0 { id 1098 # Identity (Audio) (1098/identity_audio) policy duplicate input.bindings.0 "Input"; output.bindings.0 "Output"; } #1 { # id 1052 # High-pass filter # policy none # input.bindings.0 "Input"; # output.bindings.0 "Output"; # input { # controls [ 300 ] # } #} #2 { # id 1052 # High-pass filter # policy none # input.bindings.1 "Input"; # output.bindings.1 "Output"; # input { # controls [ 300 ] # } #} #3 { # id 1051 # Low-pass filter. # policy none # input.bindings.2 "Input"; # output.bindings.2 "Output"; # input { # controls [ 300 ] # } #} # From http://alsa.opensrc.org/index.php/Low-pass_filter_for_subwoofer_channel_(HOWTO) # Can be used instead of 1-3 above. 1 { id 1672 # 4 Pole Low-Pass Filter with Resonance (FCRCIA) (1672/lp4pole_fcrcia_oa) policy none input.bindings.2 "Input"; output.bindings.2 "Output"; input { controls [ 300 2 ] } } } } # speaker-test -D upmix_20to51 -c 2 -t wav # In audacious: upmix_20to51 pcm.upmix_20to51 { type plug slave.pcm "lowpass_21to21" slave.channels 3 ttable { 0.0 1 # left channel 1.1 1 # right channel 0.2 0.5 # mix left and right ... 1.2 0.5 # ... channel for subwoofer } # slave.rate 48000 makes CPU utilization 20% instead of 3% # Can't hear the difference with Audigy4 anyway. # slave.rate 44100 is 3%, so that proves audacious outputs 44100 #slave.rate 48000 #converter "samplerate" #slave.rate_converter "samplerate_best" } # In audacious: upmix_20to51_resample # aplay -D upmix_20to51_resample ~/alsa/samplerate-test/udial.wav pcm.upmix_20to51_resample { type rate slave { pcm upmix_20to51 #format S32_LE # Audigy4 upmixes to 48000 itself, and seems to use low-quality linear interpolation rate 48000 } # Choices: samplerate_best samplerate_medium samplerate samplerate_order samplerate_linear # 8% CPU with samplerate_medium - good choice converter "samplerate_medium" #converter "samplerate_linear" hint { show on description "20to51" } } # Debugging: speaker-test -D upmix_21to51 -c 3 -t wav pcm.upmix_21to51 { type plug # For ice1724: #slave.pcm surround51-ice # For Audigy: slave.pcm "dmixed:6" # http://bbs.archlinux.org/viewtopic.php?pid=745946#p745946 #slave.pcm dmixed:6 # For P5K ADI: #slave.pcm surround51-adi # Trying to pipe through Pulse Audio, to stop the clicks between songs. # Can't get Pulse Audio to work like this. #slave.pcm pulse # Don't need to specify the number of channels. slave.channels 6 ttable { 0.0 1 # front left 1.1 1 # front right 0.2 1 # rear left 1.3 1 # rear right # Front left/right to center. # Imbalanced because is to the left of the monitor! # Would normally be 0.5 each. 0.4 0.5 1.4 0.5 # Subwoofer, more powerful to compensate for bass-removal from other speakers. 2.5 2 } } # Channels are wrong way around in doom! This fixes them. # http://www.linuxforen.de/forums/archive/index.php/t-206470.html # http://forums.seriouszone.com/showthread.php?t=49869&page=10 # http://forums.gentoo.org/viewtopic-p-4173170.html#4173170 # For Audigy 4 # Weird, doom3 has crappy sound if I add an alsa rate converter. # Posted at http://ubuntuforums.org/showthread.php?t=1304228 pcm.doom-surround51 { slave.pcm "dmixed:6" slave.channels 6 type route ttable.0.0 1 ttable.1.1 1 ttable.2.4 1 ttable.3.5 1 ttable.4.2 1 ttable.5.3 1 } pcm.doom3-8930g { type plug slave.pcm { type dmix ipc_key 1093 # Must be unique ipc_key_add_uid false ipc_perm 0660 slave { pcm "hw:0,0" rate 44100 channels 2 period_time 0 period_size 1024 buffer_time 0 # Doom 3 wants buffer_size 8192 # In ~/.doom3/base/autoexec.cfg # And ~/.quake4/q4base/autoexec.cfg # seta s_alsa_pcm "doom3-8930g" buffer_size 8192 } } }
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
Roblox Scripts
2 hours ago | 0.02 KB
December smells like money
3 hours ago | 0.06 KB
Decentralized Moneys
4 hours ago | 0.42 KB
Bitcoin
4 hours ago | 0.23 KB
Untitled
5 hours ago | 13.75 KB
Untitled
5 hours ago | 0.06 KB
SmartOS Zombie Zone Cleanup Script
Bash | 8 hours ago | 3.78 KB
Untitled
9 hours ago | 3.86 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!